vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Display Name Calling

[F] Display Name Calling - Posted By dog199200 (dog199200) on 9th Jul 08 at 7:37pm
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.

Re: Display Name Calling - Posted By Michael (wrighty) on 10th Jul 08 at 9:04am
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}

Re: Display Name Calling - Posted By dog199200 (dog199200) on 10th Jul 08 at 6:44pm
doesint work, all i see is the syntax

Re: Display Name Calling - Posted By Michael (wrighty) on 10th Jul 08 at 6:50pm
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