1
indream
show comment only members !
  • 2005/5/20 13:21

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


hi

i need any hack or code or idea for

if visitor member show comments

and

if not member no show comments.

(modules : news / xoopspoll

thanks.

2
ladon
Re: show comment only members !
  • 2005/5/20 14:02

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


You can edit this into your xoopspoll/news template:

<{if $xoops_isuser == true}>

code

<{/if}>

Don't know if '== true' is actually needed, just test it.

3
indream
Re: show comment only members !
  • 2005/5/20 14:15

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


thanks @ladon

i am use this
<{if $xoops_isuser == true}>

<
div style="text-align: center; padding: 3px; margin:3px;">
<
br>
<
a target="_blank" href="<{$xoops_url}>/modules/faq/index.php?cat_id=1#q10"> <{$lang_notice}>a>br>
<{
$commentsnav}>
div>



<
div style="margin:3px; padding: 3px;">
<{if 
$comment_mode == "flat"}>
    <{include 
file="db:system_comments_flat.html"}>
<{elseif 
$comment_mode == "thread"}>
    <{include 
file="db:system_comments_thread.html"}>
<{elseif 
$comment_mode == "nest"}>
    <{include 
file="db:system_comments_nest.html"}>
<{/if}>
div>
<{/if}>
<{include 
file='db:system_notification_select.html'}>


but how i show any message visitor

sample:

"comments not showing user, please login and see comments"

thanks.

4
Dave_L
Re: show comment only members !
  • 2005/5/20 15:15

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


<{if $xoops_isuser}>
   ... 
normal comments code
<{else}>
   ... 
message for non-logged-in user
<{/if}>


Edited to fix else-tag.

5
indream
Re: show comment only members !
  • 2005/5/20 15:28

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


<{if $xoops_isuser == true}>

<
div style="text-align: center; padding: 3px; margin:3px;">
<
br>
<
a target="_blank" href="<{$xoops_url}>/modules/faq/index.php?cat_id=1#q10"> <{$lang_notice}>a>br>
<{
$commentsnav}>
div>



<
div style="margin:3px; padding: 3px;">
<{if 
$comment_mode == "flat"}>
    <{include 
file="db:system_comments_flat.html"}>
<{elseif 
$comment_mode == "thread"}>
    <{include 
file="db:system_comments_thread.html"}>
<{elseif 
$comment_mode == "nest"}>
    <{include 
file="db:system_comments_nest.html"}>
<{/if}>
div>
<{/else}> 
VISITORS NOT SHOW COMMENTS 
<{/if}>
<{include 
file='db:system_notification_select.html'}>


this not

when i use this code in news module:
members show a messege

visitors not show :)

where is error ?

6
Wumanity
Re: show comment only members !
  • 2005/5/20 23:46

  • Wumanity

  • Just popping in

  • Posts: 2

  • Since: 2005/4/5 8


for me just worked at the news_article.html using
<{if $xoops_isuser}>
<
div style="text-align: center; padding: 3px;
margin:3px;"
>
<{
$lang_notice}>
<{
$commentsnav}>
div>

<
div style="margin:3px; padding: 3px;">

<{if 
$comment_mode == "flat"}>
<{include 
file="db:system_comments_flat.html"}>
<{elseif 
$comment_mode == "thread"}>
<{include 
file="db:system_comments_thread.html"}>
<{elseif 
$comment_mode == "nest"}>
<{include 
file="db:system_comments_nest.html"}>
<{/if}>

div>
<{include 
file='db:system_notification_select.html'}>
<{else}>
To get access to the comments you need to <a href:"http://assimp.org/register.php">registerafirst
<{/if}>


I guess the "/" before the word else might be your problem too.

7
Dave_L
Re: show comment only members !
  • 2005/5/21 0:11

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Quote:
I guess the "/" before the word else might be your problem too.


Oops, that was my mistake. I fixed my post. Thanks for catching that.

8
Wumanity
Re: show comment only members !
  • 2005/5/21 0:30

  • Wumanity

  • Just popping in

  • Posts: 2

  • Since: 2005/4/5 8


you are welcome

9
indream
Re: show comment only members !
  • 2005/5/21 14:30

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


thanks.

Login

Who's Online

406 user(s) are online (342 user(s) are browsing Support Forums)


Members: 0


Guests: 406


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