|
Post by Marleen on Aug 16, 2007 19:12:34 GMT
Well, all the codes that Emma once put in the global headers and footers for me, have gone too... So I was wondering if you could help me looking for them to get them back. Val could you maybe repost the thing you posted before, for the centered PM- bar?
And does anyone know how to get rid of the "Hello blabla, you have blabla messages and blabla are new" (with the date underneath) displayed on the side? I want the code to have it centered underneath the banner, like we used to have...
And I want to get rid of the thing saying where you currently are at the forum, like right now it says "« Post Message »". I want that entire thing gone, and the quick reply centered, and lines of blank between each category, and the news header and the first category, and the "Forum Name.... " thing gone...
Well I could think of more things, but maybe one of you knows these codes? Can you paste them here, please? Using this thing below, without the space between the / and the c at the end... [code]Code here[/ code]
Sandy, I think you did a lot of these things for us like a year back, maybe you could help again??
Thanks guys, Love, Marleen
|
|
|
Post by HollymCombs on Aug 16, 2007 19:22:55 GMT
I think I can really help you guys out with everything having to do with codes. Everything that you mentioned I can give you (I believe). Put these 3 codes in your Global Header (I'm posting them together): <script type="text/javascript"> <!-- //Pm bar in Menu -DregondRahl
var table = document.getElementsByTagName("table"); var td = document.getElementsByTagName('td'); var menu = td[4];
if(td[2].innerHTML.match(/you have <.+?>(.+?) (message|messages)<.+?>, (\d+) (are|is) new./i)) var oldinbox = RegExp.$1; var newinbox = RegExp.$3+' ' +RegExp.$4; td[2].style.display="none"; if(pb_username=='Guest') menu.innerHTML='<div class="catbg">Welcome <b>'+pb_displayname+'</b>! Please <b><a href="/index.cgi?action=login">Login</a></b> Or <b><a href="/index.cgi?action=register">Register</a></b></div> '+menu.innerHTML+''; else menu.innerHTML='<div class="catbg">Welcome back <b>'+pb_displayname+'</b>! Your inbox has '+oldinbox+' Messages :: <b><a href="/index.cgi?action=pm">'+newinbox+' new</a></b></div> '+menu.innerHTML+'';
// --> </script>
<script type="text/javascript"> <!-- document.getElementsByTagName('font')[1].style.display="none"; //--> </script>
<script type="text/javascript"> <!-- document.getElementsByTagName('td')[2].style.display="none"; //--> </script>
That really covers what you were talking about. This code I'm not positive if you were using, but you might have been (so you can just try it out and see if you like it). I can't remember lol: <script type="text/javascript"> <!-- var td=document.getElementsByTagName("td"); var tt=document.getElementsByTagName("table")[0]; tt.style.backgroundColor="transparent"; tt.cellSpacing="0"; for(i=0;i<td.length;i++){ td[i].style.backgroundColor="transparent"; } // --> </script>
Now this is something that I know you used in the past. It's a code that makes the width of the forum match the header image. If you want only the forum width to be centered on the top (and not where all of the boards are), then put this code in your Global Header: <script type="text/javascript"> <!-- fWidth = document.getElementsByTagName('table'); for(t=0; t<fWidth.length; t++) { if(fWidth[t].width=="92%") fWidth[t].width='750'; } // --> </script> But also try it out in your Global footer (that will resize the whole forum width. See which one you like better . That one's just a matter of opinion. Please post or feel free to PM me if you need any more coding help! I think that I can really help you out in that way .
|
|
|
Post by Marleen on Aug 16, 2007 20:03:29 GMT
I'm not really getting what difference this code makes... I added it to the global header, but I can't seem to notice a difference from before...
<script type="text/javascript"> <!-- var td=document.getElementsByTagName("td"); var tt=document.getElementsByTagName("table")[0]; tt.style.backgroundColor="transparent"; tt.cellSpacing="0"; for(i=0;i<td.length;i++){ td[i].style.backgroundColor="transparent"; } // --> </script>
So what I'm still looking for now is the Quick Reply thing centered, and the blank lines in between the news header and the first category, and the rest of the categories...
|
|
|
Post by Marleen on Aug 16, 2007 20:04:34 GMT
Ooh yea and how to get rid of the
"Forum Name Topics Posts Last Post" thing that is above the {General} category. But I'm not certain if we had them removed on the forum before.. Hang on I'll check, cuz I had a printscreen somewhere off this forum...
|
|
|
Post by HollymCombs on Aug 16, 2007 20:16:14 GMT
Well here are most of the codes that you are looking for:
<script type="text/javascript"> <!-- /* Dividing Categories - Created by Peter
This code cannot be reposted anywhere other than SSDesigns or ProBoards Support.
This header must stay intact. */
// Size of the gap between categories var gapSize = 25;
var tabHTML = '<td id="rr" colspan="5"></table></td></tr></table><div style="height:' + gapSize + '"></div><table width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="100%"><tr>';
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){ var tBod = document.getElementsByTagName("tbody"); for(tb = 0; tb < tBod.length; tb ++){ for(r = 2; r < tBod.item(tb).rows.length; r ++){ var tBodObj = tBod.item(tb).rows.item(r).cells.item(0); if(tBodObj.className == "catbg" && tBodObj.colSpan == "5" && tBodObj.align != "right"){ var c = tabHTML + tBod.item(tb).firstChild.innerHTML + "</tr>"; var p = tBodObj.parentNode.innerHTML; var tBodPar = tBod.item(tb).parentNode.parentNode.parentNode.parentNode.parentNode; tBodPar.parentNode.innerHTML = tBodPar.parentNode.innerHTML.replace(p, c + p); } if(tBod.item(tb).rows.item(r).firstChild.id == "rr"){ tBod.item(tb).rows.item(r).style.display = "none"; } } } }
//--> </script>
<script type="text/javascript"> <!-- /* remove Forum Name | Topics | Posts... and add thread & post info by california */ var td=document.getElementsByTagName("td"); if(location.href.match(/com\/?((index\.cgi)?\??(action=(ma.+ad|logout|home))?(#.+)?)?$/)){ for(i=0;i<td.length;i++){ if(td[i].width=="1%" && td[i].innerHTML.match(/\d/)){ if(td[i+1].width.match(/^(1|7)%$/)){ td[i].innerHTML+="<br />threads"; td[i].width="8%"; }else{ td[i].innerHTML+="<br />posts"; td[i].width="7%"; } } if(td[i].width=="8%" && !td[i].innerHTML.match(/thread/)){ td[i].width="4%"; } if(td[i].className=="titlebg" && td[i].innerHTML.match(/Forum Name/i)){ td[i].parentNode.style.display="none"; } } } //--> </script>
<script type="text/javascript"> <!--
// Separate news fader from boards
// Size of the gap between news fader and boards var nfSize = 25;
var iDiv = document.createElement("div"); var iTable = document.getElementsByTagName("table");
iDiv.style.height = nfSize;
function splitNewsFader(){ for(t = 0; t < iTable.length; t ++){ if(iTable.item(t).width == "100%" && iTable.item(t).className == "bordercolor" && iTable.item(t).innerHTML.match(/b>News<\//i)){ var iScript = iTable.item(t).parentNode.getElementsByTagName("script").item(1); iTable.item(t).parentNode.insertBefore(iDiv, iScript); } } }
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){ splitNewsFader(); }
//--> </script>
And those all go in the main footer.
The only one I didn't have for you was the "Quick Reply Center Code". I don't know what you mean by Quick reply. I'll probabbly know what you mean if you give me a little description lol.
The difference for that code that you are saying you can't see a difference with is that there won't be a background behind "Home, Help, Search", etc. If you take it out there will be. Come to think of it you weren't using it before, but if you like it keep it! lol
|
|
|
Post by Marleen on Aug 16, 2007 20:28:26 GMT
Oh yea I realized it already! I really like it! I'll put them into the footer as soon as I finished typing this! You are a code queen!
By the quick reply thing centered I mean the quick reply box, that is beneath each thread... I'm typing in it now... It's on the right.. And we used to have it centered before.... You know the thing you can type in when you dont click the reply button. You can start typing right ahead... I want it centered lol.
|
|
|
Post by HollymCombs on Aug 16, 2007 20:31:06 GMT
Oooh I know what you mean now! lol . Here's the code for that: <script type="text/javascript"> /* center quick reply by elindir http://101support.proboards43.com do not redistribute */ <!-- var td = document.getElementsByTagName('td'); for(i=0;i<td.length;i++){ if(location.href.indexOf('action=headersfooters') == -1) if(location.href.match(/action=display/)){ if(td[i].innerHTML.match(/Quick Reply/) && td[i].width.match(/100%/) && td[i].className.match(/titlebg/)){ td[i].align="center"; td[i+1].align="center"; }}} //--> </script>
I'm glad that I could help. I hope those codes all work for you! Any other ones that are you looking for?
|
|
|
Post by Marleen on Aug 16, 2007 20:31:39 GMT
Where do I put the last one? And I'll see if I need any more after I put them there I don't think so, though... Do you recommend any?
|
|
|
Post by HollymCombs on Aug 16, 2007 20:43:00 GMT
I keep forgetting to tell you where to put them! lol whoops . It goes in the Global Footer. Actually I do have a few recommendations. This first code will center the Category names. I think that it will look better because the NewsFader thing is center, so then everything will sort of flow better. Anyways, haha see what you think . Global Header: <style type="text/css"> <!-- .catbg { text-align: center; } --> </style> Now here are a couple of infocenter codes. Most forums use one. I always like having one of those in lol, but we'll see what you think! Main Footer (all following): <!-- /* Info Center 101 - v1.5 created by Ross, Copyright - 2005
this code may only be posted at http://101support.proboards43.com or http://support.proboards.com do not edit or redistribute without permission keep this header intact at all times */
// The color and style of the dividing lines var hr = 'border-bottom-style: dashed; color: #FFFFFF; border-width: 1pt;';
//These are the URLs to the Head and Base Images. Leave blank for no image var grads = ["Head Image URL","Base Image URL"];
// Class of the box. Normally either windowbg or windowbg2 var iClass = "windowbg";
// Name of the Info Center var iTitle = "Info Center";
//Edit the names of the staff groups and their corresponding group number. Repeat the pattern for more groups. // For example, the next line might be: theStaff[3]=["Board Owner","7"] var theStaff = []; theStaff[0]=["Moderators","(3|4)"] theStaff[1]=["Global Moderators","2"] theStaff[2]=["Administrators","1"]
// Do not edit below this line td = document.getElementsByTagName('td'); div = document.createElement('div');
updated = 0; boards = 0; categories = 0;
for (i=0; i<td.length; i++) { if(td[i].width == '66%' && td[i].className == 'windowbg2') { boards++ if(td[i-1].innerHTML.match(/\[\*\]/)) { updated++ } } else if(td[i].className=='catbg' && td[i].innerHTML.match(/a name/i)) { categories++ } else if(td[i].parentNode.parentNode.parentNode.className == 'bordercolor' && td[i].parentNode.parentNode.parentNode.width == '100%' && td[i].innerHTML.match(/>Info Center</)) { iCell = td[i].getElementsByTagName('td'); posts = td[i].innerHTML.match(/Total Posts: (.+?)</)? RegExp.$1 : ''; threads = td[i].innerHTML.match(/Total Topics: (.+?) &nb/)? RegExp.$1 : ''; post_per_topic = '<tr><td width=80% align=right>Average Posts per Topic:</td><td width=10%></td><td width=21% align=right>'+ Math.round(parseInt(posts.replace(/,/g,'')) / parseInt(threads.replace(/,/g,''))) +'</td></tr>'; topic_per_board = '<tr><td width=70% align=right>Average Topics per Board:</td><td width=10%></td><td width=21% align=right>'+ Math.round(parseInt(threads.replace(/,/g,'')) / boards) +'</td></tr>'; post_per_board = '<tr><td width=70% align=right>Average Replies per Board:</td><td width=10%></td><td width=21% align=right>'+ Math.round(parseInt(posts.replace(/,/g,'')) / boards) +'</td></tr>'; boards = (boards>0)? 'Total Boards: <b>'+ boards+'</b>' : ''; categories = (categories>0)? 'Total Categories: <b>'+ categories +'</b>' : ''; usersOnline = iCell[iCell.length - 1].innerHTML; recent = iCell[3].innerHTML.split(/Last Updated Topic: /i)[1].split('by ')[0]; lastPost = iCell[3].innerHTML.split('by ')[1].split(/<br>/i)[0].replace(' (',', ').replace(')',''); registered = (iCell[3].innerHTML.match(/Total Members: <(.+?)>(.+?)</))? RegExp.$2 : ''; newest = (iCell[3].innerHTML.match(/Newest Member: (.+?)<\/a/))? RegExp.$1 +'</a>' : ''; membersOnline = (usersOnline.match(/(\d+) Member/))? RegExp.$1+' Members' : ''; guestOnline = (usersOnline.match(/(\d+) Guest/))? RegExp.$1 +' Guests' : ''; guestOnline = (usersOnline.match(/viewguests/))? '<a href=javascript:popWindow(\'viewguests\')>'+guestOnline+'</a>' : guestOnline; updated = (updated == 0)? 'No boards' : (updated == 1)? '1 board' : updated+' boards'; updated = '<a href=/index.cgi?&action=recent>'+ updated +'</a> have been updated recently'; if(td[i].innerHTML.match(/Today\'s Birthdays/)) { birthdays = iCell[9].innerHTML; iMembers = iCell[9].getElementsByTagName('a'); if(iMembers.length > 1) { birthdays = birthdays.replace(new RegExp(iMembers[iMembers.length -2].innerHTML+'</a>,','i'),iMembers[iMembers.length -2].innerHTML+'<a> and'); } plural1 = (iMembers.length > 2)? 'are' : 'is'; plural2 = (iMembers.length > 2)? 's' : ''; } birthdays = (td[i].innerHTML.match(/Today\'s Birthdays/))? '<br/>'+ birthdays + ' ' + plural1+' celebrating their birthday'+plural2+' today.' : ''; events = (td[i].innerHTML.match(/Events This Month/))? '<br/>Upcoming Events: '+ iCell[iCell.length - 5].innerHTML : '';
var date = new Date(); var month = date.getMonth(); var day = date.getDay(); var daym = date.getDate(); var year = date.getYear(); if(year < 1900){ year += 1900 } var montharray=["January","February","March","April","May","June","July","August","September","October","November","December"]; var dayarray=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; if(daym == (1|21|31)){ext = 'st'} else if(daym == (2|22)){ext = 'nd'} else if(daym == (3|23)){ext = 'rd'} else{ext = 'th'} var hours = date.getHours(); if (hours >= 12) { hours = hours-12 } var mins = date.getMinutes(); if (mins < 10) {mins = "0" + mins;} iDate = dayarray[day] +' the '+ daym + ext + ' of ' + montharray[month]+', '+year; iTime = hours+':'+mins;
iHolder = '<table class="info" width=100% cellpadding=0 cellspacing=0 border=0 align=center><tr>'; iHolder += '<td><table class=bordercolor width=100% cellspacing=1 celpadding=2><tr>'; iHolder += '<td width=100% class=titlebg align=center style="background-image: url('+grads[0]+');"><B>'+iTitle+'</B></td>'; iHolder += '</tr><tr><td class=catbg>Forum Statistics</td></tr><tr><td class='+iClass+'>'; iHolder += '<table align=center width=95%><tr><td align=center>'; iHolder += '&nb'+'sp; Total Posts: <b>'+ posts +'</b>&nb'+'sp; &nb'+'sp; &nb'+'sp; Total Topics: <b>'+ threads +'</b>&nb'+'sp; &nb'+'sp; &nb'+'sp;'+ boards +'&nb'+'sp; &nb'+'sp; &nb'+'sp;'+ categories +'&nb'+'sp;'; iHolder += '<hr width=100% style="'+ hr +'"></td></tr><tr><td width=100%><table width=100%><tr><td width=60%>The most recently updated topic is \''+ recent +'\'<br/>'; iHolder+= 'The last forum post was made by '+ lastPost +'<br/>It is currently '+ iTime +', on '+iDate; iHolder += '</td><td><table width=95% align=center>'+ post_per_topic + topic_per_board + post_per_board +'</table></td>'; iHolder += '</tr></table><hr style="'+ hr +'"><table width=100%><tr><td width=72% style="'+hr+'border-bottom-style: none; border-right-style: dashed;">'; iHolder += 'There are currently <a href=/index.cgi?action=members>'+registered+' registered members</a> on '+document.title.split(/ -/)[0]+'.<br/>We would like to welcome '+newest+' as the most recent member to the forums.'+birthdays+events; iHolder += '</td><td width=28% valign=top><table width=95% align=center valign=top><tr><td>'+ updated +'</td></tr></table></td></tr></table></td></tr></table></td></tr>'; iHolder += '<tr><td class=catbg>Users Online</td></tr><tr><td class='+iClass+' valign=top width=100%>'; iHolder += '<table align=center width=95%><tr><td width=21% valign=top style="'+hr+'border-bottom-style: none; border-right-style: dashed;">'+guestOnline +'<br/>'+ membersOnline; iMembers = iCell[iCell.length -1].getElementsByTagName('a'); o = 0; for(s=0; s<theStaff.length; s++) { for(g=0; g<iMembers.length; g++) { if(iMembers[g].className && iMembers[g].className.match(new RegExp('group'+theStaff[s][1]))) { o++ } } iHolder += '<br/>'+ o +' '+ theStaff[s][0]; o = 0; } totOnline = (usersOnline.match(/(\d+) Guest/))? parseInt(RegExp.$1) : 0; totOnline += iMembers.length; usersOnline = 'There are currently '+totOnline+' users online. Most u'+ usersOnline.split(/Most u/)[1].replace(/<br>/i,'<br/><hr style="'+ hr +'">').replace(/(\d+) Invisible Users. /,''); iHolder += '</td><td valign=top>'+ usersOnline; base = (grads[1].match(/http:/))? '<center><img src='+grads[1]+' /></center>' : ''; iHolder += '</td></tr></table></td></tr></table>'+base+'</td></tr></table>'; div.innerHTML = iHolder; td[i].parentNode.parentNode.parentNode.parentNode.replaceChild(div, td[i].parentNode.parentNode.parentNode); break; } } //--> </script>
<script type="text/javascript"> <!-- /* Info Center 102 created by Ross, Copyright - 2005
this code may not be reposted http://support.proboards.com keep this header intact at all times */
// Member of the month settings. Leave blank for none var motm = [ "elindir", // Member Username "Ross" //Display Name ];
// For the 'Forum Age'. Enter the forums start date in the form of 'DD','MM','YYYY' or leave blank to not use this feature. var startDate = ['28','06','2005'];
// The titles used on each section of the Info Center. var titles = [ "Info Center", "Forum Stats", "Birthdays & Events", "Members Online" ];
var style = [ "#000000", // Color of the dividing lines "dashed", // Style of the dividing lines "Head Image URL", // Head image URL (Leave blank for none) "Base Image URL" // base image URL (Leave blank for none) ];
//Edit the names of the staff groups, their corresponding group number(s) and an optional color for the group. Repeat the pattern for more groups. var staff = []; var s = 0; staff[s++] = ["Administrators","1","E3170D"]; staff[s++] = ["Global Moderators","2","5285FF"]; staff[s++] = ["Moderators","(3|4|8)","00AF33"];
// Do not edit below this line unless you know what you're doing if(location.href.match(/\.com\/?(index.cgi)?\??(&?action=home)?(&?page=affiliates)?(#\w+)?$/)) { var td = document.getElementsByTagName('td'); var div = document.createElement('div'); // Forum Age var sta = new Date(); sta.setDate(startDate[0]); sta.setMonth(startDate[1]-1); sta.setYear(startDate[2]); var cur = new Date(); var dif = cur - sta; var totalMonth = 0; var totalYear = 0; var totalDay = Math.floor(dif/(60 * 60 * 24 * 1000)) + 1; while(totalDay > 365) { totalDay -= 365; totalYear++; } while(totalDay > 30) { totalDay -= 30; totalMonth++; } var age = totalDay+' days'; if(totalMonth > 0) age += ', '+totalMonth+' months'; if(totalYear > 0) age += ', '+totalYear+' year'; age += '.'; // Starting Totals var updated = 0; var boards = 0; var categories = 0; var subs = 0; // Box Styles var b = []; b['r'] = 'border-right: '+style[0]+' '+style[1]+' 1px;'; b['l'] = 'border-left: '+style[0]+' '+style[1]+' 1px;'; b['b'] = 'border-bottom: '+style[0]+' '+style[1]+' 1px; padding-bottom: 5px;'; b['pad'] = 'padding-right: 10px; padding-left: 20px; padding-bottom: 5px; padding-top: -1px;'; b['sep'] = 'padding-right: 10px; padding-left: 10px;'; for (i=0; i<td.length; i++) { if(td[i].width == '66%' && td[i].className == 'windowbg2') { boards++; if(td[i].innerHTML.match(/\((\d+) sub/)) subs += parseInt(RegExp.$1); if(td[i-1].innerHTML.match(/\[\*\]/)) updated++; } else if(td[i].className=='catbg' && td[i].innerHTML.match(/a name/i)) categories++; else if(td[i].innerHTML.match(/<b>Info Center<\/b>/i) && td[i].parentNode.parentNode.parentNode.className == 'bordercolor' && td[i].parentNode.parentNode.parentNode.width == '100%') { td[i].parentNode.parentNode.className = 'infocenter'; var iCell = td[i].getElementsByTagName('td'); var iHolder = ''; var posts = td[i].innerHTML.match(/Total Posts: (.+?)</)? parseInt(RegExp.$1.replace(/,/g,'')) : ''; var topics = td[i].innerHTML.match(/Total Topics: (.+?) &nb/)? parseInt(RegExp.$1.replace(/,/g,'')) : ''; var pb_date = td.item(2).getElementsByTagName('font').item(0).innerHTML.split(/<br>/i)[1]; if(pb_username == 'Guest') var pms = 'Please <a href="?action=login">Login</a> to access this feature.'; else var pms = 'You have <a href="?action=pm">'+ (td.item(2).innerHTML.match(/, (\d+) are new./)? +RegExp.$1+' Unread Messages</a>' : '1 Unread Message</a>'); var members = iCell[5].innerHTML.match(/Total Members: <a.+?>(.+?)<\/a>/i)? RegExp.$1 : 0; var newmember = iCell[5].innerHTML.match(/Newest Member: (<a.+?>.+?<\/a>)/i)? RegExp.$1 : 'N/A'; var lastpost = iCell[4].innerHTML.match(/Last Updated Topic: (<a.+?>.+?<\/a>)( )?by /i)? RegExp.$1 : 'N/A'; var lastposter = iCell[4].innerHTML.match(/<\/a>\s?by (<a.+?>.+?<\/a>)\s?\(/i)? 'By the Member: '+RegExp.$1 : (iCell[4].innerHTML.match(/by\s(.+?)\s\(/)? 'By the Guest '+RegExp.$1 : 'N/A'); var lastdate = iCell[4].innerHTML.match(/(.+\)(.+)?)?\((.+?at.+?)\)<br>View/i)? RegExp.$3 : 'N/A';
var totals = [ (td[i].innerHTML.match(/(Total Posts: .+?)</)? RegExp.$1 : ''), (td[i].innerHTML.match(/(Total Topics: .+?) &nb/)? RegExp.$1 : ''), ('Posts per Topic: '+ Math.round(posts / topics)), // ('Topics per Board: '+ Math.round(topics / boards)), ('Posts per Board: '+ Math.round(posts / boards)) ]; var stats = '<table width="100%"><tr><td width="100%" style="'+b['pad']+'">'; stats += '<div style="'+b['b']+'">'; for(t=0; t<totals.length; t++) { stats += '<span style="'+b['sep']+'">'+totals[t]+'</span>'; if(totals[t+1]) stats += '-'; } stats += '</div>'; stats += '<table width="100%"><tr><td width="40%" style="'+b['r']+'">'; stats += 'There are a total of '+members+' registered members.<br />'; stats += 'We would like to welcome '+newmember+' as the newest member to join '+document.title.split(/-/)[0]; stats += '</td><td width="30%" style="'+b['pad']+'">'; stats += 'The Last Post Made was: '+ lastpost+'<br />'; stats += 'Made On: '+lastdate+'<br />'; stats += lastposter; stats += '</td></tr></table>'; stats += '</td></tr></table>'; iCell[0].getElementsByTagName('b').item(0).innerHTML = titles[0]; iCell[1].getElementsByTagName('b').item(0).innerHTML = titles[1]; iCell[3].innerHTML = stats; iCell[3].colSpan = '2'; iCell[2].style.display = 'none'; // Head & Base Images var infoTable = td[i].parentNode.parentNode.parentNode; if(style[2].match(/^http:\/\//i)) { var headCenter = document.createElement('center'); var headImg = document.createElement('img'); headImg.src = style[2]; headCenter.appendChild( headImg ); infoTable.parentNode.insertBefore(headCenter, infoTable) } if(style[3].match(/^http:\/\//i)) { var baseCenter = document.createElement('center'); var baseImg = document.createElement('img'); baseImg.src = style[3]; baseCenter.appendChild( baseImg ); infoTable.parentNode.insertBefore(baseCenter, infoTable.nextSibling) } // Birthdays and Events var events = ''; events += '<table width="100%"><tr><td width="100%" style="'+b['b']+'"><font size="1">'; var events_str = ''; var x = iCell.length - 5; if(iCell[x].innerHTML.match(/action=calendarview/)) { var totalEvents = iCell[x].getElementsByTagName('a').length; var event_plural = (totalEvents == 1)? ['is',''] : ['are','s']; events_str += '<tr><td width="100%" style="'+b['b']+'">'; events_str += 'There '+event_plural[0]+' '+totalEvents +' event'+event_plural[1]+' this month.'; events_str += '</td><tr><tr><td width="100%" style="'+b['pad']+'">'; events_str += iCell[x].innerHTML; events_str += '</td><tr>'; iCell[x-2].style.display = 'none'; x-=4; } if(iCell[x].innerHTML.match(/((\d+) birthdays? today.)/)) { var memberBirthdays = parseInt(RegExp.$1); var allBirthdays = iCell[x].innerHTML.split(/<br>/i)[1]; if(iCell[x].innerHTML.match(/group\d+/)) { var staffBirthdays = 0; var a = iCell[x].getElementsByTagName('a'); for(l=0; l<a.length; l++) { if(a.item(l).className) { staffBirthdays++; memberBirthdays--; } } var staff_plural = (staffBirthdays == 1)? ['is',''] : ['are','s']; events += 'There '+staff_plural[0]+' '+staffBirthdays+' staff member'+staff_plural[1]+' celebrating their birthday'+staff_plural[1]+' today. '; } if(memberBirthdays != 0) { var member_plural = (memberBirthdays == 1)? ['is',''] : ['are','s']; events += 'There '+member_plural[0]+' '+memberBirthdays+' member'+member_plural[1]+' celebrating their birthday'+member_plural[1]+' today. '; } if(memberBirthdays != 0 || staffBirthdays != 0) { events += '</font></td></tr><tr><td width="100%" style="'+b['pad']+'">'; events += '<font size="1">'+allBirthdays; } iCell[x-2].style.display = 'none'; if(events_str.length > 0) { iCell[x-1].parentNode.style.display = 'none'; iCell[x-3].parentNode.style.display = 'none'; } else x-=4; } if(events.length > 120 || events_str.length > 0) { x+=4; events += '</td></tr>'+ events_str +'</table>'; iCell[x-3].getElementsByTagName('b').item(0).innerHTML = titles[2]; iCell[x-1].colSpan = '2'; iCell[x-1].innerHTML = events; } // Users Online var z = iCell.length - 1; var a = iCell[z].getElementsByTagName('a'); var onlineTotals = ''; for(j=0; j<a.length; j++) { for(s=0; s<staff.length; s++) { if(!staff[s][2]) staff[s][2] = ''; groupCount = (staff[s][3])? staff[s][3] : 0; if(a[j].className && a[j].className.match(new RegExp('group'+staff[s][1]+'$'))) { groupCount++; } staff[s][3] = groupCount; } } var mostOn = iCell[z].innerHTML.match(/(M.{15}e was .+<br>)/i)? RegExp.$1 : ''; var totalOn = 0; for(s=0; s<staff.length; s++) { staff[s][3] = (staff[s][3])? staff[s][3] : 0; onlineTotals += '<font color="'+staff[s][2]+'">'+ staff[s][3] +' '+staff[s][0]+'</font><br />'; totalOn += parseInt(staff[s][3]); } iCell[z].innerHTML.match(/((\d+) Member(s)?),/) onlineTotals += RegExp.$1 +'<br />'; totalOn += parseInt(RegExp.$2); if(iCell[z].innerHTML.match(/ ((\d+) Invisible) User(s)?./)) { onlineTotals += RegExp.$1 + ' Member' + RegExp.$3 +'<br />'; totalOn += parseInt(RegExp.$2); } if(iCell[z].innerHTML.match(/((<a.+?>)?(\d+) Guest(s)?(<\/a>)?)(\.|\,)/i)) { onlineTotals += RegExp.$1 +'<br />'; totalOn += parseInt(RegExp.$3); } var usersOnline = '<table width="100%"><tr><td vAlign"top" width="28%" rowSpan="3" style="'+b['r']+'">'; usersOnline += onlineTotals; usersOnline += '</td><td width="72%" style="'+b['pad']+b['b']+'">'; usersOnline += 'There are currently '+totalOn+' members online. '+mostOn; usersOnline += '</td></tr><tr><td vAlign="top" width="82%" style="'+b['pad']+b['b']+'">'; usersOnline += iCell[z].innerHTML.split(/<br>/i)[1]; usersOnline += '</td></tr><tr><td style="'+b['pad']+'">'; usersOnline += pms; if(startDate[0] && startDate[0].match(/\d+/)) usersOnline += ' &nb'+'sp; - &nb'+'sp; Forum Age: '+age; if(motm[0].match(/\w+/)) usersOnline += ' &nb'+'sp; - &nb'+'sp; The member of the month is <a href="?action=viewprofile&user='+motm[0]+'">'+motm[1]+'</a>'; usersOnline += '</td></tr></table>'; iCell[z-3].getElementsByTagName('b').item(0).innerHTML = titles[3]; iCell[z-2].style.display = 'none'; iCell[z-1].colSpan = '2'; iCell[z-1].innerHTML = usersOnline; } } } //--> </script>
|
|
|
Post by HollymCombs on Aug 16, 2007 20:43:36 GMT
Sorry, I got cut off lol . The codes are long. I didn't know there was a message character limit lol. Main footer (this is another infocenter code to try); <script type="text/javascript"> /*Ultimate Info Center V2.5 Created by hey Do not repost and keep header incact */
//Edit These Variables var adminColor = '700000'; var gmodColor = '007000'; var modColor = '700070'; var memColor = '000070';
//Do Not Edit Anything Below This Line var td = document.getElementsByTagName('td'); var ivf = document.getElementsByTagName('font'); var iupdated = 0; var iboards= 0; var icategories = 0; var iuvb = 0; var imod = 0; var iemod = 0; var iadmin = 0; for(t=0;t<td.length;t++){ if(td[t].className.match(/welcomebg/i)){ var iscreenname = pb_displayname; var itotalm = (td[t].innerHTML.match(/you have (.+?),/i)) ? RegExp.$1: ''; var inewm = (td[t].innerHTML.match(/<\/a>, (.+?) new/i)) ? RegExp.$1: '';} if(td[t].width=="66%" && td[t].className.match(/windowbg2/i)){ iboards++;} for(u=0;u<ivf.length;u++){ if(ivf[u].size=="1" && ivf[u].innerHTML.match(/- (\d+) viewing/i)){ var iuvb = parseInt(RegExp.$1);}} if(td[t].className.match(/catbg/i) && !td[t].innerHTML.match(/Users Online|Forum Statistics|=markallboardsread/i)){icategories++;} if(td[t].className.match("windowbg") && td[t].width=="20" && td[t].vAlign=="middle"){ td[t].style.display="none"} if(td[t].className=="windowbg2" && td[t].width=="24%" && td[t].innerHTML.match(/<b>Today<\/b>/i)){ iupdated++;} if(td[t].className.match(/catbg/i) && td[t].innerHTML.match(/Forum Statistics/i)){ var itopics = (td[t+2].innerHTML.match(/Total Topics: (\d+)(,\d+)? &/i)) ? RegExp.$1+RegExp.$2: ''; var iposts = (td[t+2].innerHTML.match(/Total Posts: (\d+)(,\d+)?<br/i)) ? RegExp.$1+RegExp.$2: ''; var imembers = (td[t+2].innerHTML.match(/Total Members: (.+?)<br/i)) ? RegExp.$1: ''; var inewmem = (td[t+2].innerHTML.match(/Newest Member: (.+?)<\/a>/i)) ? RegExp.$1: ''; var ilastpost = (td[t+2].innerHTML.match(/Last Updated Topic: (.+?) by/i)) ? RegExp.$1: ''; var ilastuser = (td[t+2].innerHTML.match(/by (.+?) \(/i)) ? RegExp.$1: ''; var ilastdate = (td[t+2].innerHTML.match(/\((.+?)\)\s?<br/i)) ? RegExp.$1: ''; if(td[t+2].innerHTML.match(/Your Private Messages:/i)){ var iwlcm = 'Welcome back, '+iscreenname+'. You have '+itotalm+' total, '+inewm+' new.';} else{ var iwlcm = 'Welcome to the forums, Guest. Please <a href="?action=login">Login</a> or <a href="?action=register">Register</a>.';} td[t+2].innerHTML='<table align="left" border="0" width="20%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" border="0" width="100%"><tr><td class="windowbg" align="left" colspan="4" width="100%">Posts: '+iposts+'<br />Topics: '+itopics+'<br />Members: '+imembers+'<br />Updated Boards: '+iupdated+'</td></tr></table></td></tr></table><table align="right" border="0" width="79%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" border="0" width="100%"><tr><td class="windowbg" align="left" colspan="4" width="100%">Last Post: '+ilastpost+' by '+ilastuser+' on '+ilastdate+'.<br /><a href="/index.cgi?action=recent">View the Most Recent Posts</a>.<br />Newest Member to the forums: '+inewmem+'</a><br />'+iwlcm+'</td></tr></table></td></tr></table><br /><br /><br /><br /><br /><table align="left" border="0" width="20%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" border="0" width="100%"><tr><td class="windowbg" align="left" colspan="4" width="100%">Boards: '+iboards+'<br />Categories: '+icategories+'</td></tr></table></td></tr></table><table align="right" border="0" width="79%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" border="0" width="100%"><tr><td class="windowbg" align="left" colspan="4" width="100%" valign="top">There are '+iuvb+' viewing inside the forums.<br />[<font color="'+adminColor+'">Administrator</font>] - [<font color="'+gmodColor+'">Elite Moderator</font>] - [<font color="'+modColor+'">Moderator</font>] - [<font color="'+memColor+'">Member</font>]</td></tr></table></td></tr></table>';} if(td[t].className.match(/catbg/i) && td[t].innerHTML.match(/Today's Birthdays/i)){ var itotalbday = (td[t+2].innerHTML.match(/(\d+) birthday/i)) ? RegExp.$1: ''; var imembday = td[t+2].innerHTML.split(/today.<br/i)[1]; td[t+2].innerHTML='<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><table align="left" border="0" width="20%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" border="0" width="100%"><tr><td class="windowbg" align="left" colspan="4" width="100%">Birthdays: '+itotalbday+'</td></tr></table></td></tr></table><table align="right" border="0" width="79%" cellspacing="0" cellpadding="0" class="bordercolor" height="100%"><tr><td><table cellpadding="4" cellspacing="1" border="0" width="100%" height="100%"><tr><td class="windowbg" valign="top" colspan="4" width="100%" height="100%">'+imembday+'</td></tr></table></td></tr></table></td></tr></table>';} if(td[t].className.match(/catbg/i) && td[t].innerHTML.match(/Events This Month/i)){ var imevents = td[t+2].innerHTML.split(/<\/font>/i)[0]; td[t+2].innerHTML='<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><table align="center" border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor" height="100%"><tr><td><table cellpadding="0" cellspacing="1" border="0" width="100%" height="100%"><tr><td class="windowbg" valign="top" colspan="4" width="100%">'+imevents+'</td></tr></table></td></tr></table></td></tr></table>';} if(td[t].className.match(/catbg/i) && td[t].innerHTML.match(/Users Online/i)){ var imemon = td[t+2].innerHTML.split(/<br\s?\/?>/i)[1]; var imem = (td[t+2].innerHTML.match(/(\d+) Member/i)) ? RegExp.$1: ''; var iguest = (td[t+2].innerHTML.match(/(\d+) Guest/i)) ? RegExp.$1: ''; if(td[t+2].innerHTML.match(/Most users online was (\d+), (.+?)<br/i)){ var imostonline = RegExp.$1; var imostdate = RegExp.$2;} var ilinka = td[t+2].getElementsByTagName('a'); for(i=0;i<ilinka.length;i++){ if(ilinka[i].className == 'group1'){iadmin ++;} if(ilinka[i].className == 'group2'){iemod ++;} if(ilinka[i].className == 'group3'){imod ++;}} var itotalonline = parseInt(iadmin) + parseInt(iemod) +parseInt(imod) + parseInt(imem); if(document.cookie.match(/user=admin/i)){ var iguestlinka = '<a href="javascript:popWindow(\'viewguests\')">'; var iguestlinkb = '</a>';} else {var iguestlinka = ''; var iguestlinkb = '';} td[t+2].innerHTML='<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><table align="left" border="0" width="20%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" border="0" width="100%"><tr><td class="windowbg" align="left" colspan="4" width="100%">Administrators: '+iadmin+'<br />Global Moderators: '+iemod+'<br />Moderators: '+imod+'<br />Members: '+imem+'<br />'+iguestlinka+'Guests: '+iguest+''+iguestlinkb+'</td></tr></table></td></tr></table><table align="right" border="0" width="79%" cellspacing="0" cellpadding="0" class="bordercolor" height="100%"><tr><td height="75"><table cellpadding="4" cellspacing="1" border="0" width="100%" height="100%"><tr><td class="windowbg" align="top" colspan="4" width="100%" height="20">There are '+itotalonline+' users online. The most users online was '+imostonline+' on '+imostdate+'.</td></tr><tr><td class="windowbg" valign="top" colspan="4" width="100%" height="100%">'+imemon+'</td></tr></table></td></tr></table></td></tr></table>';}} </script>
|
|
|
Post by Marleen on Aug 16, 2007 20:45:41 GMT
Sorry, I got cut off lol . The codes are long. I didn't know there was a message character limit lol. Me neither... Hang on I'll check the codes... I think the first one looks a bit odd.... What exactly are they for?
|
|
|
Post by HollymCombs on Aug 16, 2007 20:48:06 GMT
I'll try to explain, but you'll see what I mean when you put them in lol. Basically they change the layout of the infocenter (which is at the bottom of the forum, I'm pretty sure you knew that but I'm just putting it to be safe lol ). And it sort of just adds information, and that kind of thing. It makes them look better in my opinion lol, but you'd have to try them out one by one. But I would put in that first code that I gave you to center the category title text. That one I think will look really good .
|
|
|
Post by Marleen on Aug 16, 2007 20:49:54 GMT
I did use that one to center it...Okay I'll try them out...
|
|
|
Post by Marleen on Aug 16, 2007 20:51:35 GMT
Hmm... I dont see the difference when I put the first one in... I honestly don't really like the second one, so I'll try the third now, and then make my decision
|
|
|
Post by HollymCombs on Aug 16, 2007 20:56:31 GMT
Really? I just looked and I see a HUGE difference lol. Take it out and look again . Okay, now this is the last code that I am going to suggest lol, so I'll stop bugging you . <script type="text/javascript"> <!-- /* remove info center titlebg */ var td=document.getElementsByTagName("td"); if(location.href.match(/(cgi\??(#.+)?|com\/?|logout|sread)$/)){ for(i=0;i<td.length;i++){ if(td[i].className=="titlebg" && td[i].innerHTML.match(/Info\sCenter/i)){ td[i].parentNode.style.display="none"; } } } // --> </script> That will take out the infocenter bar at the bottom of the forum. I personally don't like how it looks, but that's your choice of course. Again, everything that I have posted are just suggestions! If you don't like them then just take them lol .
|
|
|
Post by Marleen on Aug 16, 2007 21:00:21 GMT
Yea I know what you mean.. I saw a huge difference but it was the second code. I personally don't like it any better than the way it is without a code... Not even the third one lol. Unless you have a way of getting the first one to work for me to try it out, im gonna delete them again...
Sorry if i seem rude, but I really need my bed, lol
|
|
|
Post by HollymCombs on Aug 16, 2007 21:03:27 GMT
You don't seem rude at all . As I said they are only suggestions, so you can take or reject whichever ones you want. It's all personal preference! I have no idea why the first one doesn't work. I tried it out on my test forum and it didn't work there either. Oh well! lol
|
|
|
Post by Marleen on Aug 16, 2007 21:04:48 GMT
Ah well, I changed it back now, I just liked the way it was before better, but thanks for all the help anyway ;D I think I have everything I need now ;D
|
|
|
Post by HollymCombs on Aug 16, 2007 21:06:24 GMT
Great . If you need any other codes just post up! Oh one question. I believe you may have been using a code for this before, that's why I'm asking. was the "Shortcut to Quick Reply box: Alt+Q. Shortcut to post message: Alt+S." there before down by the Quick Reply? Or was the "Post Reply" thing centered without that there? Because I know a code that can fix that too lol .
|
|
|
Post by Marleen on Aug 16, 2007 21:15:40 GMT
You're right, the "Shortcut to Quick Reply box: Alt+Q. Shortcut to post message: Alt+S." wasn´t there before... If you could remove that, yes please... You're brilliant! Oh yes, have you got the code to change "karma" into "Reputation " and Exalt into "Give" and Smite into "Take" We used to have that... If you have that too you'd be even greater ;D
|
|