[wp-hackers] Custom Permalinks - how to?
Dan Kuykendall
dan at kuykendall.org
Tue Jun 13 20:05:23 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
you may want to look at the podPress plugin and how I handle the stats
functionality.
http://www.mightyseek.com/podpress/
It seems to match up closely with what you want to accomplish
Niels Hackius wrote:
> Sam, Brian, fellow Hackers,
> thank you very much for the quick answers - I realize there has talk
> about a problem similar to this: However I am more going in the
> direction that besides passing on a variable I would like to go to a
> specific page too:
>
> I already have a template-redirection-Function that looks like this:
>
> function SingaporeGetTemplate($vars)
> {
> if($this->SingaporeIsPage()){
> if (file_exists(TEMPLATEPATH . '/singapore_page.php')) {
> include(TEMPLATEPATH.'/singapore_page.php');
> exit;
> }
> else {
> add_filter("the_content",
> array($this,"SingaporeTheContentInclude"));
> }
> }
> }
>
> I also implemented Sams suggestions, but that doesn't make any
> difference right now.
>
> Is it even possible to have redirect target like this:
> "index.php?page_id=67". Because on a normal page redirect the id isn't
> shown. It looks more like this:
>
> [index.php/fotos/([^/]+)/?$] => index.php?attachment=$matches[1]
> [index.php/fotos/([^/]+)/trackback/?$] =>
> index.php?attachment=$matches[1]&tb=1
> [index.php/fotos/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =>
> index.php?attachment=$matches[1]&feed=$matches[2]
> [index.php/fotos/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =>
> index.php?attachment=$matches[1]&feed=$matches[2]
> [index.php/fotos/attachment/([^/]+)/?$] =>
> index.php?attachment=$matches[1]
> [index.php/fotos/attachment/([^/]+)/trackback/?$] =>
> index.php?attachment=$matches[1]&tb=1
> [index.php/fotos/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$]
> => index.php?attachment=$matches[1]&feed=$matches[2]
> [index.php/fotos/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$]
> => index.php?attachment=$matches[1]&feed=$matches[2]
>
> How does Wordpress know which page to flip open right there?
>
> Thank you so much for helping out,
> Niels Hackius
>
> 2006/6/13, Sam Angove <sam at rephrase.net>:
>> On 6/14/06, Niels Hackius <niels at hackius.de> wrote:
>> >
>> > What it outputs in the rewrite-rule-Array is this:
>> > [index.php/gallery/(.+)/?$] => index.php?page_id=67&gallery=$matches[1]
>> >
>>
>> That looks like the right rule to me. Does WordPress know about the
>> "gallery" query var? Something like:
>>
>> function singaporeAddQueryVar($vars) {
>> $vars[] = 'gallery';
>> return $vars;
>> }
>> add_filter('query_vars', 'singaporeAddQueryVar');
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
>
- --
Dan Kuykendall (aka Seek3r)
http://www.mightyseek.com
In God we trust, all others we virus scan.
Programmer - an organism that turns coffee into software.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEjxqDK8FkGutbdPMRApndAJ9mWGQX//DEoG9FqK5gThRBrM96TgCfYLY9
XLiUIkvIIRZABy+y5T2K6zo=
=Ul21
-----END PGP SIGNATURE-----
More information about the wp-hackers
mailing list