Noche
New Member
Noob and newbie
Posts: 108
inherit
155521
0
Dec 15, 2023 6:37:45 GMT -8
Noche
Noob and newbie
108
June 2010
sod
|
Post by Noche on Apr 22, 2013 7:20:48 GMT -8
So Im not great with codes, so this may or may not be pretty simple.
Before V5 there was a code which allowed you to place member info anywhere, like in a side table with avatar above (the Avatar code, do I have allready)
I found a nice sidetables plugin code which is working fine, but I would like to have the member info as usual in the side. The old code looks something like this:
Part that goes in sidetable:
<center><b><span id="my_name"></span></b></center><br> <span id="my_avatar"></span><br><br> <span id="my_time"></span><br> <span id="my_PMs"></span><br>
Part that goes in Global Footer:
<script type="text/javascript"> /* Member Information Anywhere by SubDevo */ /* Global Footer - Please leave this header intact. Do not repost. */ /* [url]http://interoceandesigns.com[/url] or [url]http://lsdp.proboards.com[/url] */
function gID(a,b){var n=document.getElementById(a); if(n){n.innerHTML=b;}} var n=document.getElementsByTagName("font"),m="<a href='index.cgi?action=",a,x=0; while(!(n[x].parentNode.nodeName=="P"&&/Hey,\s|Welcome\s/.test(n[x].innerHTML))&&x<n.length){x++;} if(pb_username!="Guest"){ var pmMsg; a=n[x].getElementsByTagName("a")[0]; pmMsg="("+m+"pm'>"+a.innerHTML.split(" ")[0]+" total | "+a.nextSibling.data.split(" ")[1]+" new</a>)"; }else{pmMsg="("+m+"login'>Login</a>"+" | "+m+"register'>Register</a>)";} gID("my_time",n[x].lastChild.data); gID("my_name",pb_displayname); gID("my_PMs",pmMsg); </script>
Hope anyone can help! Thanks
|
|
Noche
New Member
Noob and newbie
Posts: 108
inherit
155521
0
Dec 15, 2023 6:37:45 GMT -8
Noche
Noob and newbie
108
June 2010
sod
|
Post by Noche on Apr 22, 2013 7:58:20 GMT -8
I need the code to go in my plugin sidetable
|
|
Noche
New Member
Noob and newbie
Posts: 108
inherit
155521
0
Dec 15, 2023 6:37:45 GMT -8
Noche
Noob and newbie
108
June 2010
sod
|
Post by Noche on Apr 28, 2013 3:04:49 GMT -8
Bump
|
|
Noche
New Member
Noob and newbie
Posts: 108
inherit
155521
0
Dec 15, 2023 6:37:45 GMT -8
Noche
Noob and newbie
108
June 2010
sod
|
Post by Noche on Aug 5, 2013 10:34:42 GMT -8
Bump
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Aug 5, 2013 13:22:19 GMT -8
Something like this?
<center><b><span id="my_name"></span></b></center><br> <span id="my_avatar"></span><br><br> <span id="my_time"></span><br> <span id="my_PMs"></span><br>
<script type="text/javascript"> <!-- // Global Footer!! if(proboards.data('user').is_logged_in == 1) { document.getElementById('my_name').innerHTML = proboards.data('user').name; document.getElementById('my_avatar').innerHTML = proboards.data('user').avatar; var ampm = ''; var date = new Date(proboards.data('serverDate')); var hours = date.getHours(); var minutes = date.getMinutes(); if(proboards.data('user').time_format == '12hr') { if(hours > 12){hours = hours-12; ampm = 'pm';} else{ampm = 'am';} } document.getElementById('my_time').innerHTML = hours+':'+minutes+ampm; if(proboards.data('user').has_new_messages == 1) { var nm = document.getElementsByTagName('a'); for(n=0; n<nm.length; n++){if(nm[n].href.match(/inbox/)){nm=nm[n];break;}} nm = nm.getElementsByTagName('div')[1].innerHTML; document.getElementById('my_PMs').innerHTML = 'You have '+nm+' new message(s)'; } else { document.getElementById('my_PMs').innerHTML = 'You have no new messages'; } } else { document.getElementById('my_name').innerHTML = 'Welcome Guest'; var ampm = ''; var date = new Date(proboards.data('serverDate')); var hours = date.getHours(); var minutes = date.getMinutes(); if(hours > 12){hours = hours-12; ampm = 'pm';} document.getElementById('my_time').innerHTML = hours+':'+minutes+ampm; document.getElementById('my_PMs').innerHTML = document.getElementById('welcome').innerHTML; } // --> </script>
|
|
Noche
New Member
Noob and newbie
Posts: 108
inherit
155521
0
Dec 15, 2023 6:37:45 GMT -8
Noche
Noob and newbie
108
June 2010
sod
|
Post by Noche on Aug 6, 2013 1:59:44 GMT -8
Yes! Thank you!
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Aug 6, 2013 11:34:13 GMT -8
No worries..
|
|
inherit
tunesrcoolii@gmail.com
86185
0
Oct 3, 2013 8:48:20 GMT -8
tunescool
4,399
August 2006
tunescool
|
Post by tunescool on Aug 8, 2013 2:56:35 GMT -8
todge it doesnt work unless you use all the spans, what if i just want to use one or two
|
|
inherit
tunesrcoolii@gmail.com
86185
0
Oct 3, 2013 8:48:20 GMT -8
tunescool
4,399
August 2006
tunescool
|
Post by tunescool on Aug 13, 2013 1:31:18 GMT -8
todge it doesnt work unless you use all the spans, what if i just want to use one or two
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 13, 2013 1:37:40 GMT -8
remove the lines that start like
document.getElementById('my_PMs')
for the spans you dont want to use
|
|
inherit
tunesrcoolii@gmail.com
86185
0
Oct 3, 2013 8:48:20 GMT -8
tunescool
4,399
August 2006
tunescool
|
Post by tunescool on Aug 13, 2013 2:19:57 GMT -8
thanks wormer, im not sure of what part to take out for all the PM stuff tho and i think its for only when the time is 0something but it displays this, 5:11 works fine
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 13, 2013 3:13:24 GMT -8
var minutes = ('0'+date.getMinutes()).slice(-2);
|
|
inherit
tunesrcoolii@gmail.com
86185
0
Oct 3, 2013 8:48:20 GMT -8
tunescool
4,399
August 2006
tunescool
|
Post by tunescool on Aug 18, 2013 21:18:01 GMT -8
now it does this if its 12
|
|
inherit
tunesrcoolii@gmail.com
86185
0
Oct 3, 2013 8:48:20 GMT -8
tunescool
4,399
August 2006
tunescool
|
Post by tunescool on Aug 22, 2013 13:17:55 GMT -8
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Aug 23, 2013 11:37:56 GMT -8
Try replacing..
var minutes = date.getMinutes();
with
var minutes = date.getMinutes(); if(minutes.length<2){minutes = '0'+minutes;}
|
|