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.

 

Vary module by referer

Vary module by referer

/* was the referer Kudzu? */
if ( $core_genius->check( "referer starts with http://www.kudzu/" )) {
  /* show the module */
  return 119; /* module id to return */
}
/* was the referer logged in Angie's List? */
elseif ( $core_genius->check( "referer starts with http://my.angieslist/" )) {
  /* show the module */
  return XXX; /* module id to return */
}
/* was the referer Vertical Search Works? */
elseif ( $core_genius->check( "referer starts with http://www.verticalsearchworks/" )) {
  /* show the module */
  return XXX; /* module id to return */
}
/* was the referer Service Magic? */
elseif ( $core_genius->check( "referer starts with http://www.servicemagic/" )) {
  /* show the module */
  return XXX; /* module id to return */
}
else return XXX;

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

Re: Vary module by referer

What is the problem? return 119; /* module id to return */ but under parts instead of XXX.

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

Re: Vary module by referer

The PHP code above is just an example - in this case, 119 would be the module ID of the module to use if the referrer was a particular URL. You would replace XXX with the module id to use for each of the other URLs.

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
4
User Info:
 
Total Users:
4383
Newest User:
kingpen99
Members Online:
0
Guests Online:
160

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