russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 6, 2010 15:50:44 GMT
I made this for vForums and just converted it across <!-- Coded By Russell tv.vforums.co.uk --> <style type="text/css"> #pmmm{ position:absolute; bottom:0px; background-color:#000000; /*Edit here*/ color:#ffffff;/*Edit here*/ position: fixed; bottom: 0px; right: 0px; left: 0px; margin: 0px; padding-top: 5px;/*Edit here*/ width: 100%; /*Edit here*/ height: 35px; /*Edit here*/ z-index: 9999; -moz-opacity:.50; filter:alpha(opacity=50); opacity:.50; display:none; } </style>
<div id="pmmm"></div>
<script type="text/javascript"> var vfiPB=document.getElementsByTagName("td"); if(vfiPB[2].innerHTML.match(/action=pm">(\d+)\s/i)) { var total_pms = RegExp.$1 } if(vfiPB[2].innerHTML.match(/, (\d+)\ (are|is) new./i)){ var new_pms = RegExp.$1 } if( new_pms != "0" && pb_username != "Guest" ){ document.getElementById("pmmm").style.display="block"; var pmbb = "Hello "+pb_displayname+" [<a href='/index.cgi?action=viewprofile'>View Profile</a> | <a href='/index.cgi?action=modifyprofile&user="+pb_username+"'>Edit Profile</a>] [Messages <a href='/index.cgi?action=pm'>"+new_pms+"</a> New "+total_pms+" Old]"; document.getElementById("pmmm").innerHTML = pmbb; } </script>
Preview : mirrorimg.net/images/5go8zbk4bk.jpegOnly shows when you have new messages and slides down with you, all editable in the css above Headers
|
|
russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 6, 2010 20:45:39 GMT
Sorry just to say its been fixed if( new_pms != "0" && pb_username != "Guest" ){
|
|
John Wankel
Elite Poster
Coding for you one step at a time[M:0]
Posts: 399
|
Post by John Wankel on Nov 6, 2010 21:57:37 GMT
I like this code, but you would have to style it right as the links seem to blend in with the background and yeah, I can't see them on that picture well.
|
|
|
Post by Nightwalker on Nov 6, 2010 22:56:36 GMT
Hey russell do you mind if i play with this idea? You will be given credit
|
|
russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 6, 2010 23:02:48 GMT
Sure go ahead
|
|
CåñåÐå™
Senior Poster
[M:0]
v5 Beta Tester
Posts: 74
|
Post by CåñåÐå™ on Nov 9, 2010 20:26:27 GMT
Nice code, it works fine on my forum .
|
|
|
Post by Nightwalker on Nov 10, 2010 3:38:58 GMT
Russel you can see the code i made with this on NightCodes
|
|
russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 10, 2010 9:33:26 GMT
Looks good i like it.
|
|
edenwax
VIP
v5 Beta Tester[M:5000]
Posts: 1,266
|
Post by edenwax on Nov 14, 2010 8:02:51 GMT
Could there be an edit where instead of it popping up for new pm's, it stays viewable at all times?
|
|
russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 14, 2010 21:29:09 GMT
Sure would you want anything to appear for guests?
|
|
russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 14, 2010 21:42:52 GMT
If just for members and all the time just have this:
<!-- Coded By Russell tv.vforums.co.uk --> <style type="text/css"> #pmmm{ position:absolute; bottom:0px; background-color:#000000; /*Edit here*/ color:#ffffff;/*Edit here*/ position: fixed; bottom: 0px; right: 0px; left: 0px; margin: 0px; padding-top: 5px;/*Edit here*/ width: 100%; /*Edit here*/ height: 35px; /*Edit here*/ z-index: 9999; -moz-opacity:.50; filter:alpha(opacity=50); opacity:.50; display:none; } </style>
<div id="pmmm"></div>
<script type="text/javascript"> var vfiPB=document.getElementsByTagName("td"); if(vfiPB[2].innerHTML.match(/action=pm">(\d+)\s/i)) { var total_pms = RegExp.$1 } if(vfiPB[2].innerHTML.match(/, (\d+)\ (are|is) new./i)){ var new_pms = RegExp.$1 } if( pb_username != "Guest" ){ document.getElementById("pmmm").style.display="block"; var pmbb = "Hello "+pb_displayname+" [<a href='/index.cgi?action=viewprofile'>View Profile</a> | <a href='/index.cgi?action=modifyprofile&user="+pb_username+"'>Edit Profile</a>] [Messages <a href='/index.cgi?action=pm'>"+new_pms+"</a> New "+total_pms+" Old]"; document.getElementById("pmmm").innerHTML = pmbb; } </script>
|
|
rubix
Elite Level 1
Rage[M:4750]
Posts: 670
|
Post by rubix on Nov 15, 2010 9:50:29 GMT
Is there a way to make it fix to the top instead of the bottom?
EDIT: and make it auto hide?
|
|
russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 15, 2010 10:02:19 GMT
auto hide? please let me know what you mean by this.... <!-- Coded By Russell tv.vforums.co.uk --> <style type="text/css"> #pmmm{ position:absolute; top:0px; background-color:#000000; /*Edit here*/ color:#ffffff;/*Edit here*/ position: fixed; bottom: 0px; right: 0px; left: 0px; margin: 0px; padding-top: 5px;/*Edit here*/ width: 100%; /*Edit here*/ height: 35px; /*Edit here*/ z-index: 9999; -moz-opacity:.50; filter:alpha(opacity=50); opacity:.50; display:none; } </style>
<div id="pmmm"></div>
<script type="text/javascript"> var vfiPB=document.getElementsByTagName("td"); if(vfiPB[2].innerHTML.match(/action=pm">(\d+)\s/i)) { var total_pms = RegExp.$1 } if(vfiPB[2].innerHTML.match(/, (\d+)\ (are|is) new./i)){ var new_pms = RegExp.$1 } if( new_pms != "0" && pb_username != "Guest" ){ document.getElementById("pmmm").style.display="block"; var pmbb = "Hello "+pb_displayname+" [<a href='/index.cgi?action=viewprofile'>View Profile</a> | <a href='/index.cgi?action=modifyprofile&user="+pb_username+"'>Edit Profile</a>] [Messages <a href='/index.cgi?action=pm'>"+new_pms+"</a> New "+total_pms+" Old]"; document.getElementById("pmmm").innerHTML = pmbb; } </script> that should be at the top now
|
|
rubix
Elite Level 1
Rage[M:4750]
Posts: 670
|
Post by rubix on Nov 15, 2010 11:04:20 GMT
Auto hide, When you move your mouse near it, it opens, then when you movie your mouse away, it disappears again?
|
|
rubix
Elite Level 1
Rage[M:4750]
Posts: 670
|
Post by rubix on Nov 15, 2010 11:06:45 GMT
Also, your last edit of the code. Does it also stay there without any new PMs?
|
|
russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 15, 2010 11:29:17 GMT
The last edit only show when new pms, if you want it to slide in/out on mouseover give me a couple of minutes and i'll make a fix for that before that can just just let me know what you want it to say 1: for guests 2: for members without a new pm £: members with new pm messages.
|
|
rubix
Elite Level 1
Rage[M:4750]
Posts: 670
|
Post by rubix on Nov 15, 2010 11:40:32 GMT
Ok, I would like it exactly how it is and only show for members. Make it a mouse over auto hide. And is always visible whether or not you have a new PM
|
|