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.

 

Need help with Recipe

Need help with Recipe

Hello, I have Joomla 1.5 and Metamod pro.  Im trying to make 6 modules appear on the home page then disappear.  I tried this...

session_start();
/* set a different "instance name" for each module that you want to show only once */
$instance_name = "shown_module_1";
if (!isset($_SESSION[$instance_name]) ||
$_SESSION[$instance_name] == false) {
$_SESSION[$instance_name] = true;
/* customise "101" to your own module number.
  * This is the one that gets shown just once per session.
  */
return 147;
}
/* customise "102" to the module you want to display on the 2nd, 3rd... showing.
* You can leave out the following line entirely if you don't want to display
* a module after the first showing.
*/

I tried this to make the mods get seen once but it blocks out all the others and only show one. Any thoughts?


Also i was wondering is there a recipe to make mods show for about 5 minutes and then disappear?
Any help would be great. Thanks

Edited By: lil2art
11-Apr-10 22:22:08

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

Re: Need help with Recipe

HI lil2art,

If all the modules are in the same module position, then just replace this line:

return 147;

with something like this:

return "147, 148, 149, 150";

... using the relevant module IDs.

If the modules are in different module positions, then you'll need to set up the entire rule in a separate MetaMod for each module position.

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
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Need help with Recipe

i tried doing it with each one seperatly the first 3 times. None of them shows up. Only one of them. When i try it with all of them like 101,92,0,62....nothing at all shows up. Is there possibly something else i could try?

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

Re: Need help with Recipe

If you did this the first time:

return 147;
return 148;
return 149;

... then it's only going to show the first one, because "return" exits the rule completely, and it will never get to the 2nd and 3rd ones.

I guess that now, it's probably not returning any of them because you're still in the same browser session. If you quit your browser or use a second browser to test with, then you might find it works. If you quit the browser completely (close all windows) then restart it that should do the trick.

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
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1698
Total Polls:
6
Total Posts:
5944
Posts this week:
4
User Info:
 
Total Users:
5534
Newest User:
kaylee
Members Online:
0
Guests Online:
146

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