Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Need help with Recipe
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
11-Apr-10 22:22:08
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
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
- Index
- » MetaMod
- » MetaMod General Support
- » Need help with Recipe
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7627
- Newest User:
- rudys68879
- Members Online:
- 0
- Guests Online:
- 167
- 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