vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: PM checker - View Topic
Topic Rating: *****
Printable View
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
PM checker (10th Jan 10 at 12:50am UTC)
Resolved
Global Header:
Code:
 
  1. <script type="text/javascript">
  2. funtion pm(){
  3.  
  4. var pmPost;
  5.  
  6. if(vf_new_pms == 0)
  7. {
  8. pmPost = "<a href="/action/pm"><img src="http://images.virtualforums.co.uk/unread.gif"></a>";
  9. } else {
  10. pmPost ="<a href="/action/pm"><img src="http://images.virtualforums.co.uk/read.gif"></a>";
  11. }
  12.  
  13.  
  14. return pmPost;
  15.  
  16. }
  17. </script>
 


In table:
Code:
 
  1. <script type="text/javascript">
  2. document.write(pm());
  3. </script>
 


This is supposed to determine if there are new PM's or not and show the correct image depending on the result

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: PM checker (10th Jan 10 at 12:57am UTC)
"<a href="/action/pm"><img src="http://images.virtualforums.co.uk/unread.gif"></a>";

That line is the problem. You need to escape double quotes within the double quotes, or simply use:

pmPost = '<a href="/action/pm"><img src="http://images.virtualforums.co.uk/unread.gif"></a>';

And change the other one! {Smile}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: PM checker (10th Jan 10 at 1:09am UTC)
I can't believe I made that mistake >.<

Edit: I fixed it but it is still not working

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: PM checker (10th Jan 10 at 1:17am UTC)
Post your changed version, and what the outcome is. You have to show the unread messages image if there's 0 new pms! O.o
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: PM checker (10th Jan 10 at 1:31am UTC)
Code:
 
  1. <script type="text/javascript">
  2. funtion pm(){
  3.  
  4. var pmPost;
  5.  
  6. if(vf_new_pms == 0)
  7. {
  8. pmPost = '<a href="/action/pm"><img src="http://images.virtualforums.co.uk/unread.gif"></a>';
  9. } else {
  10. pmPost = '<a href="/action/pm"><img src="http://images.virtualforums.co.uk/read.gif"></a>';
  11. }
  12.  
  13. return pmPost;
  14.  
  15. }
  16. </script>
 


There is no outcome

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: PM checker (10th Jan 10 at 1:43am UTC)
You misspelt the word 'function' you've spelt it funtion. {Wink}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: PM checker (10th Jan 10 at 1:53am UTC)
Oops

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: PM checker (10th Jan 10 at 1:54am UTC)
Working now? {Smile}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: PM checker (10th Jan 10 at 1:55am UTC)
Yep

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
 Printable View

All times are GMT+0 :: The current time is 4:36am
Page generated in 0.3519 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums