Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Unable to stop module(s) from working

Unable to stop module(s) from working

Hi there,
I have a module running on the public 'welcome sign on page' for my members (galleryview) showing photographs of the local town. I want this module to disappear (ie not work at all) after someone has logged on (in fact I would like them to see a different module).
I have read through the recipes and no matter what I do (and that includes Quick Module etc), nothing seems to happen - the module continues to be displayed whether you are logged on or not.
I feel that I am doing something fundamentally wrong but for the life of me I cannot see what it is ...
Any idea's of things I can check on etc
Many Thanks
Phil Ross

philross2010
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Unable to stop module(s) from working

Sorry,
I should have included the following detail:
I am using Joomla 1.5.15 and Metamod 2.3 ...
The recipes I am having trouble with are:
if ( MM_NOT_LOGGED_IN) return 46; else return;
//where 46 is the id number of GalleryView - and I want just GalleryView showing to the public and not too users who have logged in//
My website which is under construction is www.anglopau.com ... Goto 'Members area' ...
Many thanks
Phil Ross

philross2010
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Unable to stop module(s) from working

Hi Phil,

the trick is that you have to turn off the original module, so that it doesn't display UNLESS MetaMod includes it. MetaMod can't stop the normal module mechanism from displaying a module if it has been assigned in the normal way. So the easiest way to "disable" the original module mechanism is to simply set the original module to "disabled".

Then, the MetaMod has to be ENABLED and assigned to the appropriate pages.

Then you can use the recipe you mentioned above. As long as the "auto-publish included modules" is turned on in the MetaMod you should be fine.

If you are using the PHP rule, then don't use the Quick Module ID Include box - this is superceded by the PHP rule.

On the other hand, an easier way to set this up is to NOT use the php box, and instead use the "show quick module(s) to" selector to non-logged-in users only. This is when you DO use the Quick Module ID include (but not the php).

Hope that helps,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3312 Posts
User info in posts
Administrator has disabled public posting

Re: Unable to stop module(s) from working

Hi there,
you are an absolute star ... thanks to you finally got it sorted and its so much clearer to me now.
Metamod is great stuff ... presumably I can run several recipes at once ie to have more going on ?
Thanks again
Phil Ross

philross2010
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Unable to stop module(s) from working

Hi Phil,

you can use more than one MetaMod on a page, e.g. in different module positions. There's no limit to the number on a page.
You can also mix and match PHP code in a single MetaMod, but you do have to know a little more about PHP in order to make this work properly. The main thing to watch out for is that as soon as the PHP rule does a "return" statement (to return a particular module), then it stops executing the PHP rule, and will never get to the next line or any further on. So sometimes you have to restructure the PHP code a little bit if you are combining complex conditions.

If you're having any trouble with rules, just ask on the forum.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Posts this week:
1
User Info:
 
Total Users:
10137
Newest User:
lexispoker1
Members Online:
0
Guests Online:
334

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked