Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#109 2005-01-17 09:14:45
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
One more question and then I promise I’ll stop bugging you, zem.
Do you have any ideas about how to get zem_rewrite permalinks into search results? I’ve got things working pretty well everywhere else, but it seems that the only allowable items in the search result form are TXP’s built-in search-related tags. Which means that for some sections of the site I’m building, the permalinks will be in one format on the page and another when they’re searched for.
You cooin’ with my bird?
Offline
#110 2005-01-17 09:42:11
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
The best method I know right now for making search results work with zem_rewrite and tcp rc1 & rc2 is to stick with the original URL scheme.
I have a few ideas on ways to improve this, but there’s no point in thinking about them until I know what’s in 1.0.
Alex
Offline
#111 2005-01-17 09:44:18
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
Cool. I think I’ll just go in and hack the TXP functions for the search results to call zem_permlink as a temporary measure.
You cooin’ with my bird?
Offline
#112 2005-01-17 21:17:33
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
Well I’ve upgraded PHP (and Zend) to the latest versions and now zem_rewrite is working like a charm! (Thanks Zem!)
One question though:
I have my URL scheme set up as
$uri_scheme['article'] = '{section}/{category}/{article}/{title}';
and now the search result links don’t work.
Is there a way to configure the search results to use the zem_permlink tag or something similar that will follow the URL scheme I’ve chosen?
-Jeff
Offline
#113 2005-01-18 01:02:52
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
Jeff,
The options are: (1) hack search.php; or (2) stick with the standard URL schemes for now, and see what 1.0 brings.
Alex
Offline
#114 2005-01-18 06:46:04
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
zem, I’m migrating an existing site using you plugin to mirror the URL scheme of the old site as closely as possible.
How could I set up redirects (or rewrites) to make sure bookmarks to the old pages reach the location of the new ones?
e.g. I’d like to redirect people from something like
http://www.domain.com/reading/seven_habits.htm
to http://www.domain.com/reading/books/seven-habits/
So the main issues I have are: add something to the URL (a new directory level), take something away (the file extension) and replace underscores with hyphens.
I tried coming up with rewrite rules myself but I’ve only just started looking at mod_rewrite and regexs and they’re both quite daunting.
So far, I’ve had no success and I don’t have the slightest idea where to look for mistakes. For example, I’m not sure if I can add anything to the .htaccess file that your plugin needs and if so where and in which form to add rules.
Some hints would be appreciated. Thanks.
Last edited by andreas (2005-01-18 06:48:05)
Offline
#115 2005-01-19 18:21:22
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
zem –
Don’t know if you’d consider this a bug or if I’m doing something wrong, but…
If I change my URL scheme to <code>$uri_scheme[‘article’] = ‘{section}/{title}’;</code>, the global <code>$is_article_list</code> is not being set to false when I go to the URL of an individual article. Only if I add the article ID back to the URL will it be set properly.
Is there a way around this? Thanks for the help.
Offline
#116 2005-01-19 19:32:29
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
Rob, consider using {section}/{url_title}
instead. It worked for me.
EDIT: Oh yes, don’t forget to input URL titles for all your articles. It won’t work otherwise.
Last edited by JustinLow (2005-01-19 19:33:03)
Justin
Offline
#117 2005-01-19 19:56:51
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
Thanks Justin. But that didn’t seem to do it for me. My if_article_list tag still always evaluates to true.
Offline
#118 2005-01-19 23:54:12
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
Wilshire,
if_article_list and if_individual_article are a bit buggy in some Textpattern versions. Can you test whether the problem goes away if you disable zem_rewrite and try it with messy URLs?
Alex
Offline
#119 2005-01-20 17:38:30
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
The tags work fine when I disable zem_rewrite and use messy URLs. I’m using the latest code from the SVN repository.
Offline
#120 2005-01-22 19:56:40
Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs
wilshire, tcm_if that might get around the problem for you.
Offline