• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add-on First Post Only

Inkman

Active member
#1
Can anyone please create an add-on so guests can only read the first post of every thread.
I have seen other members requesting this but people just tell them to add a code here and there but i would like an add-on that would do this for you like vbulletin has.

It would be good that other posts under the first post has a sentence which says something like "to view other posts please register" or something along them lines.

Thanks in advance...
 

Jeremy

Well-known member
#2
These instructions are for the template message...

Find:
Code:
    <div class="messageInfo primaryContent">
Immediately after add:
Code:
    <xen:if is="{$post.position} != 0 AND {$visitor.user_id} > 0">
Find:
Code:
    </div>

    <xen:hook name="message_below" params="{xen:array 'post={$message}','message_id={$messageId}'}" />
Immediately before add:
Code:
    <xen:else />
<label for="LoginControl"><a href="{xen:link login}">Please log in or sign up to view this post.</a></label>
</xen:if>
Will restrict viewing of non-posts and open the form when clicked.
 

Inkman

Active member
#3
Thanks for your reply @King Kovifor Like i said above i didn't really want want a code, i wanted an addon to do this, the reason why is because i couldn turn it on and off quickly with that.
But seeing as i had no other replies i have just tried the code and its hiding the first post only from myself (admin) and i presume other usergroups. :(

What i need it to do is to show the first post only of every thread to guests and all other posts hidden with a login or register notice.
Hope you can help, thanks again.
 

Jon W

Well-known member
#5
Thanks for your reply @King Kovifor Like i said above i didn't really want want a code, i wanted an addon to do this, the reason why is because i couldn turn it on and off quickly with that.
But seeing as i had no other replies i have just tried the code and its hiding the first post only from myself (admin) and i presume other usergroups. :(

What i need it to do is to show the first post only of every thread to guests and all other posts hidden with a login or register notice.
Hope you can help, thanks again.
http://xenforo.com/community/resources/guests-first-post-only-by-waindigo.2143/