Topic: The redirection message...

When I choose 0 seconds redirection time, I think the entire redirection message should dissapear. Now it just "flashes", and I find that rather anoying. I have modified the script my self and commented the code that displays the message, but I think it would be better if the option existed in the official version.

Thats all I had to say!

/Christian

Re: The redirection message...

well the redirection message is there to tell users something happened its meant to be there...

Re: The redirection message...

Connorhd wrote:

well the redirection message is there to tell users something happened its meant to be there...

Then why is there an option to show the message for 0 second, I don't think anyone can read that fast smile

Re: The redirection message...

That is true. big_smile

Re: The redirection message...

just because you can enter 0 doesn't mean it should be set to 0

Re: The redirection message...

I've said it before and I'll say it again. The redirect page is there to provide the end user with valuable feedback. The sense that when you press a button, something happens and you are informed of what has happened. It's a cornerstone in usability engineering. You can't just skip the feedback. Users will be lost.

Edit: But since you aren't the first to request it, I've "fixed" it in 1.2 :) If you set the redirect time to 0 seconds, it will redirect immediately via header('Location bla.php') instead of outputting the redirect page.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: The redirection message...

Rickar: Ok, great smile

Re: The redirection message...

i think it's better with the redirection page...

Guess what ??? username seth was allready taken :(

Re: The redirection message...

Have to say I disagree.

I regularly use a forum / talkboard that doesn't have the redirect page for everything. This talkboard is used by thousands of usrs, many of them not very techy oriented at all but they all seem to manage pretty damned well. When I started using BBs that did have it I found it a hinderance and didn't think that it aided useablility at all.

When deleting etc it is good but I think that it is especially unecessary when adding a new post.

Re: The redirection message...

Is it possible to have the redirect page only in certain cases?

Re: The redirection message...

Yes, but not without hacking the source.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: The redirection message...

Might give it a try then smile

Re: The redirection message...

you could edit the redirect fuction to have an optional override of the time then go through the code and anywhere that you wanted tha instant redirect ad ,0 to the end of it

something like

function redirect($destination_url, $message, $time = $pun_config['o_redirect_delay'])
{
    global $db, $pun_config, $lang_common, $pun_user;

    if ($destination_url == '')
        $destination_url = 'index.php';
        
    // If the delay is 0 seconds, we might as well skip the redirect all together
    if ($time == '0')
        header('Location: '.str_replace('&', '&', $destination_url));

    // Load the redirect template
    $tpl_redir = trim(file_get_contents(PUN_ROOT.'include/template/redirect.tpl'));

    // START SUBST - <pun_content_direction>
    $tpl_redir = str_replace('<pun_content_direction>', $lang_common['lang_direction'], $tpl_redir);
    // END SUBST - <pun_content_direction>

    // START SUBST - <pun_char_encoding>
    $tpl_redir = str_replace('<pun_char_encoding>', $lang_common['lang_encoding'], $tpl_redir);
    // END SUBST - <pun_char_encoding>

    // START SUBST - <pun_head>
    ob_start();

?>
<meta http-equiv="refresh" content="<?php echo $time ?>;URL=<?php echo $destination_url ?>" />
<title><?php echo pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Redirecting'] ?></title>
<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
<?php

    $tpl_temp = trim(ob_get_contents());
    $tpl_redir = str_replace('<pun_head>', $tpl_temp, $tpl_redir);
    ob_end_clean();
    // END SUBST - <pun_head>


    // START SUBST - <pun_redir_heading>
    $tpl_redir = str_replace('<pun_redir_heading>', $lang_common['Redirecting'], $tpl_redir);
    // END SUBST - <pun_redir_heading>


    // START SUBST - <pun_redir_text>
    $tpl_temp = $message.'<br /><br />'.'<a href="'.$destination_url.'">'.$lang_common['Click redirect'].'</a>';
    $tpl_redir = str_replace('<pun_redir_text>', $tpl_temp, $tpl_redir);
    // END SUBST - <pun_redir_text>


    // START SUBST - <pun_footer>
    ob_start();

    // End the transaction
    $db->end_transaction();

    // Display executed queries (if enabled)
    if (defined('PUN_SHOW_QUERIES'))
        display_saved_queries();

    $tpl_temp = trim(ob_get_contents());
    $tpl_redir = str_replace('<pun_footer>', $tpl_temp, $tpl_redir);
    ob_end_clean();
    // END SUBST - <pun_footer>


    // START SUBST - <pun_include "*">
    while (preg_match('<pun_include "(.*?)">', $tpl_redir, $cur_include))
    {
        ob_start();
        include PUN_ROOT.$cur_include[1];
        $tpl_temp = ob_get_contents();
        $tpl_redir = str_replace('<'.$cur_include[0].'>', $tpl_temp, $tpl_redir);
        ob_end_clean();
    }
    // END SUBST - <pun_include "*">


    // Close the db connection (and free up any result data)
    $db->close();

    exit($tpl_redir);
}

for redirect(url, message[, time])
i think

Re: The redirection message...

SPlendid, I'll try that in a little while.

Need to start working on trying to integrate the logins with those I already have on the site but I believe that that is for another thread...