[pLog-svn] force post names to be unique
Jon Daley
plogworld at jon.limedaley.com
Thu Apr 6 19:23:03 GMT 2006
There isn't anything fancy, you just have to make sure you get all cases,
otherwise you have stuff being redirected to blog.php when you didn't want
it to.
This is the current, but possibly not complete list that we have. It does
have some customizations that a regular lifetype install wouldn't have,
ie. signup.php.
It would be great to have you write documentation - I am not all that
excited about that. I will check in the code tonight or tomorrow if I
don't hear any objections. I believe it only affects
blogaction.class.php.
# Don't redirect if we are looking for the main page
RewriteCond %{REQUEST_URI} !^/$
# don't rewrite php files that exist.
RewriteCond %{REQUEST_URI} !^/((jondaley|main|features|signup|admin|blog|error|index|resserver|rss|summary|register|trackback|xmlrpc|moo|aformmail|wizard).php)
# don't rewrite php scripts that don't have a .php extension
RewriteCond %{REQUEST_URI} !^/(album|blog|category|comment|get|post|resource|rss|static|trackbacks|user|content|page)/
# don't rewrite real files
RewriteCond %{REQUEST_URI} !^/(robots.txt|favicon.ico|homepage.css|bg.gif|headerbg.jpg|logotop.jpg|header.jpg|logobottom.jpg)
# don't rewrite real directories
RewriteCond %{REQUEST_URI} !^/((images|imgs|js|styles|templates|tmp|directory)/)
RewriteRule ^(.*)$ blog.php/$1
On Thu, 6 Apr 2006, Reto Hugi wrote:
> Hi Jon
>
> This sounds like an interesting option. I'd suggest you implement it
> like this:
>
> define('UNIQUE_SLUG', 0);
>
> if ( $this->_config->getValue( "use_unique_slug", UNIQUE_SLUG) == 1 )
> [...]
>
> what are the additions to the htaccess?
>
> further more it might be nice if we had it documented under advanced
> topics (administration) in the wiki. I'd gladly help with that, just
> provide me the raw content, I'll do the rest.
>
> reto
>
> On 06.04.2006 19:56, Jon Daley wrote:
>> I have a feature that I don't know if anyone else cares about.
>> And I sort of don't want it on the public user settings, since it requires
>> additions to the .htaccess, so I would rather people not stumble across
>> it, but rather explicitly want it.
>> If you have your custom url for posts set to /{postname}
>> (subdomains enabled) you have to enforce that the slugs across all posts
>> in a blog are unique.
>> I have a pretty simple patch that adds a number to the end of the
>> slug, and increments it until the name is unique.
>>
>> So, the question is - should I add this into the main code with a
>> config option that isn't visible on the settings, and you have to just add
>> the row to your sql database if you want to turn it on?
>>
>>
>>
>> **************************************
>> Jon Daley
>> http://jon.limedaley.com/
>>
>> I pass chain letters along to all my friends. AND I VOTE!
>> -- Cort Stratton
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
**************************************
Jon Daley
http://jon.limedaley.com/
God put me on Earth to accomplish a certain number of things.
Right now I'm so far behind I will never die!
-- Unknown
More information about the pLog-svn
mailing list