1
limecity
CBB - hide attachment
  • 2009/3/25 4:48

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


How do I hide the attachment from unregistered users?

any simple way to hack it? template?

!=user group, no view?

hhttp://www.mounthiking.com
all your hiking gears and gadgets


2
ghia
Re: CBB - hide attachment
  • 2009/3/25 14:02

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Add a <{if $xoops_isuser}> in the template newbb_item at the attachement display.

3
limecity
Re: CBB - hide attachment
  • 2009/3/25 17:26

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


thanks ! i'll try
hhttp://www.mounthiking.com
all your hiking gears and gadgets


4
limecity
Re: CBB - hide attachment
  • 2009/3/26 6:30

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


test and it didn't have any effect.

any ideas?

<div style="padding: 5px;">

<
a id="forumpost<{$topic_post.post_id}>">a>

<
div class="head" style="padding:5px;">
<
a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$topic_post.post_id}>#forumpost<{$topic_post.post_id}>">#<{$topic_post.post_no}> 
<{$topic_post.post_title}>
div>

<
div class="even">
<{
$topic_post.poster.link}>
<{if 
$topic_post.poster_ip}>
IP: <a href="http://www.whois.sxc/<{$topic_post.poster_ip}>" target="_blank"><{$topic_post.poster_ip}>a>
<{/if}> 
<{
$smarty.const._MD_POSTEDON}> <{$topic_post.post_date}>
div>

<{if 
$xoops_isuser}> 
<
div class="odd" style="padding:5px;"><{$topic_post.post_text}>div>
<{if 
$topic_post.post_attachment}>
<
div class="odd" style="padding:5px;"><{$topic_post.post_attachment}>
div><{/if}>
<{/if}>

<
div class="foot">
<{foreach 
item=btn from=$topic_post.thread_buttons}> <a href="<{$btn.link}>&post_id=<{$topic_post.post_id}>" title="<{$btn.name}>"> <{$btn.image}>a> <{/foreach}>
<
a href="#threadtop" title="<{$smarty.const._MD_UP}>"> <{$p_up}>a>
div>

div>


i try to edit other newbb template and it shows some changes.
but only the newbb_item.html doesn't seem to have any effect.

even if i change the whois.sc url to something gibberish,
it doesn't seem to make any changes in the site.

any idea?
hhttp://www.mounthiking.com
all your hiking gears and gadgets


5
ghia
Re: CBB - hide attachment
  • 2009/3/26 9:17

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It shows for the display in compact mode. The other mode uses newbb_thread.html as template.
Your if is excluding the post itself also. Should be:
<div class="odd" style="padding:5px;"><{$topic_post.post_text}>div>
<{if 
$xoops_isuser}>
<{if 
$topic_post.post_attachment}>
<
div class="odd" style="padding:5px;"><{$topic_post.post_attachment}>
div>
<{/if}>
<{/if}>

Don't forget to update the module or have set the 'check for new templates' preference.

6
limecity
Re: CBB - hide attachment
  • 2009/3/27 0:21

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


Hmm can't seemed to get it working.

Does it work for you?



hhttp://www.mounthiking.com
all your hiking gears and gadgets


Login

Who's Online

452 user(s) are online (351 user(s) are browsing Support Forums)


Members: 0


Guests: 452


more...

Donat-O-Meter

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

Latest GitHub Commits