vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   How do I change the "Mark this Forum Read" redirection? (quick question) (https://vborg.vbsupport.ru/showthread.php?t=52142)

Lope 04-25-2003 09:07 PM

How do I change the "Mark this Forum Read" redirection? (quick question)
 
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:

PHP Code:

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:

PHP Code:

    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:

PHP Code:

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

To:

PHP Code:

    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:

PHP Code:

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

sorry about that, glad its working for you.


All times are GMT. The time now is 06:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05161 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete