Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2012-04-02 16:44:37

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: pat_referrers

That’s correct – it links to www.inkscar.de and I use the plugin on www.inkscar.de.

P.S. Ok, I removed the default. Nothing changes. If you go to http://inkscar.tumblr.com/ and from there click to inkscar.de, it will redirect, and this I want to avoid. I want it to only redirect when visitors come from blahblah.tumblr.com

Last edited by datorhaexa (2012-04-02 16:49:16)

Offline

#14 2012-04-02 16:48:44

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,615
GitHub Twitter

Re: pat_referrers

So try to remove the default="" attribute. If the plugin fails, it’s a problem with subdomain name into the plugin (blahblah.tumblr.com)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#15 2012-04-02 16:54:50

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: pat_referrers

Patrick, don’t bother with it now that you don’t have time. There’s something to do with the subdomain (as my test above shows) and this might need fiddling to figure out. Just let me know when you want to test — I’ll give it a roll.

Offline

#16 2012-04-02 16:59:28

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,615
GitHub Twitter

Re: pat_referrers

OK. I’m very sorry but this TXP plugin only works on… TXP websites: http://inkscar.tumblr.com/ is’nt made with… WP (I hate WP :)

So, in your case, you need a PHP code into your http://inkscar.tumblr.com/ website (if tumblr accept PHP code into its template system, I don’t know). Try to include the code shown on the txp-fr.net website (see the link in the first post), just change <txp:php> with <?php and </txp:php> with ?> and provide the required domains as explain in the article.

That’s the only thing I can give for you.

Cheers,

Last edited by Pat64 (2012-04-02 17:03:07)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#17 2012-04-02 17:04:53

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: pat_referrers

No no no…wait. In your example in the first post you have in list = apple.com, which is not built on TXP. So, here I do the same. I want the visitors from just one blahblah.tumblr.com to land not on my domain but be sent further over to http://www.tumblr.com/themes/by/inkscar. The problem is that now it redirects not only from “blahblah” but from any Tumblr sub.

Offline

#18 2012-04-02 18:38:09

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,615
GitHub Twitter

Re: pat_referrers

I’m sorry my explanation in the first post wasn’t clear enough (updated now).

Imagine your http://www.inkscar.de/ Textpattern website Url is present on the apple.com website. You want to display a special page for all Apple maniacs, maybe this one http://www.inkscar.de/i-make-beautiful-apple-applications-for-all. So you can use the plugin as this (place it in the very top of your TXP default gabarit (TXP french users prefer to say “gabarit” but on this forum all international users say “page”):

<txp:pat_referrers list="apple.com" redirect="i-make-beautiful-apple-applications-for-all" default="" />

Now, if I click on your TXP website link from the apple.com website, I’ll be redirected on your “i-make-beautiful-apple-applications-for-all” Textpattern section. But, if I click on a search from Google where your TXP website Url is shown, I’ll see your main TXPdefault” page.

I hope it’s clear now. Try my previous tip if you want to use this kind of redirection on tumblr.

Cheers,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#19 2012-04-02 18:52:48

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: pat_referrers

Yes, and just like apple.com, what I have now is:

  • blahbalh.tumblr.com has a link to www.inkscar.de
  • I want when people click on that link to be redirected to a page on tumblr.com where some themes are shown
  • inkscar.tumblr.com also has a link to inkscar.de but here I don’t want people to be redirected — I want them to land as usual on the home of inkscar.de

As it stands now, all links from tumblr.com (regardless of subsite) land in a redirect.

I hope now we are on the same page :)

P.S. In your original example, you have forum.textpattern.com as a place where clicks will come from.
If I use the case of what is happening now, if we had a site like some.textpattern.com with a link that we don’t want to redirect from, it will still force a redirect because both forum.textpattern.com and some.textpattern.com are on textpattern.com.

And because pictures are worth a thousand words, here’s what should happen

Last edited by datorhaexa (2012-04-02 19:27:15)

Offline

#20 2012-04-02 19:57:29

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,615
GitHub Twitter

Re: pat_referrers

It’s a subdomain problem (for same domain name).
I need more time to correct the plugin for this case.

Cheers,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#21 2012-04-21 04:51:00

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,037
Website GitHub Mastodon Twitter

Re: pat_referrers

Hi Patrick

I’m looking at your plugin for a small project and I’m wondering if it will be appropriate to use.

I am trying to find a way to load some particular page content if the referrer comes from a particular page and/or subdomain of my site (so the referrer comes from the same domain).

Something like

... if_referrer list="subdomain.domain.tld, domain.tld/some_page" 
<txp:some_txp_tags>
/if_referrer
...

Can your plugin handle the above?

Last edited by colak (2012-04-21 05:22:46)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#22 2012-04-21 14:35:10

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,615
GitHub Twitter

Re: pat_referrers

Hi Yiannis.

First: Actually, pat_referrers is a single tag, not a container one. So you can’t. But that’s an idea ;)
Second: The plugin can’t distinguish sub-domains from domain names. I’d thinking on this new feature but it seems that the source code will be more complex. Do you think it’s very important to add that kind of feature?


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#23 2012-04-21 16:30:01

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,037
Website GitHub Mastodon Twitter

Re: pat_referrers

Pat64 wrote:

First: Actually, pat_referrers is a single tag, not a container one. So you can’t. But that’s an idea ;)
Second: The plugin can’t distinguish sub-domains from domain names. I’d thinking on this new feature but it seems that the source code will be more complex. Do you think it’s very important to add that kind of feature?

Hi Patrick,

Many thanks for your response. It’ll be very selfish of me to say yes as I am needing that kind of functionality now. I’m not asking you to do it unless others feel that they can use it too.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#24 2012-04-22 06:51:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,037
Website GitHub Mastodon Twitter

Re: pat_referrers

Hi Patrick,

I slept over it and thought that your plugin could do the job if two enhancements were implemented

  1. Subdomain sniffing
  2. have a 0 value for redirect if not required

The code I was thinking of:

<txp:variable name="refpage" value='<txp:pat_referrers list="http://www.domain.tld/some_page, http://subdomain.domain.tld" redirect="0" />' />
<txp:if_variable name="refpage" value="http://subdomain.domain.tld/" />
<txp:some_tags />
</txp:if_variable>
<txp:if_variable name="refpage" value="http://www.domain.tld/some_page">
<txp:some_other_tags />
</txp:if_variable>

Edited to add a simpler code:

<txp:variable name="refpage" value='<txp:pat_referrers list="http://www.domain.tld/some_page, http://subdomain.domain.tld" redirect="0" />' />
<txp:if_variable name="refpage" value="" />
<txp:else />
<txp:some_tags />
</txp:if_variable>

Last edited by colak (2012-04-22 06:59:51)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB