|
Post by Jacelynne on Oct 1, 2009 18:07:17 GMT -5
I noticed Michael mentioned a PM bar, so I was thinking, if you have any suggestions on what we may need to help make the site a better ( and fun place) then PM me or post them here and I can get on them!
|
|
|
Post by Michael on Oct 1, 2009 19:09:48 GMT -5
I found a PM code, which is probably second-best in my opinion (The best is impossible to find, and I only found it once. ) Put this in the Global Header: <script> /* Top Pm Bar V2 Created by Nick This code is copyrighted 2008 by nbCircuits and http://toppmbarv2.proboards.com/ */ var fontSize = "2" var gname = "Guest" var get = document.getElementsByTagName("TD") get[2].style.display= "none" var guestMessage = '<font size='+fontSize+'><center>Welcome '+gname+', Please <a href=index.cgi?action=login>Login</a> or <a href=index.cgi?action=register>Register</a></center></font>' var pmNew = get[2].innerHTML.split(' are new')[0].split(',')[3] var memberMessage = '<font size='+fontSize+'><center>Welcome <a href="/index.cgi?action=viewprofile">'+pb_displayname+'</a>, You Have <a href="/index.cgi?action=pm">'+pmNew+' New Message(s)</a>.</center></font>' var pmBar = document.getElementsByTagName("table")[0].insertRow(0) var pmCell = pmBar.insertCell(0) pmCell.className="catbg" pmCell.innerHTML = memberMessage if(get[3].innerHTML.match(/Guest/i)){ pmCell.innerHTML = '<center>'+guestMessage+'</center>' } </script> The (var fontSize = "2") will adjust the font size. It's probably best to just leave it alone, unless you want big text. The (var gname = "Guest") will say what you call guests. For example, replacing "Guest" with "Newcomer" would make the PM bar say "Welcome, Newcomer. Please..." That's that. I also found a Live Preview code, which I think is a bit of a must-have. I put it in, just in case. Global footer <script type="text/javascript"> <!-- /* Live Preview - Global footer
Created by Peter
This code cannot be reposted at anywhere other than SSDesigns or ProBoards, without permission.
This header must stay intact at all times. */
var smileysObj = new Object();
var iRegSmileys = [ /\s:\)/g, /\s;\)/g, /\s:D/g, /\s;D/g, /\s>:\(/g, /\s:\(/g, /\s:o/g, /\s8\-\)/g, /\s\?\?\?/g, /\s::\)/g, /\s:P/g, /\s:-\[/g, /\s:\-X/g, /\s:\-\//g, /\s:\-\*/g, /\s:\'\(/g ];
var iRegUBBC = [ [/\[(\/)?(b|i|u|s|sup|sub)\]/gim, "<$1$2>"], [/\[(\/)?(hr|pre|blockquote)\]/gim, "<$1$2>"], [/\[(left|center|right)\]/gim, "<div align='$1'>"], [/\[\/(left|center|right)\]/gim, "</div>"], [/\[url=(http:\/\/)?(.*?)\](.*?)\[\/url\]/gim, "<a href=\"http://$2\">$3</a>"], [/\[url\]((\[\w+\])*)((http:\/\/)?(.*?)((\[\/\w+\])*))\[\/url\]/gim, "<a href=\"http://$5\">$1$4$6</a>"], [/\[email\]((\[\w+\])*)(.*?)((\[\/\w+\])*)\[\/email\]/gim, "<a href=\"mailto:$3\">$1$3$4</a>"], [/\[img\](.*?)\[\/img\]/gim, "<img src=\"$1\" border=\"0\" />"], [/\[size=(\d+)\]/gim, "<font size=\"$1\">"], [/\[\/size\]/gim, "</font>"], [/\[color=(\#[0-9A-F]{6}|[a-z]+)\]/gim, "<span style=\"color: $1;\">"], [/\[font=(.*?)\]/gim, "<span style=\"font-family: $1;\">"], [/\[\/(font|color)\]/gim, "</span>"], [/\[table\]/gim, "<table border='1'>"], [/\[(\/table|\/?tr|\/?td)\]/gim, "<$1>"], [/\[quote\]/gim, '<br /><b>Quote:</b><table class="bordercolor" cellspacing="1" width="90%"><tr><td width="100%"><table class="quote" cellpadding="2" cellspacing="0" width="100%"><tr><td width="100%"><font class="quote" face="Arial,Helvetica" size="1">'], [/\[\/quote\]/gim, "</font></td></tr></table></td></tr></table>"], [/\[list\]/gim, "<ul><br />"], [/\[\/list]/gim, "</ul>"], [/\[\*\]/gim, "<li>"], [/\[\/*\]/gim, "<br /></li>"], [/\[code\]/gim, '<blockquote><b>Code:</b><table class="bordercolor" cellspacing="1" width="90%"><tr><td><table class="code" cellpadding="2" cellspacing="0" width="100%"><tr><td><font class="code" face="Courier New" size="2">'], [/\[\/code\]/gim, "</font></td></tr></tbody></table></td></tr></tbody></table></blockquote>"] ];
String.prototype.htmlentities = function(){ var iTemp = this;
if(this){ for(m = 0; m < this.length; m ++){ switch(this.charCodeAt(m)){ case 60 : iTemp = iTemp.replace(this.charAt(m), "<"); break; case 62 : iTemp = iTemp.replace(this.charAt(m), ">"); break; } } } return iTemp.replace(/\n/g, "<br />"); }
String.prototype.str_replace = function(){ var pDiv = document.getElementById("livepreview"); if(this && arguments.length == 2){ if(new RegExp(arguments[0]).exec(this)){ pDiv.innerHTML = this.replace(arguments[0], arguments[1]); } } }
String.prototype.parse = function(){ var pDiv = document.getElementById("livepreview"); var noUBBCRe = /\[noubbc\](.*?)\[\/noubbc\]/gim;
if(this.match(noUBBCRe)){ var inPat = RegExp.$1.replace(/\]/g, "<font>]</font>"); pDiv.innerHTML = pDiv.innerHTML.replace(noUBBCRe, inPat); }
for(s = 0; s < iRegSmileys.length; s ++){ if(new RegExp(iRegSmileys[s]).test(this)){ pDiv.innerHTML = pDiv.innerHTML.replace(new RegExp(iRegSmileys[s]), ' <img src="' + smileysObj.has[s][0] + '" border="0" />'); } }
for(r = 0; r < iRegUBBC.length; r ++){ if(iRegUBBC[r][0].test(this)){ pDiv.innerHTML.str_replace(iRegUBBC[r][0], iRegUBBC[r][1]); } } }
function grabSmileys(obj){ if(obj){ var smileys = []; var iImg = obj.getElementsByTagName("img");
for(i = 0; i < iImg.length; i ++){ if(iImg.item(i).parentNode.href){ if(iImg.item(i).parentNode.href.match(/add\("%20(.*?)"\)/i)){ smileys.push([iImg.item(i).src, RegExp.$1]); } } } smileysObj.has = smileys; } }
function doLiveRow(){ var iFont = document.createElement("font"); var iPTxt = document.createTextNode("Live Preview:"); var iCell = document.getElementsByTagName("td");
iFont.size = "2"; iFont.appendChild(iPTxt);
for(c = 0; c < iCell.length; c ++){ if(iCell.item(c).className == "windowbg2" && iCell.item(c).width == "30%" && iCell.item(c).innerHTML.match(/Add Smilies:/)){ grabSmileys(iCell.item(c + 1)); var rowNum = (iCell.item(c).parentNode.rowIndex + 1); var nRow = iCell.item(c).parentNode.parentNode.insertRow(rowNum); var nCell = nRow.insertCell(0); nCell.className = "windowbg2"; nCell.appendChild(iFont); nCell = nRow.insertCell(1); nCell.className = "windowbg2"; nCell.id = "livepreview"; } } }
function livePreview(){ var pDiv = document.getElementById("livepreview");
pDiv.innerHTML = document.postForm.message.value.htmlentities(); pDiv.innerHTML.parse(); pDiv.innerHTML.parse(); // IE fix }
if(document.postForm && document.postForm.message){ doLiveRow(); document.postForm.message.onkeyup = livePreview; document.postForm.message.onfocus = livePreview; }
//--> </script> There's nothing to edit. Just a side note, by the way, it apparently tends to lag a little bit when the post gets REALLY big, although that's never happened to me. Just let me know if you need anything else!
|
|
|
Post by Jacelynne on Oct 2, 2009 11:45:34 GMT -5
Late:
Thanks Michael!
|
|