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.

 

Conflict in Referrer Exeptions in Environnement field

Conflict in Referrer Exeptions in Environnement field

Hi Stephen, I have a small conflict I want to solve within the sites. I already trigger a certain template according to keywords from a search engine referrer (external sites) and that's fine. The problem is that I want to exclude my own domain in order to avoid any template changes once the user gets to the site.

I tried the Environnement field conditions "page url + does not contain "quebecguitare"

AND

Referrer + contains "enfant (child or girl in english) which was my usual setting.

With that setting the template changes can no longer be trigered with the referrer keyword "enfant (child or girl in english)". There's a problem within the rule itself and since I added the field conditions "page url + does not contain "quebecguitare".

It seems there's a referrer tracking problem, maybe within what's stored in the cookie. I have tried with emptied cache and I get the same results.

I tested it with this referrer wich usual works without the newly added condition: http://www.google.com/search?q=cours+gu … =firefox-a

Note: it contains cours+guitare+enfant+québec aka "québec" and "guitare" but I wanted to exclude "quebecguitare" so I don't think it's the same keyword.

External referrer vs. Internal referrer?

Cheers,
Alex

atherrien
Modder Extraordinaire
ranks
useravatar
Offline
140 Posts
Administrator has disabled public posting

Re: Conflict in Referrer Exeptions in Environnement field

Quick note: I also noticed that within the sites, it takes 2 clicks or pages to trigger another template from keyword, as opposed to external referrer which usually shows the right template on first attempt.

Looks like a cookie thing, maybe in my rule chain. You still have your admin login on my site if you wanna have a closer look.

atherrien
Modder Extraordinaire
ranks
useravatar
Offline
140 Posts
Administrator has disabled public posting

Re: Conflict in Referrer Exeptions in Environnement field

Hi Alex,

I found an answer for you. This was quite challenging.

The issue was that you just have 1 field for the referrer, and in that you want to try to detect when the referrer is NOT the site itself, and also where the referrer contains a certain keyword.

To do this I used a feature of Regular Expressions (regexes) called negative look-ahead assertions... basically it's a way of detecting when a certain word/string is not in the input.

So I used this in the Referrer box, with "matches regex" instead of "contains":

/^((?!quebecguitare).)*lectri/

What that does is to detect if the input referer string does NOT contain the word quebecguitare, then contains the word "lectri".

I made the changes on your site on each rule that searches for a string in the referrer string.

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: Conflict in Referrer Exeptions in Environnement field

Indeed that's quite elaborate, I didn't think of making a rule that would exclude a certain expression in the string. Now I know that it exists. Thank you for making the mod on both template rules. Everything is alot smoother now. You rock as always! ^^

Cheers a bunch,
Alex

atherrien
Modder Extraordinaire
ranks
useravatar
Offline
140 Posts
Administrator has disabled public posting

Re: Conflict in Referrer Exeptions in Environnement field

:-)

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:
1685
Total Polls:
6
Total Posts:
5940
Total Posts Today:
1
User Info:
 
Total Users:
5186
Newest User:
Totosite
Members Online:
0
Guests Online:
201

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