Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#409 2008-11-29 18:25:37

december76
Member
From: Malmö, Sweden
Registered: 2004-05-18
Posts: 45
Website

Re: gbp_permanent_links

It works! Thank you so much!

Offline

#410 2008-12-02 18:08:13

ChrisArchitect
Member
From: Canada
Registered: 2007-06-20
Posts: 25

Re: gbp_permanent_links

hey all,
does anyone know how I can do a simple rule for sections to send any call to
/Section/

to a sort of ‘index’ page for that section? Where ‘index’ is a specific article created in that section

so you redirect to /Section/index

?

this is so I can make it appear like domain.com/Section/ is the page

so tough without docs

Offline

#411 2008-12-02 19:56:21

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: gbp_permanent_links

Do you need to do it with the plugin? I’m doing the same thing with a rewrite rule in .htaccess.

Offline

#412 2008-12-13 00:30:19

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

Re: gbp_permanent_links

Here is a version which fixes a problem reported via the “irc channel”:irc://irc.freenode.net/textpattern. The problem was with rule conditions stopping the rule analyse too soon so perfectly valid rules were being missed.

Am putting it out a test version. This is because it may have an impact on your other rules (changing your precedence values may fix these) and I would like to get some feedback first. You are safe to install this and then revert back to the standard 0.12 release.

gbp_permanent_links v0.12TEST VERSION

gbp_permanent_links v0.13TEST VERSION

Last edited by graeme (2008-12-14 15:20:40)

Offline

#413 2008-12-13 19:15:13

fowler
Member
Registered: 2007-02-12
Posts: 79

Re: gbp_permanent_links

probably been posted… but there’s a lot of pages to sift through..

i have multiple sections

when i click “page” 2 on one of them, it just goes to the error page.

what am i missing?

thegluttony.com/gluttube

click page 2 and you’ll see what i’m saying..

Offline

#414 2008-12-14 01:41:38

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: gbp_permanent_links

Neither the standard v0.12 nor the test version seem to work for me after upgrading to 4.0.7. I’ve got only one permanent link rule, /section/category/, precedence is set to 0, and there is nothing under conditions or destination. The tag I’m using, <txp:category name="category-name" title="1" link="1" />, now generates links like this: /section/?c=category-name.

Offline

#415 2008-12-14 15:19:35

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

Re: gbp_permanent_links

Els wrote:

Neither the standard v0.12 nor the test version seem to work for me after upgrading to 4.0.7.

Oh dear… try gbp_permanent_links v0.13 (Compressed) – I was able to reproduce and fix your problem Els.

And here is an updated test version and described above gbp_permanent_links v0.13TEST VERSION

Offline

#416 2008-12-14 15:20:06

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

Re: gbp_permanent_links

fowler wrote:

probably been posted… but there’s a lot of pages to sift through..

i have multiple sections

when i click “page” 2 on one of them, it just goes to the error page.

what am i missing?

thegluttony.com/gluttube

click page 2 and you’ll see what i’m saying..

Does v0.13 work better for you? If not could you provide some debugging info to me?

Offline

#417 2008-12-14 17:00:58

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: gbp_permanent_links

Thank you Graeme, that fixed the category links. There is another problem though, and I’m not quite sure if it’s caused by the plugin, but I think it must be at least related to it… When on a /section-name/category-name/ page, it doesn’t seem to pass the right css; when I manually enter /section-name/?c=category-name, it does. I’m not sure which info you need to determine if this is caused by the plugin, but I’ll post the Pretext Array output for both pages here:

/section-name/category-name/:

<!-- Pretext Array
(
    [id] => 
    [s] => te-huur
    [c] => algarve
    [q] => 
    [pg] => 
    [p] => 
    [month] => 
    [author] => 
    [request_uri] => /te-huur/algarve/
    [qs] => 
    [subpath] => \/
    [req] => /te-huur/algarve/
    [status] => 200
    [page] => sectionpage
    [css] => 
    [path_from_root] => /
    [pfr] => /
    [path_to_site] => /home/httpd/vhosts/portugalore.com/httpdocs
    [permlink_mode] => messy
    [sitename] => Portugalore.com
    [permlink_id] => 4602ffc8abc3b
)
 -->

