1
supra01
Welcome message only on index.php for anon users?
  • 2004/2/9 16:21

  • supra01

  • Just popping in

  • Posts: 3

  • Since: 2004/2/2 0


Hiya,
Sorry if this topic has been raised before but I've had a good look and haven't found anything.
Basically what I'm after is to display a picture and welcome message on my index visible only to new/unregistered users. I've tried to create a block and make it visible to only unregistered users but for some reason this block is displayed in both registered/unregistered pages (I'm sure that the permissions are set correctly).
As a short-term solution I added the information to my theme index.html using the <{if $xoops_isuser}> "do nothing" <{else}> "display welcome info" code but obviously this is a problem when the user comes to register, etc, because the welcome message it displayed at the top of the register page!
(Incidentally I'm using XOOPS 2.0.5.2)
Can anyone help me out
Many thanks,
Matt

2
Herko
Re: Welcome message only on index.php for anon users?
  • 2004/2/9 16:25

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Create a custom block, and set it to be visible for anonymous users only in the system admin -> groups page. (also check the regd users group to make sure the block isn't cheked).

Herko

3
chapi
Re: Welcome message only on index.php for anon users?
  • 2004/2/9 16:26

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


This can exactly be done how you described it! You have to create a new block and make it only visible for the anonymous group! You have to uncheck the access rights for the registered group, because when you create a new block, access rights were automatically set.

After that, every visitor of your website can see this block. When this visitor logs in, the message is gone.

4
supra01
Re: Welcome message only on index.php for anon users?
  • 2004/2/9 16:34

  • supra01

  • Just popping in

  • Posts: 3

  • Since: 2004/2/2 0


Thanks for your speedy replies. I'm not sure whether I might be better off reinstalling my block manager because now whenever I create a new block (under the anonymous user group) this block isn't even shown under the anon block admin, however it is displayed under the registered user and webmaster groups block admin?
I think I'm slowing going insane

Thanks again,
Matt

5
regen_r8
Re: Welcome message only on index.php for anon users?
  • 2004/2/9 16:49

  • regen_r8

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/5/23


Remember that XOOPS groups are not mutually exclusive for a user.

Have you created a test user that is only a member of the registered group and not also a webmaster? When building blocks that are restricted by group, it is necessary to have test users for each group in order to prove the system.

This is not uncommon usage, and I have done it on several sites. Proving your module and block group access cannot be done correctly using only the admin (webmaster) login.

Cheers,

Rich

6
chapi
Re: Welcome message only on index.php for anon users?
  • 2004/2/9 16:49

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


A registered user can only see this block when he isn't logged in! Because at this moment he is also a anonymous user at the website!

7
poiinthepark
Re: Welcome message only on index.php for anon users?

I have this very same problem, i have a really nice custom bloke i made for anon users as a welcome page but it will only show on the reg users page!.

i have been through every nook and cranny in the blocks admin and nothing will work for anon users, basically all they can see is a blank page with the system and user blocks on the left.

Am i missing some thing? any one want to offer any help as i'm a bit miffed.

I have also tried installing xoops2_mod_home and that just does not do any thing other than produce white page, its installs ok and it lets me create my message but once i set that mod to home page mod *white page* im begining to think its christmas already.

thank you in anticipation.

8
Lance_
Re: Welcome message only on index.php for anon users?
  • 2004/11/11 3:39

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Before the block will appear in the listing fro anonymous, you must set the permission in Groups Manager.

In Groups Manager, click on anonymous, and then check the box for your custom block.

Hope this is what is the problem, just speedread the topic.

Cheers

/edit
PS like Chapi said, uncheck the Block from the Registered group so that they can't see it.

9
poiinthepark
Re: Welcome message only on index.php for anon users?

thanks Lance that fixed it fine, never thought id have to set those manually as id been looking in there before i installed any thing.

i understand how it will work... groups is going to get interesting!

Thank you.

Login

Who's Online

271 user(s) are online (226 user(s) are browsing Support Forums)


Members: 0


Guests: 271


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