Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2008-03-27 17:54:33

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Redirect Pro

Someone who has only the plugin code to could write a manual with useful examples without looking at the original documentation that zem provides and release that under a free license. Or perhaps even modify the plugin to include such a manual, especially if the plugin is no longer maintained (not sure if it is).

Offline

#38 2008-09-28 21:41:40

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,153
Website

Re: Redirect Pro

I have to say the situation with this plugin is quite ridiculous. I really respect Alex for his manifold contributions but the license situation has backfired here with no-one benefitting, neither him nor the users.

Would a kind soul be willing to whisper via mail some usage tips for redirecting static previous pages to txp pages? I’m no beginner but I’ve not worked it out with trial and error.


TXP Builders – finely-crafted code, design and txp

Offline

#39 2008-10-19 02:21:47

kevinpotts
Member
From: Kansas City
Registered: 2004-12-07
Posts: 366
Website

Re: Redirect Pro

I really agree with Jakob on this. Considering that no one has developed anything comparable, Alex has left the Textpattern scene, and new subscriptions are not available (I’d pay the $9 in a second if I could), it’s totally ridiculous that the documentation is not available. This is deadware. Can someone with some common sense please share information on how to use the plugin, because while I would love to support Alex and give him money for this stuff, he clearly does not want my cash.

Offline

#40 2010-12-14 17:03:23

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,153
Website

Re: Redirect Pro

Just passing on some information I learned the hard way: if you are trying to use this plugin to do a manual redirect and it just will not do what it is told, try switching the production status to “testing” or “live” in the settings. In debug production status it just smiles at you with a message but does nothing!! I realise this is actually meant to be a feature but without documentation to tell you that, how can you know… grrr

A usage example to redirect when the search function finds an article that is displayed on the section landing page but not linked to individually. Place the redirect function right at the very top of your page before the doctype:

<txp:zem_redirect to="/section" from="/section/article-name" /><!DOCTYPE html>....

Last edited by jakob (2010-12-14 17:03:59)


TXP Builders – finely-crafted code, design and txp

Offline

#41 2010-12-14 19:21:01

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Redirect Pro

Thanks for posting Jakob! Not a bad idea at all. If we all just start posting usage examples and issues we encountered (and hopefully solutions), then maybe this thread can become sort of a support thread.

Offline

#42 2010-12-14 23:24:13

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,153
Website

Re: Redirect Pro

May I find out more by asking questions?

For example: I’m using tru_tags on the site in question and have lovely www.mysite.com/tags/tag-name clean urls for the tags section … that is until I activate zem_redirect (the version 1.2.1 neko posted above). Then it shows me the clean url for a brief moment before updating it to http://www.mysite.com/tags/?section=tags&t=tag-name. It only needs the plugin to be activated as there is no zem_direct tag in the tags page template (the zem_redirect tag mentioned above is in an entirely different page template).

Is there a way of making zem_redirect less aggressive in its interception? Or perhaps an alternative way of achieving what I posted earlier?


TXP Builders – finely-crafted code, design and txp

Offline

#43 2010-12-15 14:45:25

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,153
Website

Re: Redirect Pro

I think I have two possible solutions to the above. It seems to rest with tru_tags use of the url parameter &section=tags rather than &s=tags.

One solution is to edit zem_redirect and add unset($get['section']); to the following around line 75 so that it reads:

		# other unknown query parameters might be used by plugins
		$get = gpsa(array_keys($_GET));
		if (!$get) $get = array();
		unset($get['id']);
		unset($get['s']);
		unset($get['section']);
		unset($get['c']);

The other solution is to edit the function tru_tags_clean_url_handler in the tru_tags plugin around lines 494 and 497 replacing the GET['section'] and POST['section'] with GET['s'] and POST['s']. The respective section of code then reads:

		if (count($_POST) > 0) {
			$_POST['s'] = $tru_tags_prefs[TAG_SECTION]->value;
			$_POST[$tru_tags_prefs[PARM_NAME]->value] = $tag;
		} else {
			$_GET['s'] = $tru_tags_prefs[TAG_SECTION]->value;
			$_GET[$tru_tags_prefs[PARM_NAME]->value] = $tag;
		}

I’m not sure if there is a particular reason why tru_tags uses ?section= rather than ?s=. Maybe its root lies in an earlier version of txp. I’ll continue to watch what happens and report back if it goes up in smoke!

BBTW: both solutions together are not necessary.

Last edited by jakob (2010-12-15 22:13:27)


TXP Builders – finely-crafted code, design and txp

Offline

#44 2010-12-15 20:43:19

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Redirect Pro

Thanks again! A couple of years ago I had exactly the same problem, and the only way to solve it back then was to stop using Redirect Pro… At the moment I’m not using the ‘tag’ section anymore, so the problem is gone. But I’m sure it will help others.

Or perhaps an alternative way of achieving what I posted earlier?

Don’t know. It’s exactly how I’ve been handling this.

Offline

Board footer

Powered by FluxBB