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.

 

[SOLVED] Show module only once

[SOLVED] Show module only once

Thank you for a terrific Joomla extensions. I install MetaMod as a rule with every site and it's always useful.

I have a short information gathering form that users needs to complete before gaining full access to resources content. That means that the user isn't logged in but is just a visitor. I have implemented one of the MetaMod recipes that shows the form to the user only once per session which is not bad to start with. Showing the form only once, overall would be preferable so the user doesn't have to keep filling the form out if they return several days later. Anyone know how to do that? I am assuming that adding a cookie to the user's computer and then checking for it would do it I just don't know how to accomplish that. Many thanks!

Edited By: mirphi
16-Oct-09 10:35:30

mirphi
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: [SOLVED] Show module only once

http://www.metamodpro.com/support/recip … odule-once

New recipe!

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

Re: [SOLVED] Show module only once

I'll definitely be trying it out. Thank you so much!

mirphi
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: [SOLVED] Show module only once

well. before anything let me say thanks for such a great work. its some remarkable advance for joomla 1.5.
my problem is that a want to show a module for visitors that are not registered only. i mean, when a visitor comes to the page and registers, the next time he wont see that module. meantime will see it (a registration reminder or so)
i've tried the recipe and got no result. can you explain step by step where how and wish code do i have to introduce. and if there's any other thing i must check/uncheck on the config page of the metamod.

right now all i can do is show a module to all visitors, wether they are registered users or not.

hope you can help me ASAP. i really need this feature. thanx alot

abaeza
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: [SOLVED] Show module only once

Hi Abaeza,

Please read the "Quick Start" page for basic instructions.

- set up the 2 modules that you want to display to users, 1 for when they are not logged in, and 1 for when they are logged in.
- in each of these modules, make sure that they are published, but set the "Menu Assignment" to "none".
- then set up the MetaMod in the module position that you want the other modules to appear in. Use the following recipe:

if (MM_LOGGED_IN) return 101;
else return 102;

... where 101 and 102 are the module numbers of the modules that you want to show for logged in users, and non-logged-in users. Replace these numbers with the correct ones for your site.

- in the MetaMod, keep the option "Show Quick Module(s) to" to "All users". This means that the PHP rule above will be used to control module selection, which is what you want.

That should do what you want :-)

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10778
Newest User:
negina4qx
Members Online:
0
Guests Online:
162

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