Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2005-11-12 03:27:00

c41um
New Member
Registered: 2005-11-08
Posts: 6

Re: [archived] gbp_faux_static - uri forwarding.

> doggiez wrote:

> If I’m the only one who wants this, please don’t spend too much time on it.

I’ve been following the ‘section->title’ to ‘category->title’ part of this discussion and am having very similar problems (only difference is I want ‘section->title’ to go to ‘section->category->title’ in one particular section).

I’ll not go into details – all I want to say is that you’re not ‘the only one who wants this’ :)

Offline

#50 2005-11-12 09:15:07

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: [archived] gbp_faux_static - uri forwarding.

Hi all,
I’m working on a new version, which will fix a load of bugs found and new features. Planning to realease it next week.

Offline

#51 2005-11-12 09:53:22

boblet
Member
Registered: 2005-08-08
Posts: 53

Re: [archived] gbp_faux_static - uri forwarding.

looking forward to it Graeme!

peace – boblet

Offline

#52 2005-11-13 17:15:44

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [archived] gbp_faux_static - uri forwarding.

graeme

Thanks!

This plugin works like a champ!

Jamie

Last edited by soulship (2005-11-13 18:18:44)

Offline

#53 2005-11-13 22:14:22

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: [archived] gbp_faux_static - uri forwarding.

Much thanks to Graeme for all the work he has done on this and working with my test site on it. I know that he had found a bug or two and fixed it on my site so now the /section/category/title URLs work perfectly.

Love the plugin, bud.

Offline

#54 2005-11-14 05:58:52

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: [archived] gbp_faux_static - uri forwarding.

Good to hear. I have some more questions that have come up but I’ll wait for the next version and see if I can solve them.

Will there be any documentation with the new release?

I’ll also throw in my thanks for this as it’s really come in handy and I appreciate the work.

Offline

#55 2005-11-14 06:26:31

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: [archived] gbp_faux_static - uri forwarding.

I’ve just come up with a request for another meta pattern: page number. When clicking the txp:older or txp:newer, my URLs end up having a /?pg=2 and I would like to change these to something like /page-2. Not a critical request, but a useful pattern for archives.

Offline

#56 2005-11-18 04:51:45

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

Re: [archived] gbp_faux_static - uri forwarding.

Plugin installed fine, but when I went to use it, this is what I got:

Fatal error: Only variables can be passed by reference in eval()’d code on line 762

I’m using PHP5, and in this version you can only pass variables to array_shift.

So changing from

<pre><code>$function = array_shift(array_values($_GBP[‘master’][‘events’]));
$event = array_shift(array_keys($_GBP[‘master’][‘events’]));
</code></pre>

to

<pre><code>$function = array_values($_GBP[‘master’][‘events’]);
$function = array_shift($function);

$event = array_keys($_GBP[‘master’][‘events’]);
$event = array_shift($event);</code></pre>

fixes it. :)

Offline

#57 2005-11-25 17:40:55

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [archived] gbp_faux_static - uri forwarding.

I’m stoopid, but not lazy.

Could someone post detailed instructions on how to get (section/category) site wide, and (category/Year/Month/Date) for a specific section. My brain hurts, and I want to ditch sgb_url_handler.

Thanks

Offline

#58 2005-11-29 02:00:35

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: [archived] gbp_faux_static - uri forwarding.

Hi All, thanks for bearing with me, life always seems to be catching up…. Next release will be soon.

@*dale*,
You need too create two regular expression rules. One for site wide and one for your specific section (which I call foo).

The site wide rule needs to be: %\/(?#section !="foo")\/(?#category)\/$% this will match any requests in the form /section/category/ but only if the section doesn’t equal foo. Leave the popup menus blank because the meta patterns contained in the rule (i.e. (?#section) and (?#category)) will automatically and dynamically complete these when the page loads.

Your rule for specific section need to be: %\/(?#category)\/(?#year)\/(?#month)\/(?#day)\/$%. This is where confusion probably starts, as the rule doesn’t contain a section meta pattern how does the rule know what section to forward to? Well thats is what the popup menus below are for. You need to change the section popup to foo.

Next, permalinks. Unfortunately at the moment you will need to hard code some links, there is no way to use a permalink from one rule on pages which matches url request to a different rule. You will be able to work around this limitation in the next release. But for now, it is probably best to set the permalink to /(?#section)/(?#category)/ and /(?#category)/(?#year)/(?#month)/(?#day)/ in the respective rules.

@*mary*: Thanks for letting me know about the bug and the fix :)

@*paul*, I’ll look into adding a page numbers meta pattern.

@*lee*, Documentation, not yet as things are still changing but feel free to ask questions here or via a private message.

Sorry for the delay. Cheers.

Offline

#59 2005-11-29 05:51:52

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: [archived] gbp_faux_static - uri forwarding.

Okay since the next release is still a bit away I’ll ask my questions now.

I’ve setup my rules to allow for section/category/title. I only use this rule for one section of my website.

All works fine in regards to that for the most part, however:

1. I’m using a live search result plugin. Neither the live search results or the normal search result page show the proper section/category/title links but rather section/title. Is there a way to adjust this?

2. For the section that uses the rule section/category/title, I would like to use the tag <code><txp:if_individual_article></code> on my page template to only display a chunk of text when the url is /section and not when they are viewing an actual article, however this tag doesn’t seem to work because of the url format. Is there a work around?

3. How would I go about changing the file_download links? I only have 1 link in regards to this so it’s nothing major but I wouldn’t mind having a format like /section/filename and also still be able to use the download counter. Is this possible?

Offline

#60 2006-01-20 03:30:24

bokane
Member
From: Beijing, China
Registered: 2005-10-24
Posts: 13
Website

Re: [archived] gbp_faux_static - uri forwarding.

Is there anywhere one could see example code for a site using this? I’ve been trying to get it working, but being both a TXP newbie and fairly dense to begin with, I’m getting nowhere.

Offline

Board footer

Powered by FluxBB