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.

 

Frames

Frames

Well this one is a hard one ! For me at least !

Let's say that I have a redirection by frame from a domain 1 to a domain 2 which hosts my joomla website.

I would like metatemplatepro to switch template when I detect that the user targeted domain 1. However I cannot find a referer and getting the host does not work as domain 2 is in the iframe.

The only thing that I get is the page title which is always the domain 1 name and this:

Code:

<HTML>

<HEAD>
<TITLE>domain 1</TITLE>
</HEAD>
<FRAMESET ROWS="*,0">
<FRAME SRC="http://domain 2/fr/shop" NORESIZE>
<NOFRAMES>
Your browser does not support frames.
</NOFRAMES>
</FRAMESET>
</HTML>

I tried with referer, domain name but no luck so far.
I wanted to try to detect the page title but don't know how to do it as it seems to me that metatemplate would detects a title within the iframe.


Any ideas ?

alterna
Beginner Modder
ranks
useravatar
Offline
18 Posts
Administrator has disabled public posting

Re: Frames

At this stage I really have no idea how you might go about this. Can you not do it with an iframe instead, since you got this working on the other site with the HTTP_REFERER variable?

On the "included" site you could try to put a print_r($_SERVER) in MetaTemplate's PHP box. The output will come out before the page is started (which is why there's no debug mode in MetaTemplate), but hopefully you'll get to see that output in the "frame". There might be another $_SERVER variable there that gives some clue as to whether it's in a frame or not.

Best regards,
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: Frames

I just thought of something -- you could add an extra URL parameter on to the URL in the frame, then use MetaTemplate Pro to detect this URL and set a session variable.

I guess the only problem with this is that the search engines will probably index that internal URL. That's not good. I suppose you could detect the user agent for common robots (googlebot) and NOT set the session variable for them. At least that way they won't index the wrong content from the front page onward, but you still have the problem that they've indexed the URL with the parameter.

So... perhaps do a 301 redirect if you detect a googlebot and the parameter is set (so it won't index that URL); otherwise, set the session variable and template and continue as normal.

Just a thought.

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

Board Info

Board Stats:
 
Total Topics:
1698
Total Polls:
6
Total Posts:
5945
Total Posts Today:
1
User Info:
 
Total Users:
5610
Newest User:
idim4
Members Online:
1
Guests Online:
373

Online: 
bseba9l

Forum Legend:

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