PDA

View Full Version : How do I change the "Mark this Forum Read" redirection? (quick question)


Lope
04-25-2003, 09:07 PM
Just a quick question...

Which template or file would I have to modify in order to get the "Mark this Forum Read" link to go back to index.php instead of the forum in which it was clicked?

I found this in forumdisplay.php:

if ($action=="markread") {
if ($bbuserinfo['cookieuser']) {
set_bbarraycookie('forumview', intval($forumid), time());
}

if ($url=="") {
$url="index.php?s=$session[sessionhash]";
}

$url = str_replace("\"", "", $url);
eval("standardredirect(\"".gettemplate("redirect_markreadforum")."\",\"\$url\");");
exit;
}

So I looked at redirect_markreadforum but that template was only the text that is shown on the redirect page. Where is the code that controls the actual location of the redirect?

Thanks ;)

*edit* I'm using 2.3.0

filburt1
04-25-2003, 10:24 PM
It's in the $url variable.

Lope
04-25-2003, 11:05 PM
I'm no coding expert, not even a coding novice, but this seems like it should make it go back to index.php:

if ($url=="") {
$url="index.php?s=$session[sessionhash]";
}


Is that where its setting the $url variable?

filburt1
04-25-2003, 11:16 PM
Yes.

(I'm a man of many words :p)

Brad
04-25-2003, 11:19 PM
Change:

if ($url=="") {
$url="index.php?s=$session[sessionhash]";
}


To:

if ($url!="") {
$url="index.php?s=$session[sessionhash]";
} else {
$url="index.phps=$session[sessionhash]";
}

Lope
04-26-2003, 12:07 AM
Anime-loo: Thanks.. works great :D

ps. you forgot the "?" in "...index.php?s=$session..."

Brad
04-26-2003, 12:34 AM
yes, it sould be:

if ($url!="") {
$url="index.php?s=$session[sessionhash]";
} else {
$url="index.php?s=$session[sessionhash]";
}

sorry about that, glad its working for you.