Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#517 2009-11-03 10:38:38

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: gbp_permanent_links

pieman wrote:

Used in the News section, this returns the gbp_pl defined (section/yyyy/mm/dd/title) url:
<txp:article_custom section="news"><a href="<txp:permlink />" rel="bookmark"><txp:title /></a></txp:article_custom>
But used in any other section, exactly the same code returns a /section/title url instead – even though I have prefs=messy (!)

Graeme

With fresh eyes this morning I saw that the culprit wasn’t gbp_pl, but in fact me (shome mishtayke shurely).

I was trying to be clever and pointing tru_tags to the News section and somehow that was sinking the ship. All is well now. Apologies for the false alarm.

Offline

#518 2009-11-03 12:37:31

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: gbp_permanent_links

Ops. I wrote a post last night, but it seems I forgot to submit it.

Is there any chance that, after upgrading, all the gbp_p_l rules have been deleted by the upgrade process?

I upgraded, but didn’t check the gbp_p_l tab until a few hours later. I was surprised to see that there weren’t any rules, like if they were deleted.
FYI, I run gbp_p_l from the plugin_cache_dir, and to upgraded I simple switched old version file for new one.

I wonder if it was gbp_p_l the culprit of this deletion. Next time I’ll backup :)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#519 2009-11-03 13:08:15

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

Re: gbp_permanent_links

maniqui wrote:

I wonder if it was gbp_p_l the culprit of this deletion. Next time I’ll backup :)

No changes were made to the plugin which would of caused the deletion. It’s very strange. the plugin stores it’s setting in the txp_prefs table so you may want to check your other settings to make sure everything is still set up correctly.

Offline

#520 2009-11-03 13:16:45

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: gbp_permanent_links

While here, a minor wish:

If you generate the “typical” /section/category/title permlink, when you visit an article permlink (/my-section/the-category/my-great-article), the txp:if_category tag will return true for the “page context”, which I consider an “erroneous behaviour”.

I think it would be “in harmony” with standard TXP behaviour [1] if it would return false, as we are not on a category list (article_list context), but already visiting the permlink of an article (individual_article context).

Of course, if this change is possible and it’s applied, it may break backwards compatibility. I won’t worry about that, anyway! :D

[1] From if_category Textbook entry: “The tag will execute the contained statements if the name attribute matches a category search value, or the list is an article list by category (?c=category) “


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#521 2009-11-03 13:57:07

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: gbp_permanent_links

OK, after a quick chat with graeme, he made me notice that that’s how thing work on the inner cogs of TXP, because:

because /section/category/title effectively means /?s=section&c=category&id=someid

And also:

/section/title?c=category is valid (returns true)

Even if the above URLs may not match any real use case, that’s how things works on the background. TXP evaluates if the &c=name ($c variable) is set, and so, if_category returns true, even if on an individual article.

The possible “workarounds”:

  • test for if_individual_article instead of testing for if_category
  • test for if_article_list first and then nest a if_category (aka “if_category_list” tag, yet to be invented).

Thanks, graeme!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#522 2009-11-03 23:30:32

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: gbp_permanent_links

Thanks for letting us know, Julián!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#523 2009-11-08 22:26:56

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: gbp_permanent_links

One issue I’m having for end-users, not sure if it’s specific to Txp 4.2: even wtih Freelancer privileges, I can see and edit the settings of this plugin in the Admin tab.

Offline

#524 2009-11-08 23:07:09

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: gbp_permanent_links

Funny I never remarked that. Thanks for the heads-up!

In the gbp library look for:
@var $permissions = ’1,2,3,4,5,6’;@ (two instances)
change to the user levels that you need there.

See graeme’s post

Last edited by uli (2009-11-10 14:49:49)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#525 2009-11-10 02:16:49

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: gbp_permanent_links

Thanks mate! Yeah, I think it’s probably prudent to make it default to at least 1,2,3, if not just 1!?

Offline

#526 2009-11-10 14:11:24

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

Re: gbp_permanent_links

uli wrote:

In the gbp library look for:
var $permissions = '1,2,3,4,5,6'; (two instances)
change to the user levels that you need there.

Instead of modifying the admin library can I suggest you define var $permissions = etc... in the PermanentLinks, PermanentLinksBuildTabView and PermanentLinksListTabView classes within the gbp_pl source. The admin library is used for other plugins (eg. MLP) so any changes made to it would also effect them too.

Offline

#527 2009-11-10 14:27:29

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: gbp_permanent_links

graeme wrote:

The admin library is used for other plugins (eg. MLP) so any changes made to it would also effect them too.

Ouch! Thanks


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#528 2009-11-14 17:13:28

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: gbp_permanent_links

Any tips on getting this plugin to play nice with jmd_rate? See my issues in that plugin’s thread.

Offline

Board footer

Powered by FluxBB