6
jbaudin:
The problem is that you want something not feasible as stated. Let me recapitulate: you want to define a module as the start module, and then to show the module to anonymous users but not to registered users.
If this is correct, just think: what start module would the registered users see?
I have two different suggestions: an easy one and a complex one.
The easy one takes advantage of your own affirmation that you "just want to display some informations of my company". If that is the case, you can and definitely should use a block, a custom block, easily built with XOOPS' block manager.
You say that if you use a block, you "can't have a lot of pages for the anonymous users". I don't see why. Let me explain. Let's say that you have 20 pages you want to show your anonymous users. Fine: tie them up using for instance Tiny Content. Then give anonymous users (but not registered users) access to that module. Then build a block to appear in the start page, and from there point to the relevant pages in Tiny Content. Last, grant anonymous users (but not registered users) access to this block.
This solves at least part of the problem. You'd have a module with content exclusive for anonymous users, and a custom block to point to the module.
The persistent point is what will you show in the start page, other than this module for anonymous users. Well, you could try to display the recent news block, and give access to it just to the registered users. This way, anonymous users would be greeted by the custom block leading them to their exclusive module, while registered users would be greeted by the latest news block.
It would be up to you to decide if anonymous users would have access to the module News or not. But then the link to it would be in the menu, not in the start page.
The alternative, that is, the complex solution, would imply hacking the core. How? By establishing a dynamic startup module.
I don't know the details of how to do this, but in essence you could replicate what happens in the preferences page where you select the start module. That is, you would something like:
if !xoopsUser
then startup module = onemodule
elseif
then startup module = anothermodule
Of course, you'd have to write to the database every time a user logs in and you'd need to make sure the rights are, well, right.
All in all, my recommendation goes for the first alternative. It's safe, easy and does the job. What else can you ak for?
Cheers.