Jump to content

Hide content code?


Guest Tasher

Recommended Posts

Posted

Is there a code out there for IP.Board 2.3.4 so I can hide content. And the only way for the members to see is to reply to the thread. I've seen codes like this but I haven't been able to find any. Can someone please help?

Posted

Since custom bbcodes aren't able to process things via php, this isn't possible yet. There was talk a few months back that modularization, similar to IPB settings modules, may appear in IPB 3.0 :)

Posted

I've seen IP boards with Hide Tags before <_<

Is there a way to make the "spoiler" code actually be hidden?

I also found this code

<script type="text/javascript">

<!--

/*****************************************

Hidden Content v3 By Beta

This code may not be reposted or redistributed without the creator's permission.

This copyright header must stay intact at all times.

*****************************************/


var errorMsg = " <b>[Hidden Content]</b> ";


function Frag() {

var _td = document.getElementsByTagName("td");

for(e=0;e<_td.length;e++) {

if(_td[e].className != "pformright" && _td[e].className && _td[e].id != "CODE" && _td[e].innerHTML.match(/\[hide\].*?\[\/hide\]/gi)) {

_td[e].innerHTML = _td[e].innerHTML.replace(/\[hide\](.*?)\[\/hide\]/gi,"<span class='message'><b>Loading...</b></span><span class='hidden' style='display:none'>$1</span>");

}

if(_td[e].className == "pformright" && _td[e].innerHTML.match(/\[hide\].*?\[\/hide\]/gi)) {

_td[e].innerHTML = _td[e].innerHTML.replace(/\[hide\].*?\[\/hide\]/gi,"[b]Hidden Content[/b]");

}

}

}

Frag();


function Frame() {

var url = (location.href.match(/showtopic=(\d+)/i))? RegExp.$1 : (location.href.match(/t=(\d+)/i))? RegExp.$1 : null;

if(url != null) {

var iframe = document.createElement("iframe");  iframe.style.display = "none";

iframe.src = location.href.split("index.php")[0] + "index.php?s=&act=Stats&CODE=who&t=" + url;

iframe.name = "datacheck";

iframe.id = "datacheck";

document.getElementsByTagName("head").item(0).appendChild(iframe);

iframe.onload = function() {

var _usr = document.getElementById("userlinks").rows[0].cells[0].getElementsByTagName("a")[0];

var _chk = window.frames["datacheck"];

var _lnks = _chk.document.getElementsByTagName("a");

for(x=0;x<_lnks.length;x++) {

  if(_lnks[x].href == _usr.href) {

  var _spn = document.getElementsByTagName("span");

	for(a=0;a<_spn.length;a++) {

	  if(_spn[a].className == "hidden" && _spn[a].style.display == "none") {

	  _spn[a-1].style.display = "none";

	  _spn[a].style.display = "inline";

	  }

	}

  } else {

  var _spn = document.getElementsByTagName("span");

	for(b=0;b<_spn.length;b++) {

	  if(_spn[b].className == "hidden" && _spn[b].style.display == "none") {

	  _spn[b-1].innerHTML = errorMsg;

	  }

	}

  }

}

}

} else {

var _spn = document.getElementsByTagName("span");

for(c=0;c<_spn.length;c++) {

  if(_spn[c].className == "hidden" && _spn[c].style.display == "none") {

  _spn[c-1].innerHTML = errorMsg;

  }

}

}

}

Frame();


//-->

</script>




Do you know if it can actually work?

Posted

Two things: first of all I have to laugh at you posting that particular hack - did you read line two of the copyright in it?

Second: though it looks like that would work, it's also completely client side, which makes it entirely useless to be honest. There are hide hacks in the resources section, I believe, and there's certainly IZE and sites like that too.

Alternatively, you could find the owner of an adult forum and ask where they got their hide hack from (trust me, they ALL use it).

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...