Forums / Cotonti / Skins / Quote Button

Twiebie
#1 2011-04-02 03:47

I'm trying to get a seperate Quote button below every post but I have a problem with the button still being displayed when a user is not logged in.

In forum.posts.tpl I have the following now:

<p>FORUMS_POSTS_ROW_TEXT}</p>
{FORUMS_POSTS_ROW_UPDATEDBY}
<div class="quote_button">
  {FORUMS_POSTS_ROW_QUOTE}
</div>

I tweaked the class "quote_button" to make it look like a button:
http://www.dev-enter.net/files/quote-button-logged.png

However when the user is not logged in, it's still showing a part of the button:
http://www.dev-enter.net/files/quote-button-notlogged.png

Is there a way to fix this so it's displaying nothing when a user is not logged in to post?

This post was edited by Twiebie (2011-04-02 03:51, 13 years ago)
Trustmaster
#2 2011-04-02 08:07

It's possibly if you explicitly substitute {FORUMS_POSTS_ROW_QUOTE} with the link:

<a href="forums.php?m=posts&s={PHP.s}&q={PHP.q}&quote={PHP.row.fp_id}&n=last#np">{PHP.L.Quote}</a>

 

May the Source be with you!
Twiebie
#3 2011-04-02 08:20

Thanks for the reply but it's not really a solution.

Replacing {FORUMS_POSTS_ROW_QUOTE} with the link you provided will still show the Quote button to guests that are not logged in.

Trustmaster
#4 2011-04-02 08:50

Sorry, I misunderstood you. If you want to hide the button from guests, use a conditional:

 

<p>FORUMS_POSTS_ROW_TEXT}</p>
{FORUMS_POSTS_ROW_UPDATEDBY}
<!-- IF {PHP.usr.id} > 0 -->
<div class="quote_button">
  {FORUMS_POSTS_ROW_QUOTE}
</div>
<!-- ENDIF -->

 

May the Source be with you!
Twiebie
#5 2011-04-02 08:58

Works perfectly, tnx!