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.

 

Show content based on registration field?

Show content based on registration field?

Hi

I am looking at seting up a membership system on my joomla site but cant see if this is possible:

EG 2 users sign up to the animals membership (free)

when signing up, in a field I create with a drop-down choice they choose what animal they have e.g. cat, dog, or chicken


I would like so one they log in, they would see images of the animal they chose:


EG user 1 chose cats, so sees pics of cats in a module when logged in

user 2 chose dogs, so would see Dogs in the same module/position

Is that possible with Metamod?

essentially, the would show if user is logged in, and then query that users animal feild, and if cats, show cats, if dogs, show dogs?

jamesrisk
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Show content based on registration field?

Hi jamesrisk,

do you already have a component/system in mind for setting up the different signup options? e.g. something like CommunityBuilder (free) gives you the ability to set up additional fields at registration. It's also possible to set up some of these by making a plugin that extends standard Joomla registration though that's slightly more technical (but integrates really well).

After you have one of these set up, then yes, MetaMod is great for using this info to show different modules to different people. There are some ideas for doing this in the "Recipes" section of the site. e.g. with CommunityBuilder.

If the system you use puts people into Joomla groups, e.g. using a membership system like MembershipPro (http://joomdonation.com/joomla-extensio … ption.html) then that's really easy too:

if ($core_genius->check("group = Cats")) return XXX;
if ($core_genius->check("group = Dogs")) return YYY;
if ($core_genius->check("group = Chickens")) return ZZZ;

// Replace XXX, YYY and ZZZ with the module ids of the
// modules you want to show for each group.

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: Show content based on registration field?

Hi,

would cameleon not do this?

what i am after is when someone goes to the site for the frst time, they can choose their animal (actally going to be county), and so see a different verison of a page? and it would remember it based on a cookie? but they can change it?

like this example -
http://www.heart.co.uk/localise/

see top of page - change location

jamesrisk
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Show content based on registration field?

Hi James,

since you asked about MetaMod and posted in the MetaMod forum I answered in terms of MetaMod - but you are right, Chameleon too can be used to help achieve your goals.

Overview:

* if you want to force all new users to go to the selection page on first visit, that's quite a drastic step if it involves a redirection. That can cause issues with SEO (have to be really careful about redirecting search bots). I'd suggest using a module that can pop up or appear on ANY page, and use that. If the module initiates a Javascript popup, then that's even better. MetaMod could be used to control when a module appears, or if you have a JS popup solution then you could use Chameleon to initiate it.

* you could make the module or JS for county selection appear if a cookie is not set.

* the module or JS for county selection could directly set a cookie, OR could redirect to a URL with that encodes the option they have selected, e.g. example.com/?county=Surrey. Then MetaMod or Chameleon can detect that URL parameter and set the cookie or session variable themselves.

* to display the desired image on the page, you could use either MetaMod or Chameleon:
- MetaMod would be used to control the display of the graphic in a module
- Chameleon would be used to switch template style, and/or find/replace HTML on the page, and/or control JS or CSS code. One very easy way would be for Chameleon to insert a small piece of CSS that changes the background image based on the cookie value.

How does that approach sound to you? We can get to more specific details later.

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

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5910
Total Posts Today:
1
User Info:
 
Total Users:
10152
Newest User:
kasautiizindagiikay
Members Online:
0
Guests Online:
269

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