Announcement

Collapse
No announcement yet.

Front-End Redirect Message is not displayed long enough

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Front-End Redirect Message is not displayed long enough

    When someone posts to a forum which has moderation turned on they see the following message but it doesn't display long enough to read the entire message before re-directing back to the forum. Can this be adjusted?

    Front-End Redirect Messages Phrases
    postthanks
    Standard Phrase: Thank you for posting! You will now be taken to your post. If the administrator has selected to moderate all posts in this forum, you will be taken back to the forum and your post will be displayed presently. If you opted to post a poll, you will now be allowed to do so.

  • #2
    Admin CP -> Styles & Templates -> Style Manager -> -> STANDARD_REDIRECT

    Change the numbers in red:

    Code:
    <if condition="is_browser('mozilla')">
    	<script type="text/javascript">
    	<!--
    	function exec_refresh()
    	{
    		window.status = "$vbphrase[redirecting]" + myvar;
    		myvar = myvar + " .";
    		var timerID = setTimeout("exec_refresh();", 100);
    		if (timeout > 0)
    		{
    			timeout -= 1;
    		}
    		else
    		{
    			clearTimeout(timerID);
    			window.status = "";
    			window.location = "$js_url";
    		}
    	}
    	
    	var myvar = "";
    	var timeout = 20;
    	exec_refresh();
    	//-->
    	</script>
    <else />
    	<meta http-equiv="Refresh" content="2; URL=$url">
    </if>
    The first one is used for Mozilla browsers. I don't completely understand that javascript code, but I tried changing that number and was able to notice a difference in the refresh time. I don't know what units it uses.

    The second one is used for all other browsers. That is the number of seconds to wait.

    Comment


    • #3
      Thanks, Jake. I changed those numbers to 1000 and 10 respectively and I now have time to read the entire message.

      Comment


      • #4
        I just changed both my numbers from 100 to 800 and it made no difference in time. What am I doing wrong here?

        PHP Code:
        $stylevar[htmldoctype]
        <
        html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
        <
        head>
        <if 
        condition="is_browser('mozilla')">
         <
        script type="text/javascript">
         <!--
         function 
        exec_refresh()
         {
          
        window.status "$vbphrase[redirecting]myvar;
          
        myvar myvar " .";
          var 
        timerID setTimeout("exec_refresh();"800);
          if (
        timeout 0)
          {
           
        timeout -= 1;
          }
          else
          {
           
        clearTimeout(timerID);
           
        window.status "";
           
        window.location "$js_url";
          }
         }
         
         var 
        myvar "";
         var 
        timeout 20;
         
        exec_refresh();
         
        //-->
         
        </script>
        <else />
         <
        meta http-equiv="Refresh" content="2; URL=$url/>
        </if>
        $headinclude
        <title>$pagetitle</title>
        </
        head>
        <
        body>
        <
        br />
        <
        br />
        <
        br />
        <
        br />
        <
        form action="$urlmethod="get">
        <
        table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="70%" align="center">
        <
        tr>
         <
        td class="tcat">$vbphrase[redirecting]</td>
        </
        tr>
        <
        tr>
         <
        td class="panelsurround" align="center">
         <
        div class="panel">
           
          <
        blockquote>
           <
        p>&nbsp;</p>
           <
        p><strong>$errormessage</strong></p>   
           <
        class="smallfont"><a href="$url">$vbphrase[click_if_browser_does_not_redirect]</a></p>
           <
        div>&nbsp;</div>
          </
        blockquote>
           
         </
        div>
         
         <
        script type="text/javascript">
         <!--
          
        document.write('<div style="margin-top:$stylevar[cellpadding]px">');
          
        document.write('<input type="submit" class="button" value="$vbphrase[proceed]" accesskey="s" onclick="window.location=\'$url\'; return false" />');
          
        document.write('<\/div>');
         
        //-->
         
        </script>
         </
        td>
        </
        tr>
        </
        table>
        </
        form>
         
         
         

        <if 
        condition="$postvars">
        <!-- 
        redirect with POST -->
        <
        form action="$formfilemethod="post" name="postvarform">
        $postvars
        </form>
        <
        script type="text/javascript">
        <!--
        function 
        submit_form()
        {
         
        window.status "Redirecting" myvar;
         
        myvar myvar " .";
         
        timerID setTimeout("submit_form();"800);
         if (
        timeout 0)
         { 
          
        timeout -= 1;
         }
         else
         {
          
        clearTimeout(timerID);
          
        window.status "";
          
        document.forms.postvarform.submit();
         }
        }
        myvar "";
        timeout 18;
        submit_form();
        //-->
        </script>
         
        <!-- / 
        redirect with POST -->
        </if>
        </
        body>
        </
        html

        Comment


        • #5
          <meta http-equiv="Refresh" content="2; URL=$url" />

          Joey, Jake suggested you increase the numer in red in the above line of code. I increased it to 10.

          Comment


          • #6
            Is it possible to change this behavior and make the redirect page show longer only for the page that is shown to members whose post is going into moderation, but not make it take longer for the redirect page that shows up when a member logs in?
            Talk about New York | Email Help

            Comment


            • #7
              Are you really using vbulletin 3.0?

              Comment


              • #8
                3.8 The template edits above still mostly match and the info above got me 1/2 way to where I want to be.
                Talk about New York | Email Help

                Comment


                • #9
                  You can make some template conditionals- in this example all redirects besides login will be extended time:
                  VB 3.8

                  Code:
                  <else />
                  
                  
                  <noscript>
                  <if condition="THIS_SCRIPT == 'login'">
                  <meta http-equiv="Refresh" content="2; URL=$url" />
                  <else />
                  <meta http-equiv="Refresh" content="10; URL=$url" />
                  </if>
                  </noscript>
                  
                  
                  <script type="text/javascript">
                  <!--
                  function exec_refresh()
                  {
                      window.status = "$vbphrase[redirecting]" + myvar;
                      myvar = myvar + " .";
                  <if condition="THIS_SCRIPT == 'login'">
                      var timerID = setTimeout("exec_refresh();", 100);
                  <else />
                      var timerID = setTimeout("exec_refresh();", 2000);
                  </if>
                      if (timeout > 0)
                      {
                          timeout -= 1;
                      }
                      else
                      {
                          clearTimeout(timerID);
                          window.status = "";
                          window.location = "$js_url";
                      }
                  }
                  
                  
                  var myvar = "";
                  var timeout = 20;
                  exec_refresh();
                  //-->
                  </script>
                  
                  
                  </if>

                  Comment


                  • #10
                    Perfect, thanks!
                    Talk about New York | Email Help

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...
                    X