RBH
New Member
Posts: 55
inherit
33302
0
Dec 12, 2005 18:48:02 GMT -8
RBH
55
November 2004
ratherbehunting
|
Post by RBH on Jun 19, 2005 5:30:48 GMT -8
i love this code, but can you make it display that you have new pms? and can i use images instead of text? <script type="text/javascript"> //Check pm's in miniprofile made by Pleasehelp inspiration by blade www.proboards.com//Do not repost without permission of creator var TD=document.getElementsByTagName('td'); for(t=0;t<TD.length;t++){ if(TD[t].width=="20%" && TD[t].innerHTML.match(/Posts/i)){ TD[t].innerHTML+="<a href=/index.cgi?action=pm><font size=0><br>Check Pm's</font size></a>" }} </script>
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 19, 2005 5:37:41 GMT -8
See this line...
TD[t].innerHTML+="<a href=/index.cgi?action=pm><font size=0><br>Check Pm's</font size></a>"
Change it to...
TD[t].innerHTML += "<br /><a href='/index.cgi?action=pm'><img src='IMAGE URL' border='0' /></a>";
|
|
RBH
New Member
Posts: 55
inherit
33302
0
Dec 12, 2005 18:48:02 GMT -8
RBH
55
November 2004
ratherbehunting
|
Post by RBH on Jun 19, 2005 8:13:41 GMT -8
what about making it so it tells you when you have new pm's? basically its taking the hey, xxx, you have x messages and x are new and placing it in the miniprofile, just not in so many words. one image for new messages, and a different image for no new messages kinda thing. or even a flashing image when there is new messages, that would work. like the CHECK PM'S would be normal with no new messages but blink when you get one.
make any sense? ;D
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 19, 2005 8:19:29 GMT -8
Why do you need a link in every mini profile though? Because that's what it's doing. Every mini profile in the thread is going to have a link. Think of something better, maybe a better place for it, and so that it doesn't need to be repeated in every mini profile.
|
|
RBH
New Member
Posts: 55
inherit
33302
0
Dec 12, 2005 18:48:02 GMT -8
RBH
55
November 2004
ratherbehunting
|
Post by RBH on Jun 20, 2005 5:49:41 GMT -8
ok, i'll start over. this code already adds a link into every miniprofile anyways. what i was wondering is if it could be made to tell you when you have a new pm. right now the code adds a link to every miniprofile that says "check pm's". you click it, it goes to your messages. i was wondering if there was a way to get it to change from "check pm's" to "you have new pm's" when you actually get one.
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jun 21, 2005 1:14:40 GMT -8
This should do it. Edit the red with the URLs of your on (new Pms) and off (no new Pms) images.
<script type="text/javascript"> <!-- /* 'On' and 'Off' PMs in Mini-Profile */
var on="on.gif"; var off="off.gif";
var TD=document.getElementsByTagName('td'); for(t=0;t<TD.length;t++){ if(TD[t].width=="20%" && TD[t].innerHTML.match(/Posts/i) && TD[2].innerHTML.match(/Hey,/)){ if(TD[2].innerHTML.match(/0 are new/)){ var image=off;} else{var image=on;} TD[t].innerHTML+="<br\/><center><a href=/index.cgi?action=pm><img src='"+image+"' border='0' /></a><\/center>" }} //--> </script>
|
|
RBH
New Member
Posts: 55
inherit
33302
0
Dec 12, 2005 18:48:02 GMT -8
RBH
55
November 2004
ratherbehunting
|
Post by RBH on Jun 21, 2005 13:14:53 GMT -8
SWEET, thanks elindir! i will try it out this evening. header of footer............oh nevermind, i'll figure it out. THANKS!
|
|
RBH
New Member
Posts: 55
inherit
33302
0
Dec 12, 2005 18:48:02 GMT -8
RBH
55
November 2004
ratherbehunting
|
Post by RBH on Jun 22, 2005 5:21:24 GMT -8
ok, i spoke too soon. i cant figure it out! ;D
i have placed it in my headers and footers but neither way works for me.
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jun 22, 2005 5:56:40 GMT -8
ok, i spoke too soon. i cant figure it out! ;D i have placed it in my headers and footers but neither way works for me. You need to have changed the red bits to the URLS of your images and it should be in the Global Footer Can you post your URL?
|
|
RBH
New Member
Posts: 55
inherit
33302
0
Dec 12, 2005 18:48:02 GMT -8
RBH
55
November 2004
ratherbehunting
|
Post by RBH on Jun 22, 2005 13:27:00 GMT -8
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jun 22, 2005 14:11:14 GMT -8
It's working fine on my test board Might be a code conflict. Try moving it to the top of the Global Footer. And if that doesn't work, try moving it to the bottom.
|
|