/section-name/?c=category-name:

<!-- Pretext Array
(
    [id] => 
    [s] => te-huur
    [c] => algarve
    [q] => 
    [pg] => 
    [p] => 
    [month] => 
    [author] => 
    [request_uri] => /te-huur/?c=algarve
    [qs] => c=algarve
    [subpath] => \/
    [req] => /te-huur/?c=algarve
    [status] => 200
    [page] => sectionpage
    [css] => sectionpage
    [path_from_root] => /
    [pfr] => /
    [path_to_site] => /home/httpd/vhosts/portugalore.com/httpdocs
    [permlink_mode] => messy
    [sitename] => Portugalore.com
    [permlink_id] => 4602ffc8abc3b
)
 -->

(I don’t know why it says permlink mode messy, it’s set to /section/title.)

I tried both the standard and the test version v0.13.

Offline

#418 2008-12-14 17:33:34

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

Re: gbp_permanent_links

Latest update: gbp_permanent_links v0.13 +

Changes:
  • Set the style correctly for the current section

Last edited by graeme (2008-12-14 17:38:09)

Offline

#419 2008-12-14 17:35:29

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

Re: gbp_permanent_links

Els wrote:

I don’t know why it says permlink mode messy, it’s set to /section/title.

I override the default permlink mode (set it to messy) – this was the only way I could change some of the archive/pagelinks in 4.0.6. Txp 4.0.7 introduced a much better way for me to change those URLs haven’t change the existing functionality but I’ll will be using it the next version. Development is progressing well :-)

Offline

#420 2008-12-14 18:12:01

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: gbp_permanent_links

Thanks Graeme (also for clarifying)! Though now the right css is in the pretext array, it’s still not being used…

This tag is in the page template:
<link rel="stylesheet" href="<txp:css />" type="text/css" />

This is the output:
<link rel="stylesheet" href="http://portugalore.com/textpattern/css.php?n=default" type="text/css" />

Using the messy category link it’s n=sectionpage, like it should be.

In the tag trace I see two queries for the css, this is the one bothering me:
[SQL (8,7976455688477E-5): select page, css from txp_section where name = '' limit 1]

Here is the first part of the tag trace:

<!-- txp tag trace: 
[SQL (0.0035150051116943): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.0019879341125488): select name, code, version from txp_plugin where status = 1 AND type IN (0,1) order by load_order]
[SQL (0,00014805793762207): select name,code,version from txp_plugin where status = 1 AND name='sed_plugin_library']
[SQL (0,00019001960754395): select name,code,version from txp_plugin where status = 1 AND name='gbp_admin_library']
[SQL (0,00021195411682129): select name, html as type from txp_prefs where event = 'permlinks' AND html <> 'gbp_partial']
[SQL (9,2029571533203E-5): select nonce from txp_users where name='Els']
[SQL (0,00024199485778809): select ID,Section from textpattern where url_title like 'algarve' AND Section='te-huur' and Status >= 4 limit 1]
[SQL (8,7976455688477E-5): select page, css from txp_section where name = '' limit 1]
[SQL (0,00055193901062012): select REPLACE(name, 'gbp_permanent_links_', '') AS id from txp_prefs where `event` = 'permlinks' AND `name` REGEXP '^gbp_permanent_links_.{13}$']
[SQL (0,00011777877807617): select name from txp_section where (`name` like 'te-huur' or `name` like 'te-huur') limit 1]
[SQL (0,00012087821960449): select name from txp_category where (`name` like 'algarve' or `name` like 'algarve') and `type` = 'article' limit 1]
[SQL (9,8943710327148E-5): select css, page from txp_section where name = 'te-huur' limit 1]
[SQL (0,00011491775512695): select user_html from txp_page where name='sectionpage']
[Page: sectionpage]
<txp:css />

Offline

Board footer

Powered by FluxBB