Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2005-03-21 08:42:26

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Rolling back to 0.1.3 solves this problem but introduces a new one since I’ve got a link category and an article category with the same name and calling it will display both links and articles.

Something that came to my mind: I use the following tag for my permalinks:

<txp:zem_permlink scheme="article_urltitle"></zem_permlink>

Perhaps that could be the problem: I might try and delete the scheme attribute because it specifically calls this URL scheme

$uri_scheme['article_urltitle'] = '{section}/{category}/{url_title}';

and if I understand this correctly, anything that comes after the section will be treated as a category.

At the moment, I’m away from my own computer until next week but I’ll have a look at it some time around the end of next week.

Offline

#50 2005-03-22 15:58:31

micampe
Archived Plugin Author
From: Treviso, Italy
Registered: 2005-03-07
Posts: 38
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

> sungodbiff wrote:
> micampe -
> That’s very interesting. How are you generating different permlinks for different sections?

I’m using a very simple plugin I wrote. Will post it soon.

Offline

#51 2005-03-28 21:05:05

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Thanks, sungodbiff, for your plugin. It works beautifully.

I have encountered one snag in combination with wilshire’s rss_suparchive plugin. When I specify a form with rss_suparchive the permlink gets a little weird: the url title gets duplicated. You can view the wild goose chase I put wilshire on.

Is there a further modification that needs to be done to get the url to work in this case?

Edit:
I really think this plugin should be part of the default install. Until then, is there a plugin (sgb_permlink?) available for creating permlinks with a specific URL scheme rather than hacking the files so that the option becomes available in the preferences? Or could there be an admin plugin that adds the url options? It would just simplify the update process.

Last edited by bauhouse (2005-03-28 22:28:25)

Offline

#52 2005-03-29 00:09:44

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

http://auto.nomo.us/article/txp-permlinks-redux

Offline

#53 2005-03-29 00:49:32

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Thanks for the link, mary. The function suggested there appears to work for section/title urls. Not knowing enough about PHP, what then would the function look like if I need section/category/title ?

Offline

#54 2005-03-29 07:35:37

micampe
Archived Plugin Author
From: Treviso, Italy
Registered: 2005-03-07
Posts: 38
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Custom permalinks plugin: mic_permlink

Offline

#55 2005-03-30 02:31:59

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Bauhouse -

I’ll need to look into how rss_suparchive works, the modifications I described earlier are pretty basic with the intent being that they don’t break functionality within TxP. I’ve been avoiding the permlink plugin subject :) And luckily micampe stepped up!

- sgb

Offline

#56 2005-03-30 02:50:43

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Bauhouse -

Did you get all your URL issues worked out?

- sgb

Offline

#57 2005-03-30 06:11:02

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

With wilshire’s new version of rss_suparchive (v0.14), the permlink is working great now – no more duplicating url titles.

As for the permlink plugin, mic_permlink still seems to fall short of providing a section/category/title url scheme. So I’ll stick to using your hack to have section/category/title available in the admin > preferences. I did create a plugin that will create section/category links for use in an article listform to display links for category1 and category2. It works quite well at creating the urls, and single word categories work perfectly with your plugin. However, categories with more than one word are a problem.

These urls work:
http://site.domain.url/section/Category
http://site.domain.url/section/category
http://site.domain.url/section/?c=This%20Category
http://site.domain.url/section/?c=This+Category

But these produce 404 errors:
http://site.domain.url/section/This%20Category
http://site.domain.url/section/This+Category
http://site.domain.url/section/this+category
http://site.domain.url/section/this-category

I tried using the stripSpace and doSlash functions to try to create variations on these urls, but the dirty urls were the ones that worked consistently. So I either need to create categories with no spaces, or I stick to using dirty urls for these cases (which is what I’m doing for now since “SriLanka” and “NorthKorea” look like mistakes). It’s not like these are permlinks, so it doesn’t really matter that much. It would just be nice to have a completely “clean” site.

Any ideas on a clean method for multi-word categories?

Offline

#58 2005-03-30 16:30:46

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Bauhouse -

It’s an easy fix to sgb_url_handler to get it to decode URLs so I’ll add that to the list of changes for 0.1.6. I’ve been dragging my heels on releasing it so I could gather more feedback — so keep it coming!

- sgb

Offline

#59 2005-03-30 18:55:05

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Thanks, sungodbiff, looking forward to it!

Offline

#60 2005-03-30 20:24:22

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

sungodbiff,

I haven’t solved this yet. Here’s what I did:

I installed the latest version of your plugin and modified taghandlers.php and txp_prefs.phpas you describe

I chose the section_category_title URL mode in the prefs.

When I now call /section I don’t get away from the homepage. If I activate sgb_error_documents, it gives me a 404 for /section.

I am able to call /section/title but not section/category/title.

This is really weird. I can’t get my head around it.

Offline

Board footer

Powered by FluxBB