vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Guest Last Post Column Message

Guest Last Post Column Message - Posted By Michael (wrighty) on 12th Apr 08 at 12:19pm
This code will allow you to choose a message to display in the last post column when the user views as a guest and they don't have access to the board. The default is: "Please login or register". Change the part in red

<script>
/*Guest last post column message
Created By Wrighty
Don't: Rip, Repost or Claim!*/

var message = "Please <a href='/action/login'>Login</a> or <a href='/action/register'>Register</a>";

var d = get('td','tag');

if(vf_username=='guest'){
    for(i=0;i<d.length;i++){
        if(/lastpost/i.test(d[i].className) && d[i].firstChild && d[i].firstChild.innerHTML == ''){
            d[i].firstChild.innerHTML = message;
        }
    }
}
</script>


Global Footer