vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Redirect Re-write (https://vborg.vbsupport.ru/showthread.php?t=234200)

PukkaBen 01-25-2010 10:00 PM

Redirect Re-write
 
1 Attachment(s)
What does it do?
This Mod simply smartens up the Redirect page users get when they login to the site. The change that has been made moves the button "Click here if your browser does not automatically redirect you." into the bordered box which (in my eyes) makes the page look a lot more professional and also looks smarter.

Why did I do it?
IT has bugged me since I installed vB4 as a BETA, and I have had this template change on my site since I found the template to edit. It may not be for everyone, and some may even find it pretty stupid that I have even put this edit up on vB.orb but I feel that it makes everything look a lot neater than default!

How to make this change
Enter the Admin CP. Navigate to Styles and Templates -> Style Manager. Chose the style you want to edit, and from the drop-down menu select Edit Templates (at the top of the list). Now open up and edit the "STANDARD_REDIRECT" template. Remove all of the code that is in there, and replace with what is in the box below.

PHP Code:

{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<
head>
    {
vb:raw headinclude}
    <
title>{vb:raw pagetitle}</title>
    {
vb:raw headinsert}
    
{
vb:raw headinclude_bottom}
</
head>
<
body>

<
div class="standard_error">
    <
form class="block vbform" method="post" action="{vb:raw formfile}" name="postvarform">
        <
h2 class="blockhead">{vb:rawphrase redirecting}</h2>
        <
div class="blockbody formcontrols">
            <
class="blockrow restore">{vb:raw errormessage}</p>
            <
vb:if condition="$postvars">
                {
vb:raw postvars}
                <
class="blockrow" id="click_here_p">{vb:rawphrase click_the_following_button}</p>
            </
vb:if>
            <
div align="right">
                <
vb:if condition="$postvars">
                    <
input type="submit" class="button" id="proceed_button" value="{vb:rawphrase proceed}" onclick="proceed_click()" accesskey="s" tabindex="1" />
                <
vb:else />
                    <
a href="{vb:raw url}" class="textcontrol">{vb:rawphrase click_if_browser_does_not_redirect}</a>
                </
vb:if><br /><br />
            </
div>
        </
div>
    </
form>
</
div>

<
vb:if condition="$postvars">

<!-- 
redirect with POST -->

<
script type="text/javascript">
<!--
fetch_object('click_here_p').style.display 'none';

myvar "";
timeout 18;
timerID 0;

function 
proceed_click()
{
    
clearTimeout(timerID);
    return 
true;
}

function 
submit_form()
{
    
window.status "Redirecting" myvar;
    
myvar myvar " .";
    
timerID setTimeout("submit_form();"100);
    if (
timeout 0)
    {
        
timeout -= 1;
    }
    else
    {
        
clearTimeout(timerID);
        
window.status "";
        
document.forms.postvarform.submit();
        
fetch_object('proceed_button').disabled true;
    }
}

submit_form();
//-->
</script>

<!-- / 
redirect with POST -->

<
vb:else />

<
noscript>
<
meta http-equiv="Refresh" content="2; URL={vb:raw url}" />
</
noscript>

<
script type="text/javascript">
<!--
function 
exec_refresh()
{
    
window.status "{vb:rawphrase redirecting}" myvar;
    
myvar myvar " .";
    var 
timerID setTimeout("exec_refresh();"100);
    if (
timeout 0)
    {
        
timeout -= 1;
    }
    else
    {
        
clearTimeout(timerID);
        
window.status "";
        
window.location "{vb:raw js_url}";
    }
}

var 
myvar "";
var 
timeout 20;
exec_refresh();
//-->
</script>

</
vb:if>

{
vb:raw footer}

</
body>
</
html

I have attached screenshots to show the before and after of this mod, so you can see exactly what it does.
If you use this mod, please mark as installed, support is aimed at all those who have marked as installed.

PukkaBen 01-26-2010 12:03 PM

Reserved...

TheSupportForum 01-26-2010 04:04 PM

i would like to se this work in conditions for example


i have a great mod i want to inplement this into if you can help

i have users that get blocked sometimes and if they belong to the block list in the condition they would be redirected within 1-2 seconds

can you help with that

PukkaBen 01-26-2010 09:34 PM

Quote:

Originally Posted by simonhind (Post 1967198)
i would like to se this work in conditions for example


i have a great mod i want to inplement this into if you can help

i have users that get blocked sometimes and if they belong to the block list in the condition they would be redirected within 1-2 seconds

can you help with that

Hey Simon. If you could give me some more information on this I would happily take a look and see what can be done for you!! Would be great to have it sorted.

Charlie98902 01-26-2010 09:46 PM

Installed

zonaenlinea 01-27-2010 02:47 PM

Thank prefect

MmS1 01-27-2010 05:17 PM

Installed

TheSupportForum 01-27-2010 08:44 PM

basically i have this script load up if their ip address belongs to project honeypot

Code:


</script>
<
h1>Forbidden</h1>
<
p>Sorry. You are using a suspicious IP.</p>
<
p>Your IP address has been listed at <a href="http://www.projecthoneypot.org">http://www.projecthoneypot.org</a></p>
<p>If you <strong>ARE NOT</strong> a bot of any kind, please <a href="javascript:letmein()">click here</a> to access the page. Sorry for this !</p>
HTML;

i wanna change this so that i have the same information shown but redirects after a number of seconds

or just a redirect script to another site

PukkaBen 01-28-2010 11:15 AM

You need to add a small bit of HTML to the <head> of the document that the page is on, so that the redirect loads up after 2/5/however many seconds you want. Is this a mod that has been added from vB.org or is it something that you have added yourself?

TheSupportForum 01-28-2010 06:57 PM

Quote:

Originally Posted by PukkaBen (Post 1968840)
You need to add a small bit of HTML to the <head> of the document that the page is on, so that the redirect loads up after 2/5/however many seconds you want. Is this a mod that has been added from vB.org or is it something that you have added yourself?

thid part of a script i am using in a mod

this part of it shows up if your ip is blocked


All times are GMT. The time now is 07:21 AM.

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.01266 seconds
  • Memory Usage 1,785KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete