Page 1 of 1

Custom Permalinks plugin !

Posted: Sat Jan 24, 2009 5:14 pm
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

Re: Custom Permalinks plugin !

Posted: Mon Jan 26, 2009 10:39 am
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

Posted: Tue Jan 27, 2009 3:20 am
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).

Posted: Tue Jan 27, 2009 11:31 am
by garvinhicking
Hi!

I'll check into this.

Regards,
Garvin

Posted: Thu Jan 29, 2009 12:56 pm
by garvinhicking
Hi!

Committed & Fixed in version 1.13 of the plugin.

Regards,
Garvin

Posted: Thu Jan 29, 2009 3:33 pm
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?

Posted: Thu Jan 29, 2009 4:02 pm
by garvinhicking
Hi!

What do you mean with duplication?

Regards,
Garvin

Posted: Thu Jan 29, 2009 4:32 pm
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.

Posted: Thu Jan 29, 2009 4:44 pm
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

Posted: Thu Jan 29, 2009 5:01 pm
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??

Posted: Thu Jan 29, 2009 5:11 pm
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

Posted: Thu Jan 29, 2009 7:16 pm
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.

Posted: Thu Jan 29, 2009 8:56 pm
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.

Posted: Fri Jan 30, 2009 4:22 pm
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/.