[wp-hackers] Need help upgrading CG-Related plugin to 1.3...

David Chait davebytes at comcast.net
Sun Oct 24 05:54:32 UTC 2004


CG-Related lets you set explicit relations between posts.  I use mini 
forms/buttons for 'inline' administrative control, so you can set the links 
just by navigating the site normally -- just that extra 'buttons' appear 
when needed, where needed.

I've gotten over the hump of $p not necessarily being around, but now I'm 
running into some weirdness with refreshing the page.

When I want to start adding 'relations' to a given post, there's a form 
button that gets pressed.  The result of that press is supposed to be a POST 
from the form, with the form action set to 
htmlspecialchars($_SERVER["REQUEST_URI"]).  This always worked before...

Now, under 1.3 (well, and running under PHP5 in cases...), when I start with 
a URI like:
http://mysite/blog/index.php?p=1
... and I click my 'start' button, the resulting page I'm sent to is:
http://mysite/blog/index.php?p=1?p=1
... which drives my code batty!

I have other cases on CG where I've seen this 'multiple concatenation' thing 
occur -- in fact, one of the search engines seems to have a longer and 
longer query string each time it hits my site.  But that's old code, and 
another story... ;)

What exactly SHOULD I be doing to have a form properly post a re-load of the 
current page, so that I can grab new info from a POST (and from a cookie) so 
that I properly show/hide buttons or otherwise 'react' to their having been 
clicked?

Thanks all,

-d 





More information about the hackers mailing list