Custom Permalinks plugin !

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
ameo
Regular
Posts: 143
Joined: Fri Sep 26, 2008 4:13 am

Custom Permalinks plugin !

Post by ameo »

is it possible to set a default premalink for the custom Permalink plugins? so that i won't have to keep on changing it for each singe post?

like setting it to the default entry premalinks!

Hope you got what i mean.

Thanks

Edit:
just a suggestion.. is it possible to get some feed update about Spartacus new/updated plugins? using with any feed reader will be a better way to keep an eye on s9y plugins updates
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Custom Permalinks plugin !

Post by garvinhicking »

Hi!

Actually, if you want to use the default permalink, you can leave the custom permalink empty; the usual permalink should always work despite of this?
just a suggestion.. is it possible to get some feed update about Spartacus new/updated plugins? using with any feed reader will be a better way to keep an eye on s9y plugins updates
We use CVS on sourceforge for managing the plugins, and I believe there is no default RSS-Feed for comits like Trac offers.

What you can do is subscribe to this mailinglist: http://sourceforge.net/mailarchive/foru ... plugin-cvs

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

I think this thread is a better place to continue the discussion I resumed on this thread: http://board.s9y.org/viewtopic.php?t=13657

My problem there dealt with the value of $view for custom permalink pages.

Check this sandbox: http://www.optional-necessity.com/sandbox/

This is a test site, and the content will not survive long. However, I have 2 entries there - one with a custom permalink, and one without. To keep this simple, I used the carl_contest template, and not something with tons of options like BP.

I modified index.tpl to always emit the value of $view. Clicking on the entry with a custom permalink, you can see that $view does not equal 'entry', even though the plugin code suggests that is what should happen.

I checked this on a few different s9y installs, and the behavior exists in 1.4.1, 1.4beta, and 1.3.1. Plugin order did not matter. The only plugins active on this sandbox at this moment in time are Custom Permalinks, NL2BR, Spam Protector, and Spartacus (in that order).
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I'll check into this.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Committed & Fixed in version 1.13 of the plugin.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

I'll test it as soon as I can Garvin. Thanks for looking into it. Does this plugin do anything to prevent duplication in the custom permalink?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

What do you mean with duplication?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Preventing an author from assigning the same permalink to more than a one entry.... Because this plugin requires the author to supply the permalink, there seems to be the risk of human error by creating 2 entries with the same permalink and not even realizing it.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yeah, just like with staticpages, there is no mechanism to enforce uniqueness; first come, first serve. ;)

IMHO if people worry about duplicates, using the usual permalink mechanism is preferrable. I agree though that it would be nice to add duplicate checks to the plugin, but I figure that's a bit fumbling around as giving feedback to the user about duplicity is not that easy. An AJAX on-the-fly-check would be easiest, but would requie a complete external_plugin event routine.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Yeah, I figured there was no check for duplication.... and I do not have the skills to make it happen. One final question, then I'll leave ya alone. Using either this plugin, or the regular permalink creation, is there any way to get the path to an entry to include the category name? Asking this question, I realize at least one immediate problem would be the instance where an entry belongs to more than a single category. Maybe the properties/templates of categories plugin??
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, there is - sine serendipity 1.4! :-)

You can use, I believe %category% inside the normal category creation. It should be documented in the docs/NEWS file, if %category% does not work.

When multiple categories are defined, I believe only the first assigned category is used.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Garvin - I didn't see anything in the news file.... I did see this though:
* Added %parentname% permalink property to category structure,
so that a full category name path can be used instead of only
%name%. (garvinhicking) [1.4-beta2]
But that is not really what I am after. Assume I am on the front page of my site. I have an entry titled "testing" and I have published it in my category "orange". What I want to know is can an entry ALWAYS have the category name in its URL, such as http://www.somewhere.com/archives/orange/testing.html ? I guess it would be the equivalent of putting category %name% in the archive URL configuration.
=Don=
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

No, the %name% can't be added to the entry. The code wouldn't recognize it. It'd require an extra DB lookup, at least, to make it function.

It would be nice, though.
Judebert
---
Website | Wishlist | PayPal
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

I tested your modification Garvin, and it works fine now. Thanks for the fix!

Regarding the custom permalink plugin - perhaps it would be nice to be able to specify a default path as a configuration option. Right now, the path is "permalink".... having that in an input field so it could be changed might be nice....

Regarding the s9y built in permalink structure - any chance of implementing my request to allow the category name be part of the path if provided? The reason for this BTW is that I can do different things on the page if the URL being displayed includes certain text... for instance, I can change what I display in the sidebar if the url is http://www.somewhere.com/archives/natio ... icle1.html but make it different if instead of "national" the URL contains the path /archives/world/.
=Don=
Post Reply