vForums Support Banner


Visit Base Classics - Gaming Chairs

 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Guest Last Post Column Message - View Topic
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Guest Last Post Column Message (12th Apr 08 at 12:19pm UTC)
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
 Printable View

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