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.

 

First session metamod 1 - Second Session metamod2

First session metamod 1 - Second Session metamod2

At first: I bought the MetaMod Pro and it realy rocks smile Now to my problem:

When an unregistered user comes to my website it shows a module for signing up/facebook login (which is only visible to unregistered users).

What I want to achieve:

If the user stays on the page and navigates to subsites I want to show another module (smaller register button) at the same position.

How can I achieve that?

Thanks in advance for any help!
Best Regards
Thomas

getimo
Beginner Modder
ranks
useravatar
Offline
17 Posts
Administrator has disabled public posting

Re: First session metamod 1 - Second Session metamod2

Hi Thomas,

I'm glad you like it smile

I assume that by "subsites" you mean if the user navigates to other pages on your site?

If so, then I think you want to simply show 1 module the first time they arrive on your site, and a second module replaces that one on every subsequent page view. Correct?

This page has something like what you are asking for:

http://www.metamodpro.com/support/recip … er-session

Is that what you are after?

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

Re: First session metamod 1 - Second Session metamod2

Hello Stephen,

thank you for the reply smile I saw that already but was not able to figure out how to assign more modules for the first and next views. I don't know the syntax. I d like to to something like that

Code:

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 117;
return 220;
}
/* 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.
*/
return 230;
return 231;

How can I do that then it would fit my needs smile


EDIT: Ok, I found it. Is has to be return "117,220"

getimo
Beginner Modder
ranks
useravatar
Offline
17 Posts
Administrator has disabled public posting

Re: First session metamod 1 - Second Session metamod2

Yes, you got it smile

You can return multiple modules in one go, by putting them in quotes e.g. return "117,120".

You can also put the "target modules" into a module position of their own, (e.g. I like to use "right-metamod" for the right position). Then, you can return the name of that module position.

The beauty of that is that then it's easy to add or subtract modules from that module position at a later date, and you don't need to keep going back to edit the MetaMod.

e.g. return "right-metamod";

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:
5945
Total Posts Today:
1
User Info:
 
Total Users:
5611
Newest User:
idim4
Members Online:
1
Guests Online:
147

Online: 
crooms68989

Forum Legend:

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