Preview: Here
Description: This code changes the look of your welcome table, and is completely customizable.
Placement: Global Headers
Editing: Details are given in the code itself.
Code:
- <script type="text/javascript">
- <!--
- /*
- Welcome Table Mod by Cr0w
- Copyright 2007
- Do not Repost
- */
- //Edit Below
- /* Start Date/PM Cell Variables */
- var wtp = 2; //0 = above banner, 1 = above menu buttons, 2 = below menu buttons
- var pmb = 0; //0 = Hide PM bar, 1 = Keep PM bar
- var mar = 1; //0 = Hide "Mark All Read" link, 1 = Display below welcome table
- /* End Date/PM Cell Variables */
- /* Start Menu Bar Variables */
- var pos = "center"; //left = buttons on left, center = buttons in center, right = buttons on right
- var ss = "[ "; // Symbol to go before buttons
- var div = "|"; // Symbol for between buttons
- var es = " ]"; // Symbol to go after buttons
- /* End Menu Bar Variables */
- //Edit Above
- var wt = document.getElementById("welcome_table");
- //Change Menu Bar
- var mbb = wt.getElementsByTagName("tr")[1].getElementsByTagName("td")[0].getElementsByTagName("table")[0].getElementsByTagName("td")[0];
- mbb.style.cssText = "text-align: "+pos;
- mbb.innerHTML = ss+mbb.innerHTML+es;
- while(mbb.innerHTML.match("::")){
- mbb.innerHTML = mbb.innerHTML.replace("::",div);
- }
- //Update Row Colspans
- wt.getElementsByTagName("td")[0].colSpan="3";
- wt.getElementsByTagName("td")[1].colSpan="3";
- //Create Row & Cells
- var nRow=wt.insertRow(wtp);
- var nCell=nRow.insertCell(0);
- var nCell2=nRow.insertCell(1);
- var nCell3=nRow.insertCell(2);
- //Declare Cell Attributes
- nCell.style.cssText="width: 33%;text-align: center;height: 25px;font-size: 12px";
- nCell.className="welcome";
- nCell2.style.cssText="width: 33%;text-align: center;height: 25px;font-size: 12px";
- nCell2.className="welcome";
- nCell3.style.cssText="width: 33%;text-align: center;height: 25px;font-size: 12px";
- nCell3.className="welcome";
- //Insert Cell Values
- var d = new Date();
- var hours = d.getHours();
- var min = d.getMinutes();
- var date = d.getDate();
- var ap = "am";
- var months = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
- if(hours>=12){
- ap = "pm";
- hours -= 12;
- }
- if(hours==0){
- hours = 12;
- }
- nCell.innerHTML = months[d.getMonth()]+' '+date+((date>3) ? 'th' : ((date==1) ? 'st' : ((date==2) ? 'nd' : 'rd')))+', '+d.getFullYear()+' ['+hours+':'+((min<10) ? '0'+min : min)+ap+']';
- nCell2.innerHTML = 'Welcome, '+((vf_username=="guest") ? 'Guest.' : '<a href="/action/view_profile/user/'+vf_username+'/">'+vf_displayname+'</a>.');
- nCell3.innerHTML = ((vf_username=="guest") ? 'Please <a href="/action/login/">login</a> or <a href="/action/register/">register</a>.' : 'Total PM's: <a href="/action/pm/">'+vf_total_pms+'</a> ('+vf_new_pms+' new)');
- //Hide PM Bar
- if(pmb==0){
- var ut = document.getElementById("user_table");
- if(mar==1){
- ut.getElementsByTagName("tr")[0].innerHTML = '<td align="center" class="menu"><a href="/action/markasread/type/boards/">Mark All Boards Read</a></td>';
- }
- else{
- ut.style.display="none";
- }
- }
- //-->
- </script>
Nice work Cr0w, I like it a lot.
Nice work Cr0w, I like it a lot.
Yay.![]()
Ya, I find it funny that you put Copyright 2007....![]()
Ya, I find it funny that you put Copyright 2007....![]()
It is afterall.. 2007![]()
Ya, I find it funny that you put Copyright 2007....![]()
*Checks Date*
Says 2007, or is my computer clock just broken?![]()
Yes but you can not declare copyright if you wish to... I think... (Yes I think, big news!Ya, I find it funny that you put Copyright 2007....![]()
It is afterall.. 2007![]()
)
Yes but you can not declare copyright if you wish to... I think... (Yes I think, big news!Ya, I find it funny that you put Copyright 2007....![]()
It is afterall.. 2007![]()
)
Actually, yes I can.Look it up.
![]()
My mistake!Yes but you can not declare copyright if you wish to... I think... (Yes I think, big news!Ya, I find it funny that you put Copyright 2007....![]()
It is afterall.. 2007![]()
)
Actually, yes I can.Look it up.
![]()
![]()
Copyright 2007
My mistake!Yes but you can not declare copyright if you wish to... I think... (Yes I think, big news!
It is afterall.. 2007![]()
)
Actually, yes I can.Look it up.
![]()
![]()
Copyright 2007
![]()
We're learning this in school lately... to copyright all you need to do is state Copyright (or (C)) #Date, #Name and it's legally yours and nobody else can take it. Although in court, unless you register it with the government, it won't do too much.
We're learning this in school lately... to copyright all you need to do is state Copyright (or (C)) #Date, #Name and it's legally yours and nobody else can take it. Although in court, unless you register it with the government, it won't do too much.
Actually, if you can prove you wrote whatever the other person used, and they did not give you credit, then it will still hold up in court.
It can hold up either way, but not as much if it's not "officially" registered.
But then again, the person could say it's for educational purposes and write up something quick![]()
Anyways... back to the welcome table![]()
It can hold up either way, but not as much if it's not "officially" registered.
But then again, the person could say it's for educational purposes and write up something quick![]()
Anyways... back to the welcome table![]()
Heh, I've got some sexy ideas for it, but I'll work on those when I have more time.![]()
the code isnt working for me
the code isnt working for me
Head on over to Code Support.![]()