Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#193 2005-06-23 09:41:26

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

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

I inserted all parts that related to section_category_title; the section_title parts that sgb inserted are now part of the default installation; but, as I said, section_category_title doesn’t have any effect for me.

Offline

#194 2005-06-23 09:42:10

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

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

strange… it’s working perfectly for me.


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#195 2005-06-23 09:45:32

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

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

Maybe you should try to compare diagnostic infos, and/like the exact revision number, environnement software, other plugin or hack, and so on.
Andreas, the mod doesn’t work for you on a fresh install of the latest rev ?

Offline

#196 2005-06-23 16:58:57

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

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

Andreas, the mod doesn’t work for you on a fresh install of the latest rev ?

On the latest rev but it didn’t work back when we were still in the 200s revision numbers. Perhaps I’m missing something:

I compared the two functions in the two files (txp_prefs.php and taghandlers.php) that sgb changed and inserted only the lines that related to section_category_title; I didn’t change the lang file but that shouldn’t make a difference, should it?

Last edited by andreas (2005-06-23 16:59:19)

Offline

#197 2005-06-24 04:11:24

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

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

It may be an undefined index, but that shouldn’t stop it to work. No errors in your apache|php error log ?

Offline

#198 2005-06-24 09:18:58

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

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

No errors in your apache|php error log ?

I don’t know. How do I check these on a shared hosting account?

Offline

#199 2005-06-28 15:52:26

rob_roy
Archived Plugin Author
Registered: 2005-02-28
Posts: 18

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

“Feeds are generated based on the URL scheme set in the preferences and there it’s not possible to get section/category/title — so all URLs that are generated by TXP instead of by a plugin tag come out as section/title; ideally, sgb_url_handler would translate all these into the proper ones on the fly. It does this in theory but I can’t get it to work for all of my site.”

You should be able to define a custom URL scheme that will be used by the permlink tag, and therefor appear in feeds, by setting a custom_url_func. That way you’d be able to avoid editing the txp source. So you could set custom_url_func to run a custom function that generates section/category/title urls to appear in feeds, but continue to use mic_permlink anywhere you don’t want section/category/title. Unless, of course, I’m misunderstanding what you want, in which case I could be completely wrong. ;)

Last edited by rob_roy (2005-06-28 15:52:50)

Offline

#200 2005-06-28 16:18:58

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

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

rob_roy, that’s what I want but I don’t know much PHP so I don’t have a clue where to start with this.

Offline

#201 2005-06-28 16:21:04

starzabove
Member
Registered: 2004-04-13
Posts: 76

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

< bUmP >

Hi,
First off, sgb, THANK YOU- this solves so many problems for me!

Second, am I missing something? I did peruse pages of posts, but with this new version, should date-based urls also be working now in current versions of rc3?

Thanks!

Last edited by starzabove (2005-06-28 16:21:16)


90+ Textpattern installs and still going…

Offline

#202 2005-06-28 17:17:12

rob_roy
Archived Plugin Author
Registered: 2005-02-28
Posts: 18

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

> andreas wrote:

> rob_roy, that’s what I want but I don’t know much PHP so I don’t have a clue where to start with this.

Okay. So I have a little bit about this written up at Autonomous. That’s the beginning, at least. The only things that HOWTO doesn’t cover are mic_permlink, which you shouldn’t have to change, really, and the section/category/title link. So, where I talk about writing a plugin function called function “rtr_permlinkurl($article_array)” you would instead use a function that looked like

<pre><code>
function and_permlinkurl($article_array)
{ global $permlink_mode, $txpac;

extract($article_array); if (!isset($title)) $title = $Title; if (empty($url_title)) $url_title = stripSpace($title); if (empty($section)) $section = $Section; // lame, huh? if (empty($thisid)) $thisid = $ID; if (empty($category)) { $Category1 = (!empty($Category1)) ? $Category1 : $category1; $Category2 = (!empty($Category2)) ? $Category2 : $category2; $category = (!empty($Category1)) ? $Category1 : $Category2; } $category = (!empty($category)) ? $category.’/’ : ‘’; return hu.”$section/{$category}{$url_title}”; } </code></pre>

I really hope that code comes out readable. Anyway, you’ll put something that looks like the above into one of the many plugin forms that are out there and create your very own plugin. OR, there’s a method Mary (I think) mentioned lately where-in you just put it in a file and save it.

So you have your custom function, and you’ve set Textpattern to use your custom function whenever it calls permlink. So in feeds, you should get section/category/title permalinks. But elsewhere in txp, where ever you use mic_permlink, you’ll get whatever you’ve been getting already.

Offline

#203 2005-06-28 17:46:33

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

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

rob, thanks for that. I’ve tried it but without success. I’m a bit short on time at the moment so I’ll leave it at that. Thanks, again, for your help.

Offline

#204 2005-06-28 20:19:54

rob_roy
Archived Plugin Author
Registered: 2005-02-28
Posts: 18

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

When you have the time, let me know what does or doesn’t work. I’ll look into things.

Offline

Board footer

Powered by FluxBB