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]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | 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 | |
|
dog199200 Guest | Re: Display Name Calling (10th Jul 08 at 6:44pm UTC) | | doesint work, all i see is the syntax | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | 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 | |
|