PDA

View Full Version : "Mark Forum Read" goes back to forum home


TheEDIGuy
01-24-2004, 10:00 PM
Currently, VB3 RC3 functionality takes you up one forum level when you mark a forum as "read". For those of us with categories, this is not very easy on our users, as it takes you back to the category listing.

This small php code edit will change the functionality to take you all the way back to the Forum Home when you mark a forum as "read" instead. This has only been tested on RC3, and is currently working on my system as advertised. There is 1 file edit, and 0 template edits.

1. Open your forumdisplay.php file.

2. In the "start mark forums read" section, find:

if ($foruminfo['parentid'] == -1)
{
$url = "$vboptions[forumhome].php?$session[sessionurl]";
}
else
{
$url = "forumdisplay.php?$session[sessionurl]f=$foruminfo[parentid]";
}

3. Replace that code with:

$url = "$vboptions[forumhome].php?$session[sessionurl]";

4. Save forumdisplay.php and upload it to your server.

You may PM me or post here with questions and comments, although I will not provide code changes for any different functionality than provided here. This is something that my users wanted, and I've provided it here for others, no more and no less.

*01/25/04 - Updated to fix a small mistake.

admiralapril
01-25-2004, 08:48 PM
This is exactly what I'm looking for, but I can't get it to work. :disappointed:

I found the code that you said to find, replaced the whole block with the one line of code that you said to, uploaded it but it doesn't redirect back to the home page after I click the mark forum read link. It marks the forums read and then brings me back to the same forum. I am using RC3. Any help would be most appreciated!

TheEDIGuy
01-25-2004, 09:31 PM
Ack. I included one line too many when I was copying and pasting in here. Put this line back, after the one I have listed to leave:

eval(print_standard_redirect('markread'));

Sorry about that. I'll edit the post above to be correct.

admiralapril
01-25-2004, 09:42 PM
Thank you so much!! It works like a charm now. :classic: I really appreciate it! I asked how to do this last week and got no response. I was coming here to ask again and I stumbled onto your thread. :cool:

TheEDIGuy
01-25-2004, 09:44 PM
Glad that worked, and I'm happy you like it. It has been the biggest complaint my users have for a while now - both when you'd mark read and it would just stay on the forum, and when it only went up to the category. Seems they're only happy when it brings you to the main listing. :)

BustaCap
02-24-2004, 12:00 AM
I've wanted (and asked) for this for a long time, thanks! Works great.

Boofo
02-24-2004, 08:08 AM
Simple, yet elegant. ;) Thank you, sir. ;)

PET
03-26-2004, 12:26 AM
I had 1 user ho complain about this...no reason to complain now. THanx :)

FleaBag
04-07-2004, 04:54 PM
Thanks for this, I've also heard a few gripes over the years and this fixes the problem. :)

trulylowcarb
03-18-2005, 07:59 AM
An old mod that still works like a charm and is still needed. :)

Razasharp
03-18-2005, 06:32 PM
Yep works here too! Well done :-)

admiralapril
08-21-2005, 06:25 AM
I wondered if we could have an updated bit of code for 3.5.0? :classic: The coding for this section has changed a bit.