vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Question/Requests

[F] Question/Requests - Posted By CåñåÐå™ (canada) on 11th Apr 08 at 4:25am
I was wondering if possible are you guys going to put the code the one you have for the last post that says "Please Login to view this board" in to the database ?
Or would i have to request one {Smile} .

If i do have to requests one then i am requesting it please {Grin} .

Thanks guys. {Smile}

Re: Question/Requests - Posted By Michael (wrighty) on 11th Apr 08 at 6:43am
I'll get to this tonight if I have time! ^_^

You only want it for boards that have no posts in the last post column don't you? {Unsure}

Re: Question/Requests - Posted By CåñåÐå™ (canada) on 11th Apr 08 at 7:08am
Yes please Wrighty thanks {Smile} .

Re: Question/Requests - Posted By Michael (wrighty) on 11th Apr 08 at 1:37pm
This should do what you want! {Smile} If you want to, feel free to change the message at the top (part in red)

Any problems, let me know! ^_^

<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

Re: Question/Requests - Posted By CåñåÐå™ (canada) on 11th Apr 08 at 2:59pm
It works fine thank you Wrighty {Grin} .

Re: Question/Requests - Posted By Michael (wrighty) on 11th Apr 08 at 3:38pm
Welcome! {Cheesy}