Post by Saita Tenma on Jul 31, 2008 19:16:46 GMT -5
DISCLAIMER: I don't hold any copyrights to the codes posted in this thread. I am simply suggesting them and am not trying to steal them in anyway. All codes posted can be found in the Code Index
Might I say that the banner would look better if you place this code up
global header
That should center your forum logo and let you keep the PM thing on the top. It was only be moved under the logo.
This code would be very useful when it comes to haveing sub-boards. In the board cells a link will appear to the sub-boards inside that board.
Main Footers
This code adds a report to admin link to the bottom right corner of every post in line with the 'link to post' link and the 'back to top' link.
Board Footers or Global Footers
You'll notice this towards the top of the code:
var reportLink = "Report to Admin";
var reportSubject = "Reporting User: ";
var reportBody = "I am reporting the following user for actions in the following thread.";
var reportTo = "admin";
The text to appear in the lower right of the post.
The subject of the PM to which the user's name will be appended.
The default message to include in the PM.
The username of the person to recieve the PM. To have the pm sent to two users (let's say "admin and "gmod") you would do this:
var reportTo = "admin,gmod";
It's just like sending a PM to multiple users.
Might I say that the banner would look better if you place this code up
global header
<script type="text/javascript">
<!--
/* move hey x... by elindir */
var pos="0"; // 1 for above buttons, 0 for below
var pclass='titlebg'; //Class of the Box
//Do not edit below
var table = document.getElementsByTagName("table");
var iPM = table[0].insertRow(2-pos).insertCell(0);
var td = document.getElementsByTagName('td');
var PM= td[2].innerHTML;
td[2].style.display="none";
iPM.innerHTML='<table class='+pclass+' width="100% cellspacing="1"><tr><td width="100%"><center>'+PM+'<\/center><\/td><\/tr><\/table>';
// -->
</script>
That should center your forum logo and let you keep the PM thing on the top. It was only be moved under the logo.
This code would be very useful when it comes to haveing sub-boards. In the board cells a link will appear to the sub-boards inside that board.
Main Footers
<script type="text/javascript">
/* Sub Boards in board cell
created by CrAzY_J ( http://hatakeforum.proboards30.com )
Do not redistribute this code without the creator's permission*/
var gCell = document.body.getElementsByTagName( "td" );
if( this.location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/))
{
for( var sel = gCell.length-1 ; sel > 0 ; sel -- )
{
for( var bol = 0 ; bol < gCell.length ; bol ++ )
{
if( gCell[sel].align == "right" && gCell[sel].firstChild.options)
{
var Options = ( gCell[sel].firstChild.options[2].value.match(/\/index\.cgi$/) )? gCell[sel].firstChild.options:false;
if( gCell[bol].width == "66%" && gCell[bol].innerHTML.match(/\((\d+)\ssub-boar(d|ds)\)/i) )
{
var BoardName = gCell[bol].getElementsByTagName( "b" )[0].innerHTML;
var Subs = parseInt(RegExp.$1);
gCell[bol].innerHTML.match(/Moderator/)? gCell[bol].appendChild( document.createElement('br') ):null;
gCell[bol].appendChild( document.createTextNode("Sub-Boards: ") );
for( var opl = 0 ; opl < Options.length ; opl ++ )
{
if( new RegExp('^-\\s'+BoardName+'$','').test(Options[opl].innerHTML ))
{
for( var opl2 = Math.floor( opl + 1 ) ; opl2 < Math.floor( Math.floor( opl + Subs ) + 1 ) ; opl2 ++ )
{
var Link = document.createElement("a");
Link.href = Options[opl2].value;
Link.appendChild( document.createTextNode( Options[opl2].innerHTML.split(/-\s/)[1].replace(/&/gi, '&') ) );
gCell[bol].appendChild( Link );
( opl2 != Math.floor( opl + Subs) )?gCell[bol].appendChild( document.createTextNode(', ')):null;
}
}
}
}
}
}
}
}
</script>
This code adds a report to admin link to the bottom right corner of every post in line with the 'link to post' link and the 'back to top' link.
Board Footers or Global Footers
<script type="text/javascript">
<!--
/*
Report To Admin v1.2
Copyright © 2005-2006 Bradley Nelson a.k.a. CCWorld
All Rights Reserved
Do not repost without permission.
For use on Proboards Boards only.
This Header must remain intact at all times.
*/
var reportLink = "Report to Admin";
var reportSubject = "Reporting User: ";
var reportBody = "I am reporting the following user for actions in the following thread.";
var reportTo = "admin";
var tds = document.getElementsByTagName("td");
var i; var recentPostId; var recentName; var recentPro; var pageLink; var cRptLink;
function URLencode(sStr) {
return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27');}
if(location.href.match(/action=display/i) && document.cookie.match(/user\=([\w\d]+?)\;/i)){
pageLink = location.href.split(/#/i)[0]
for(i=0; i<tds.length; i++){
if(tds.item(i).align == "right" && tds.item(i).firstChild.nodeName.match(/font/i)){
if(tds.item(i).lastChild.firstChild.nodeName.match(/img/i) && tds.item(i).lastChild.firstChild.alt.match(/IP:/i)){
tds.item(i).firstChild.replaceChild(document.createTextNode(" - "), tds.item(i).firstChild.lastChild);
cRptLink = document.createElement("a");
cRptLink.href = "/index.cgi?action=pmsend&to="+reportTo+"&subject="+URLencode(reportSubject+recentName)+"&message="+URLencode(reportBody +"\n\n[ur"+"l="+recentPro+"]"+recentName+"[/ur"+"l] for [u"+"rl="+pageLink+"#"+recentPostId+"] this thread[/u"+"rl].")
cRptLink.appendChild(document.createTextNode(reportLink));
tds.item(i).firstChild.appendChild(cRptLink);
tds.item(i).firstChild.appendChild(document.createTextNode(" "));}}
else if(tds.item(i).width == "20%" && tds.item(i).firstChild.nodeName.match(/a/i)){
if(tds.item(i).firstChild.name.match(/^\d+$/i)){
recentPostId = tds.item(i).firstChild.name;
if (tds.item(i).getElementsByTagName("a").length >= 2){
if(tds.item(i).firstChild.nextSibling.firstChild.firstChild.nodeName.match(/font/i)){
recentName = tds.item(i).firstChild.nextSibling.firstChild.firstChild.firstChild.data;
} else {
recentName = tds.item(i).firstChild.nextSibling.firstChild.firstChild.data;}
recentPro = tds.item(i).firstChild.nextSibling.firstChild.href;
} else {
recentPro = "#";
recentName = "A Guest";
}}}}}
// -->
</script>
You'll notice this towards the top of the code:
var reportLink = "Report to Admin";
var reportSubject = "Reporting User: ";
var reportBody = "I am reporting the following user for actions in the following thread.";
var reportTo = "admin";
The text to appear in the lower right of the post.
The subject of the PM to which the user's name will be appended.
The default message to include in the PM.
The username of the person to recieve the PM. To have the pm sent to two users (let's say "admin and "gmod") you would do this:
var reportTo = "admin,gmod";
It's just like sending a PM to multiple users.