[pLog-svn] r6788 - plog/branches/lifetype-1.2/class/net
Jon Daley
plogworld at jon.limedaley.com
Thu Feb 19 13:02:14 EST 2009
Either. I figure the admin panel could have one example, with a
link to the wiki.
On Thu, 19 Feb 2009, endless enigma wrote:
> In the wiki or in the Admin Panel itself?
>
> regards,
> chromos
>
> On Thu, 19 Feb 2009 17:55:40 +0100, Jon Daley <plogworld at jon.limedaley.com>
> wrote:
>
>> Yeah, I really like this feature. I am not sure about the best way
>> to describe it to people. Any ideas?
>> Maybe just show some examples of how it works?
>>
>> On Tue, 3 Feb 2009, endless enigma wrote:
>>
>>> that's a nice one jon :)
>>>
>>> On Tue, 03 Feb 2009 02:52:41 +0100, <jondaley at devel.lifetype.net> wrote:
>>>
>>>> Author: jondaley
>>>> Date: 2009-02-02 20:52:41 -0500 (Mon, 02 Feb 2009)
>>>> New Revision: 6788
>>>> Modified:
>>>> plog/branches/lifetype-1.2/class/net/customrequestgenerator.class.php
>>>> Log:
>>>> allow fancier custom URLs. I'll write up some documentation at some
>>>> point, but I've had a couple requests for this, and I'm now using it on
>>>> my own blog. This is actually quite handy for migrating people from
>>>> 'search engine friendly' URLs to custom URLs, since now they both can be
>>>> accepted, but the new URL is published. The second preg_replace() call
>>>> replaces all str_replace() calls, and the first preg_replace is the new
>>>> feature
>>>> Modified:
>>>> plog/branches/lifetype-1.2/class/net/customrequestgenerator.class.php
>>>> ===================================================================
>>>> --- plog/branches/lifetype-1.2/class/net/customrequestgenerator.class.php
>>>> 2009-02-03 01:45:06 UTC (rev 6787)
>>>> +++ plog/branches/lifetype-1.2/class/net/customrequestgenerator.class.php
>>>> 2009-02-03 01:52:41 UTC (rev 6788)
>>>> @@ -438,12 +438,11 @@
>>>> */
>>>> function _replaceTags( $format, $tags )
>>>> {
>>>> - $result = $format;
>>>> - $result = str_replace( "$", "", $format );
>>>> - $result = str_replace( "(", "", $result );
>>>> - $result = str_replace( ")", "", $result );
>>>> - $result = str_replace( "?", "", $result );
>>>> - $result = str_replace( "\\", "", $result );
>>>> + // allow such things as archive_link_format:
>>>> + // /archives/(?:{year}/{month}/{day}/)?{postname}$
>>>> + //
>>>> /(?:post|archives)/(?:{year}/{month}/{day}/)?{postname}$
>>>> + $result = preg_replace("/\(\?:([^\)\|]*)([^\)]*)\)/", "$1",
>>>> $format);
>>>> + $result = preg_replace("/[$()?\\\\]/", "", $result);
>>>> foreach( $tags as $key => $value ) {
>>>> $result = str_replace( $key, $value, $result );
>>>> }
>>>> _______________________________________________
>>>> pLog-svn mailing list
>>>> pLog-svn at devel.lifetype.net
>>>> http://limedaley.com/mailman/listinfo/plog-svn
>>>>
>>>
>>>
>>>
>>>
>>
>
>
>
>
--
Jon Daley
http://jon.limedaley.com
~~
Blessed is the person who is too busy to worry
in the daytime and too sleepy to worry at night.
-- Unknown
More information about the pLog-svn
mailing list