Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2005-04-02 19:03:01

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

Andreas -

/section/year/month/day/title isn’t supported by sgb_url_handler, it’s supported by zem_rewrite. However when sgb_url_handler is opperating in proper mode it sees the URL as invalid and generates a 404.

I’m thinking this could be avoided if there was a way to control the order in which plugins are executed but unfortuately we can’t do that (yet — hopefully this will be added to TXP at some point).

I’ve got a fix in mind 0.1.6 will be released in the next few days, in the mean time I think you’ll need to disable the 404.

- sgb

Offline

#77 2005-04-02 19:07:27

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

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

The problem is, for some reason zem_rewrite stopped working just an hour ago. It just doesn’t parse the urltitle anymore. So I switched to mic_permlink and modified it to support /section/year/month/day/title.

Any chance that your verion 1.6 might support that? I would love you for it ;-)

Offline

#78 2005-04-03 08:16:25

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

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

sgb, on your site you explain a manual hack to TXP (taghandlers.php, mostly) to get section/category/title to work natively.

I tried it but it doesn’t work. The feeds and comment_invite etc. all put out section/title instead.

Does it work for you? I’d be glad about a clarification. Some of my URLs break when they’re called from a feedreader because of this.

Offline

#79 2005-04-07 02:43:19

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

Andreas -

Check out http://mighthitgold.net/atom and http://mighthitgold.net/rss

I haven’t noticed any inconsistencies with the links, I don’t have comments enabled on any of my posts but I’ll look into it and see if I can figure out what’s going on.

- sgb

Offline

#80 2005-04-07 12:25:19

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

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

sgb, I think I was unclear:

I edited taghandlers.php and txp_prefs.php as you described and chose section/category/title as the URL scheme in the prefs.

But in the feeds, TXP doesn’t send the links with this scheme. Instead, the links there have section/title as their scheme. The feeds themselves are ok, just the URLs in them do not correspond to the choice in the prefs.

Another thing, I’d find it wonderful ir sgb_error_documents could work with rss_suparchive. I’ve got an archive made with rss_suparchive that has the URL scheme /year/month and sgb_error_documents redirects to the error page when I call it, so I can’t use your plugin at the moment.

Just an idea. Thanks.

Offline

#81 2005-04-08 20:31:52

qrayg
Member
From: USA
Registered: 2004-08-27
Posts: 81
Website

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

For some reason my qDT does not work with the latest RC3 and sgb_url_hanler 0.1.5. 0.1.4 does not work either. 0.1.3 works just fine. Oddly enough I have a very similarly architected TXP site and it works just fine with 0.1.5 and the latest TXP RC3.

Here are the plugins that I have installed on the site that does not work with 0.1.4 or 0.1.5:

  • mdm_if_category 0.4
  • ob1_changecase 0.2
  • ob1_if_section 0.2
  • ob1_title 1.4
  • sgb_error_documents 0.1.1
  • zem_contact 0.6

I’m using one template page with if_section and if_category conditions. I also have a few if_articlelist and if_individual_article conditions here and there.

When I install 0.1.4 or 0.1.5 all of my pages work fine (category lists, article lists) except for the individual article pages. They just come up blank. I have a feeling that this new plugin is interfering with the way I have my if_individual_article conditions. I tried disabling the if_category plugin but it works exactly the same.

Right now my site is running 0.1.3 so that my users can still get at the info that they need.

Any ideas?

Offline

#82 2005-04-09 10:08:45

fri
Member
From: Denmark
Registered: 2004-04-30
Posts: 34
Website

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

sungodbiff, thanks for the plugin!

I’m testing it on a server without Mod_Rewrite and it works fine. 0.1.5 plugin and latest RC3.

It’s great to be flexible with ones links.

Remains all the other relative references, like image urls..

I inserted nearly all images in the site relative to index.php. They all work in messy mode.

The images inserted on the page templates and on the CSS are fine with different permlink-modes. So are the ones with absolute paths of course. They adapt to the changes – (like the urls in your plugin).

But if I change the url to anything else than messy, relative image paths in forms and articles are broken! Even TXP images.

I know this has’nt been the goal for your plugin but it would be great if something could make ALL paths work in different modes -not just links..

It might be an obvious mistake I make, I appologize if this has been mentioned earlier, (search has been down). In that case, I would mutch appreciate if someone who knows of a fix to the problem would point me in the right direction – thanks.

Offline

#83 2005-04-09 14:06:07

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

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

That would happen even if you used static pages. Use a url relative to root instead.

Example:

absolute
http://yoursite.com/folder/file

relative, will only work inside “folder”
file

relative to root (notice starting slash)
/folder/file

Offline

#84 2005-04-10 15:27:22

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

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

I have done some testing now.

earlier i posted that i couldnt get my conditonals to work on my dev machine (windows XP), but they where working just fine on my other machine (Linux).

This is what i have come up with.

when requesting the url http://example.com/section/urltitle

then when i do <code>print_r($parts);</code> i get this on my Windows machine
<code>
Array
( [0] => ection [1] => urltitle
)
</code>

and this on my linux machine
<code>
Array
( [0] => section [1] => urltitle
)
</code>

so on my windows machine this plugin never gets the right section name.

But when iam changing this line
<code>
$script_path = trim(dirname($_SERVER[‘SCRIPT_NAME’]), ‘/’);
</code>

to this instead (changed to a backslash instead)

<code>
$script_path = trim(dirname($_SERVER[‘SCRIPT_NAME’]), ‘\’);
</code>

then everything is working fine on my windows machie too.

Just a note to others that having problems with their conditionals with this plugin.


Johan Nilsson

Offline

#85 2005-04-10 15:33:42

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

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

ohh sorry it should be
<code>
$script_path = trim(dirname($_SERVER[‘SCRIPT_NAME’]), ‘\\’);
</code>


Johan Nilsson

Offline

#86 2005-04-10 16:00:23

fri
Member
From: Denmark
Registered: 2004-04-30
Posts: 34
Website

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

Thanks Mary, this solution works perfectly on a server like TXD. I am changing paths there, this instant.

On my other server, All other file-paths are broken with anything else than messy mode – unless they are absolute. (except in the TXP css, becuse I think the relative paths are the same there, in any mode.)
I don’t think they’re static pages.. articles list on the front page AND list on section pages as well as individually.. (unless I’ve misunderstood the meaning of static)

I would like to know about peoples observations on servers that don’t use mod_rewrite – What about image-paths inside articles when permlink-modes change?
It seems to me that paths relative to root (/folder/file) aren’t accepted on such servers at all.

If they do mess up, for anybody else than me, It would seem that the plugins compability on servers without mod_rewrite is somehow incomplete – unless accompanied whith a fix for other paths – Or a note saying all other paths should be checked and probably absolute..

Offline

#87 2005-04-12 18:29:38

ArbinShire
Member
From: Tallahassee, FL
Registered: 2004-03-23
Posts: 31
Website

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

Oh how lovely.

I was just going to complain about TxP’s handling of 404s and decided to search before I posted and WHAM! Here’s this wonderful plugin.

Most excellent. It’s functionality should be implemented in v1.0

Offline

#88 2005-04-12 19:25:48

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

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

Yes, they do. Paths relative to root had nothing to do with mod_rewrite. It even works with ASP on a Windows server.

Offline

#89 2005-04-13 01:35:10

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

All -

Sorry, I knew April would be a crazy month for me. Anyway I am checking this thread and incorporating feedback into the new version of sgb_url_handler and sgb_error_documents.

osei, thanks for figuring that out, I’ll add some OS detection to the plugin to take care of Windows/*nix inconsistencies.

I’ve also been draggin’ my heels a bit watching changes in RC3 and waiting for 1.0. I’m pretty satisfied with my beta version running on my site so I’m probably going to release it this coming Sunday. The only caveat is I’ll be out of town 4/21-4/24 so I won’t be much good for any bug fixes then, but I’ll try to post as much info as I can before-hand.

- sgb

Offline

#90 2005-04-13 10:51:38

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

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

sgb, just an idea: I think many people use rss_suparchive and agb_error_documents returns an error when I call the /yyyy/ or /yyyy/mm/ URLs — perhaps it might be useful for quite some people to have that URL scheme incorporated into sgb_error_document.

Or even the option to add custom URL schemes in the way zem_rewrite allows you to do.

Offline

Board footer

Powered by FluxBB