derfelix
01-19-2010, 06:14 AM
Hello,
I have a little problem using exec_header_redirect
For a hackpage.. using posting similar to imagecomments i want to do following:
(that used to work in older vb versions)
if there is a postid present, i want to add an anchor jumpmark to the url, just as vbulletin does in showthread.php...
everything is fine.. at the end I have a redirect..
(example:)
$postid=4;
if($postid)
{
exec_header_redirect($url . "#postid$postid");
}
else
{
exec_header_redirect($url);
}
it works except it sends me to the $url without the #postid$postid even if the postid is present
....
I looked into it.. and exec_header_redirect calls the function: create_full_url
before processing the url..
create_full_url rebuilds the url and strips the anchor jump... :(
so exec_header_redirect behaves like expected...
BUT:
in showthread.php i can find:
if ($posts['postid'])
{
unset($pageinfo['goto']);
$pageinfo['p'] = $posts['postid'];
exec_header_redirect(fetch_seo_url('thread|js', $threadinfo, $pageinfo) . "#post$posts[postid]");
}
else
{
unset($pageinfo['goto']);
$pageinfo['p'] = $threadinfo['lastpostid'];
exec_header_redirect(fetch_seo_url('thread|js', $threadinfo, $pageinfo) . "#post$threadinfo[lastpostid]");
}
and there it seems to work....
I am really stuck.. any help, hint etc.. would be very appreciated..
I dont think it has todo with the fetch_seo_url (which i dont use because the #postxxx is anyway added afterwards)
F.
I have a little problem using exec_header_redirect
For a hackpage.. using posting similar to imagecomments i want to do following:
(that used to work in older vb versions)
if there is a postid present, i want to add an anchor jumpmark to the url, just as vbulletin does in showthread.php...
everything is fine.. at the end I have a redirect..
(example:)
$postid=4;
if($postid)
{
exec_header_redirect($url . "#postid$postid");
}
else
{
exec_header_redirect($url);
}
it works except it sends me to the $url without the #postid$postid even if the postid is present
....
I looked into it.. and exec_header_redirect calls the function: create_full_url
before processing the url..
create_full_url rebuilds the url and strips the anchor jump... :(
so exec_header_redirect behaves like expected...
BUT:
in showthread.php i can find:
if ($posts['postid'])
{
unset($pageinfo['goto']);
$pageinfo['p'] = $posts['postid'];
exec_header_redirect(fetch_seo_url('thread|js', $threadinfo, $pageinfo) . "#post$posts[postid]");
}
else
{
unset($pageinfo['goto']);
$pageinfo['p'] = $threadinfo['lastpostid'];
exec_header_redirect(fetch_seo_url('thread|js', $threadinfo, $pageinfo) . "#post$threadinfo[lastpostid]");
}
and there it seems to work....
I am really stuck.. any help, hint etc.. would be very appreciated..
I dont think it has todo with the fetch_seo_url (which i dont use because the #postxxx is anyway added afterwards)
F.