Home
HTML Coder
Passwords
Convertion Calc
Mail Encrypter
Nw54 Scripts
Contact Me
|
|
Post Page These scripts show up on the post page
|
Add emoticons to your posts
Use this online Emoticon Generator form to create your smiley code.
Message Text formatting
Alot of people (visitors) are not HTML aliterate and would not know how to format there messages, Use this online Message Format Generator to create the code to add
a menu of text formatting tools to your forums.
Message Revise Viewer
1/ Need to revise over the complete thread instead of just the message you are responding to. This will open another window with the complete thread your responding. Note this only works when responding to "threaded messages".
2/ Aimed for non IE users who can not revise messages, this option will allow you to revise over the single msg you are responding to.
limitations:
Needs to be opened and lefted open before previewing message other wise you'll lose the "Msg Revise" link.
<script language="Javascript" type="text/javascript">
<!-- This and other Network54.com Scripts found at http://mrpaniani.googlepages.com/nw54scripts.html
if (location.href.indexOf("post") != -1){
if (document.referrer){
if ((document.referrer.indexOf("thread?forumid") != -1) || (document.referrer.indexOf("message?forumid") != -1)){
document.write('<a href="javascript:msgviewer(document.referrer)">Msg Revise</a>')
}}}
function msgviewer(VTUrl){window.open(VTUrl, "viewer", "scrollbars=1, resizable=1, width=700, height=400")}
// -->
</script>
Dictionary and Thesaurus
Add an edit box to your post page to look up words in ether Dictionary.com or Thesaurus.com
<script language="Javascript" type="text/javascript"><!--
if(document.URL.search("post") != -1){
document.write("<form name='dict_form' method='get' action='http://www.dictionary.com/cgi-bin/dict.pl' target='DictThes' onsubmit='return formcheck();'>")
document.write("Look up: <input type='text' name='term' size=30 maxlength=48 value='' onfocus='this.select()'> <input type='submit' value=' OK '><br>")
document.write("Search:<input type='radio' name='db' value='*' checked><a href='http://www.dictionary.com/' target='DictThes'>Dictionary</a> <input type='radio' name='db' value='roget'><a href='http://www.thesaurus.com/' target='DictThes'>Thesaurus</a></form>")
}
function jump2form(){document.dict_form.term.select();document.dict_form.term.focus();}
function isblank(s){
for(var i = 0; i < s.length; i++){
var c = s.charAt(i);
if ((c != ' ') && (c != '\n') && (c != '\t')) return false;}
return true;}
function formcheck(){
var d = document.dict_form.db[1].checked;
var e = document.dict_form.term.value;
if ((e == null) || (e == "") || isblank(e)){alert("Please enter a word to look up.");jump2form();}
else if (d == 1){window.open("http://www.thesaurus.com/cgi-bin/search?config=roget&words=" + escape(e),"DictThes");}
else{window.open("http://www.dictionary.com/cgi-bin/dict.pl?term=" + escape(e),"DictThes");}
return false;}
// --></script>
or use this script, which will display an edit prompt when clicked
<script language="Javascript" type="text/javascript"><!--
if(document.URL.search("post") != -1){
document.write("<a href='javascript:lookupdic()'>Dictionary</a> <a href='javascript:lookupthes()'>Thesaurus</a>")
}
function lookupdic(){
void(term=prompt("Enter word to look up at Dictionary.com:",""))
if(term)window.open("http://www.dictionary.com/cgi-bin/dict.pl?term="+escape(term))
}
function lookupthes(){
void(words=prompt("Enter word to look up at Thesaurus.com:",""))
if(words)window.open("http://www.thesaurus.com/cgi-bin/search?config=roget&words="+escape(words))
}
// --></script>
Default sent post responses to email
If for some reason you'd like to have "sent responses to my email" checked by default adding this script to the end of the footer will enable it.
<script language="Javascript" type="text/javascript">
<!-- This and other Network54.com Scripts found at http://mrpaniani.googlepages.com/nw54scripts.html
if (document.referrer){
if (document.referrer.search("post") != -1){}
else{if (document.URL.search("post") != -1){document.forms[0].autorespond.checked=1;}
}
}
// -->
</script>
Image Viewer
If you prefer not to have image's posted within the message bodys, this script will create a hyperlink to the image which when clicked will open a new window and resize it to the images size
<script language="Javascript" type="text/javascript"><!--
if (document.URL.search("post") != -1){
document.write("<a href='javascript:HLimage()'>Get Image</a>");}
function HLimage(){
if(document.all.message.type=="hidden"){alert("Unable to edit message in \"Preview Mode\"!")}
else{
var thisImage=prompt("Enter the complete URL for the image you wish to display.", "http://");
var thisTitle=prompt("Now enter a title for the image you are referencing to.", "Image title");
var thisValue='<a href=javascript:ShowImage("'+thisImage+'")>'+thisTitle+'</a>';
document.all.message.value=document.all.message.value + thisValue;document.all.message.focus()}
}
function ShowImage(img){foto1=new Image(); foto1.src=(img); Controlla(img);}
function Controlla(img){
if((foto1.width!=0)&&(foto1.height!=0)){viewFoto(img);}
else{funzione='Controlla("'+img+'")';intervallo=setTimeout(funzione,20);}
}
function viewFoto(img){
largh=foto1.width; altez=foto1.height;
stringa="width="+largh+",height="+altez;
picView = window.open("", "", "+stringa+"");
picView.document.open();
picView.document.write("<HTML><HEAD><title>Image Viewer</title></HEAD><body topmargin=0 leftmargin=0>");
picView.document.write("<center><img src="+ img +"></center></BODY></HTML>");
picView.document.close();
}
// --></script>
| |
All Pages These scripts show up on all pages
|
Add your own content
This script will enable you to add content to specific pages of you forums such as your post page, login page, index and message/thread pages and also to all pages
Add this code to your header and or footer. Edit/add your code in the document.write(' ') lines between the (' and ')
To add more content just copy/paste more document.write(' ') lines as needed
<script language="Javascript" type="text/javascript"><!--
// ALL PAGES
document.write('Your all pages content here');
// POST PAGE
if (location.href.indexOf("post") != -1){
document.write('<br />Your post page content here');
}
// LOGIN PAGE
else if (location.href.indexOf("login") != -1){ if(location.href.indexOf("signup") < 0){
document.write('<br />Your login content here');
}}
// INDEX AND THREAD/MESSAGE PAGES
else{
document.write('<br />Your index and thread pages content here');
}
// -->
</script>
Hide Email addie
If your like me and have your "Contact Forum Owner" email address on your forums this script will hide your email address from a spammers bot.
<script language="Javascript" type="text/javascript">
<!-- Hide e-mail address from spam robots
username="yourname"
at="@"
domainname="youraddress.com"
document.write("<a href='mailto:"+username+""+at+""+domainname+"'>Contact Forum Owner</a>")
// -->
</script>
<!--E-mail link for non script-enabled browsers-->
<noscript>
<p align="center"><a href="mailto:yourname@NOSPAMyouraddress.com">Contact Forum Owner</a><br>
<font size="-1"><i>(Remove the word <strong>NOSPAM</strong> from my address before sending.)</i></font><br>
</noscript>
Welcome Message
Have a welcome message on your forum. that says Good
Guest or members that are logged in will have there display name displayed.
Include the cookie script at the bottom of this page into the header and place this script in the header.
<script language="Javascript" type="text/javascript">
<!-- This and other Network54.com Scripts found at http://mrpaniani.googlepages.com/nw54scripts.html
datetoday = new Date();
timenow=datetoday.getTime();
datetoday.setTime(timenow);
thehour = datetoday.getHours();
if (thehour > 18) displayEvent = "Evening";
else if (thehour >12) displayEvent = "Afternoon";
else displayEvent = "Morning";
var yourname=ReadCookie("nbabauth")
if ((yourname=="") || (yourname=="Anonymous")){yourname="Guest"}
var greeting = ("Good " + displayEvent + " " + yourname + "")
document.write("<b>"+greeting+"</b>");
// -->
</script>
Msg to Non-java enabled browsers
Some visitors may have javascripting disabled, this msg will then display alerting them that there are extra features/options if they enable scripting
<noscript>
<table width=10% align='center' cellspacing=1 cellpadding=0 border=0 bgcolor=#FFFFFF>
<tr><td align='center' style='color:#FFFFFF;font-size=8pt;font-weight:bold;background-color=#FF0000' nowrap>
If you can see this message then!!! <br> You may want to enable scripting on your browser to have the extra
<br> features/options this forum has to offer </td></tr></table>
</noscript>
Open a new window
if you'd like to view a site without leiving the forum, this script will add an address bar to the page, which opens new window to the url
<form onSubmit="window.open(this.url.value); return false">
Address <input type=text name=url size=40 value="http://" onfocus="this.select()"> <input type=submit value=" Go ">
</form>
| |
Login Page These scripts show up on the Login page
|
Display a msg on the login page
<script language="Javascript" type="text/javascript">
<!--
if (document.URL.search("login") != -1){
document.write("Enter code/text here you want shown on the login page here")
// Copy and paste line above to add more code/text -->
}
// -->
</script>
Remember Login Name
Like to have your login name remembered each time you goto the login page of your forum and also give other nw54 members the option to have there login remembered.
Its simple, once you've entered your login name just click the "Remember Login Name" link that will appear in the footer.
Include the cookie script at the bottom of this page into the header and place this script to the footer
<script language="Javascript" type="text/javascript">
<!-- This and other Network54.com Scripts found at http://mrpaniani.googlepages.com/nw54scripts.html
function RLoginN(){
if (document.forms[0].username.value > ""){SetCookie("myloginname", document.all.username.value);}
}
if (document.URL.search("login") != -1){
if(document.URL.search("signup") < 0){
document.write("<Center><font size=1><a href='javascript:RLoginN()'>Remember Login Name</a></font></Center>");
if(document.forms[0].upgradetoselect != null){document.forms[0].upgradetoselect.checked=false;}
document.forms[0].username.value =ReadCookie("myloginname");
document.forms[0].password.focus();}
}
// -->
</script>
| |
Cookie Script If you are using any scripts on this page that require the use of Cookies this is the script to add to the header of your forum
|
<script language="Javascript" type="text/javascript">
<!--
function ReadCookie(cookieName){
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName);
if (ind==-1 || cookieName=="") return "";
var ind1=theCookie.indexOf(';',ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
var today = new Date();
expiry = new Date(today.getTime() + 365*24*60*60*1000);
function SetCookie (name, value){
document.cookie=name + "=" + escape (value) + "; expires=" + expiry.toGMTString();
}
// -->
</script>
This page last updated July 2004
|
|