Custom Permalinks plugin - editing the prefix

Creating and modifying plugins.
Post Reply
Christine
Regular
Posts: 54
Joined: Wed Mar 25, 2009 11:50 pm

Custom Permalinks plugin - editing the prefix

Post by Christine »

Hi, I'm wanting to use the Custom Permalinks plugin again, but my problem with it is it automatically gives every entry a prefix of /permalink. The biggest issue with this is if I need to go back and edit a previously published post, it will change the URL unless I remember to edit that too. It also would be easier if I didn't have to change the prefix manually on every new post.

My question is, is there a way I can edit this in the plugin? Playing around, I found I could change 'permalink' here to get the result I wanted:

Code: Select all

? $serendipity['serendipityHTTPPath'] . 'permalink/' . serendipity_makeFilename($title) . '.html'
Just wanted to check if that was safe to do, and if I needed to change anything else.
Christine
Regular
Posts: 54
Joined: Wed Mar 25, 2009 11:50 pm

Re: Custom Permalinks plugin - editing the prefix

Post by Christine »

I also forgot this plugin has a problem where if I use a custom URL, the comments section no longer shows up. Any way to fix this?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Custom Permalinks plugin - editing the prefix

Post by garvinhicking »

Hi!

Hm, usually it should only show you the /permalink/ path, when the current value could not be found. You shouldn't need to set it time and again.

Can you check if your serendipity_entryproperties database table exists? Check if for a given blog entry ID you can see the permalink value in there with a tool like phpMyAdmin (if you don't know how to do that, report back)

The line you found affects that default permalink, which you could change at that place, yes. Thinking about this, of course it would make sense to be able to configure a default.

About not showing comments, it could be that your template is not detecting the output of the plugin as a "full page" for the blog entry. Which serendipity version and which template are you using?

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/
Christine
Regular
Posts: 54
Joined: Wed Mar 25, 2009 11:50 pm

Re: Custom Permalinks plugin - editing the prefix

Post by Christine »

Sorry, forgot to get back to this and just wanted to say I appreciate your reply. I found I don't need the plugin right now but next time I'm playing with it, I'll get back to your suggestions/questions.
samsmith150
Posts: 1
Joined: Tue Aug 29, 2017 8:21 am
Location: Australia
Contact:

Re: Custom Permalinks plugin - editing the prefix

Post by samsmith150 »

How to make sub category permalink like /people/people-name .
Post Reply