1
Hey all!
I'm trying to set up some if else statements for displaying attachments in a thread with CBB.
Essentially, what I am trying to do is allow anonymous users to read the posts, but not see the attachments. I want them to log in to see/access the attachments, but need to let people read the text of the post without being logged in.
So...I thought 'hmmm...maybe I can do it like I do in the theme for the admin menu'.
I have made these changes to the newbb_thread.html and newbb_item.html template files being used, but it isn't working (when viewing the site anonymously, I can still see the attachments).
Quote:
<{$topic_post.post_text}>
// added the next line
<{if !$xoops_isuser}>
<{if $topic_post.post_attachment}>
<{$topic_post.post_attachment}>
<{/if}>
// added the next 2 lines
<{else}>
Sorry, you must be logged in to see the images.
<{/if}>
Anyone know off hand anywhere else I would need to do this in order for it to work?
Anyone know if there's a reason why the idea wouldn't work?
Any and all help is much appreciated!
(This is CBB3.01 installed in XOOPS 2.0.13.2)