Re: Help for Plugin Noob

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help for Plugin Noob

Eric Hochberger
Jamie,

Wow so that did reveal one problem -- there's already a /directory/?$  
rewrite.  I've changed mine to /resources/

However, I tried dumping the entire rules array and I don't even see  
my new rule I added.  Any idea why it would not be adding my rule?

Thanks,
Eric

On Jan 28, 2006, at 4:42 AM, Jamie Talbot wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Eric Hochberger wrote:
>> Hey guys,
>>
>> Also, when I type in the query ?ld_home=1, the template does load  
>> correctly.  It's just the mod
>> rewrite that is not working.
>>
>> Code to at the bottom:
>>
>> Thanks, Eric
>
>> function ld_rewrite_rules($old_rules) {
>> $my_rules['directory/'] = '/index.php?ld_home=1';
>>
>> return array_merge($my_rules, $old_rules); }
>> add_filter('rewrite_rules_array','ld_rewrite_rules');
>
>
> Have you tried dumping out the rewrite rules to check the order  
> that they are being applied in?
>
> You can print_r the result of your array_merge() to check that  
> they're in the correct order.
>
> Also, you could try this:
>
> echo "Match: " ; print_r($match);
>
> after the line $this->matched= $match; in classes.php on or about  
> line 1545.
>
> Which will tell you what rule is being matched.  That might give  
> you a bit more information to help
> you debug.
>
> Cheers,
>
> Jamie.
>
> - --
> http://jamietalbot.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFD2zxqrovxfShShFARAikDAKCAPUfk7mHS6p5ziEE94Yhp9vUsxQCfSnfo
> 5VcFcVpjVbqtQwEBm4+fqfY=
> =p8A1
> -----END PGP SIGNATURE-----
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help for Plugin Noob

Jamie Talbot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Hochberger wrote

> Jamie,
>
> Wow so that did reveal one problem -- there's already a /directory/?$
> rewrite.  I've changed mine to /resources/
>
> However, I tried dumping the entire rules array and I don't even see  my
> new rule I added.  Any idea why it would not be adding my rule?
>
> Thanks,
> Eric

Did you dump the array after your rules were added?  Silly question, but worth checking.  You might
try passing by reference instead of using array_merge().  Not sure if that will help though, sorry.
 You don't want to a new query variable, do you?  Just a simple redirect if the base is /directory ?

Jamie.

- --
http://jamietalbot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD4rHhrovxfShShFARAoEkAJ0cCRchhCYM+CXFAvJ9YOb2+r+xpgCfRKVV
p1IAXNoqT+aRjfiQBl5IVFo=
=+pg1
-----END PGP SIGNATURE-----
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...