1
rsmike
Alert message for guest comments
  • 2004/5/26 9:43

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


I enabled comments from guests. Now some of my users simply forget to log in, so some comments are anonymous.

How can i check if user is logged in, so i could show alert if he is not, when he loads "add comment" page?

2
rabideau
Re: Alert message for guest comments
  • 2004/5/26 12:41

  • rabideau

  • Home away from home

  • Posts: 1042

  • Since: 2003/4/25


Sounds like it is time to write some code...

My understanding of things is that once you enable comments (according to the systems prefernces) once you enable Anonymous (anyone can write...). That's the point of it. If you want people to be registered then theoretically you restrict functions such that there is a benefit to being logged in... like the ability to write comments, download files, etc.

If you want something different, I think you're pretty much on your own. Ergo...maybe it's time to write some code.

3
kahumbu
Re: Alert message for guest comments
  • 2004/5/26 14:20

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


XOOPS cannot possibly know if the Anonymous user is actually a member who did not login. Even by IP address this would be full of holes.

A workaround for this is to use Smarty to add some message in the comments section if the poster is not logged in. Maybe something similar to:

<{if $xoops_isuser != true}>
You are posting as Anonymous
<{/if}>

I know some of the devs can improve on my code suggestion.

4
rsmike
Re: Alert message for guest comments
  • 2004/5/27 5:54

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Thanks. I'll try to check it.

Login

Who's Online

203 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 203


more...

Donat-O-Meter

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

Latest GitHub Commits