1
adrock
Need some help with CBB 3.01
  • 2006/4/18 4:40

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


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:

<div class="comText"><{$topic_post.post_text}></div>

// added the next line
<{if !$xoops_isuser}>

<{if $topic_post.post_attachment}>
<div class="comText"><{$topic_post.post_attachment}></div>
<{/if}>

// added the next 2 lines
<{else}>
<div class="comText">Sorry, you must be logged in to see the images.</div>
<{/if}>

<br style="clear:both;" />


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)
Affordable Web Hosting - Family - Fun!...and not always in that order!

2
gestroud
Re: Need some help with CBB 3.01
  • 2006/4/18 5:41

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


You always come up with some real challenges

3
adrock
Re: Need some help with CBB 3.01
  • 2006/4/18 7:01

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


thats what makes it fun!

(I've tried the code with and without the exclamation point)

usually, when I try something like this and do it wrong, I get a blank page, or boat loads of errors....which is what makes this odd, is that everything is working just fine.

I've checked and done all of the usual 'Doh!' things....clearing the cache, actually editing the html files in the module and updating it from the admin side...edited the default and custom template sets from within xoops.....cleared the templates cache folders.

taking a break right now, but will start looking through all of the files again to see if I'm missing anywhere else that the $topic_post.post_attachment is called out.

it's a nice feature that can help increase membership on shareware and gaming/clan sites etc. and I've posted a request for it to be added to the features, but as usual, am impatient and want to do it now!
Affordable Web Hosting - Family - Fun!...and not always in that order!

4
adrock
Re: Need some help with CBB 3.01
  • 2006/4/19 3:16

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


bumpety bump!
Affordable Web Hosting - Family - Fun!...and not always in that order!

Login

Who's Online

182 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 182


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits