vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] Display Name Calling - View Topic
Topic Rating: *****
Printable View
This topic was locked 10th Jul 08 at 6:56pm by Michael
dog199200
Guest
[F] Display Name Calling (9th Jul 08 at 7:37pm UTC)
Can i get a code that will allow me to past something like this [username] and it will show the displayname of the person that is viewing the forum, i'm asking this because it would work perfectly in an newsfader.
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Display Name Calling (10th Jul 08 at 9:04am UTC)
try this:

<script>
/* ##username## tag
Created By Wrighty
Do Not Rip,. Repost or Claim*/

var d = {
     d: get('td','tag'),
     i: function(){
          if(!location.href.match(/\/(admin|post|modify)/)){
               this.a();
          }
     },
     a: function(){
          for(i = 0; i < this.d.length; i++){
               if(this.d[i].innerHTML.match(/##username##/) && this.d[i].className.match(/window(1|2)/)){
                    this.d[i].innerHTML = this.d[i].innerHTML.replace(/##username##/g, vf_displayname);
               }
          }
     }
};
d.i();
</script>


Global Footer

use the syntax: ##username##

This code can be tested in the Test Board {Smile}
dog199200
Guest
Re: Display Name Calling (10th Jul 08 at 6:44pm UTC)
doesint work, all i see is the syntax
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Display Name Calling (10th Jul 08 at 6:50pm UTC)
Where are you testing it? And make sure you're typing it out instead of copying any of the ones that I have posted.


Sorted
 Printable View

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