Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Redirect Re-write Details »»
Redirect Re-write
Version: 1.00, by PukkaBen PukkaBen is offline
Developer Last Online: Apr 2011 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.0.x Rating:
Released: 01-25-2010 Last Update: Never Installs: 20
Template Edits
 
No support by the author.

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.

Screenshots

File Type: png redirect-rewrite-before.png (7.6 KB, 0 views)
File Type: png redirect-rewrite-after.png (7.6 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-26-2010, 12:03 PM
PukkaBen PukkaBen is offline
 
Join Date: Apr 2009
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved...
Reply With Quote
  #3  
Old 01-26-2010, 04:04 PM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 01-26-2010, 09:34 PM
PukkaBen PukkaBen is offline
 
Join Date: Apr 2009
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by simonhind View Post
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.
Reply With Quote
  #5  
Old 01-26-2010, 09:46 PM
Charlie98902 Charlie98902 is offline
 
Join Date: Dec 2006
Posts: 1,156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed
Reply With Quote
  #6  
Old 01-27-2010, 02:47 PM
zonaenlinea's Avatar
zonaenlinea zonaenlinea is offline
 
Join Date: Dec 2009
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank prefect
Reply With Quote
  #7  
Old 01-27-2010, 05:17 PM
MmS1 MmS1 is offline
 
Join Date: Nov 2008
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed
Reply With Quote
  #8  
Old 01-27-2010, 08:44 PM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 01-28-2010, 11:15 AM
PukkaBen PukkaBen is offline
 
Join Date: Apr 2009
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #10  
Old 01-28-2010, 06:57 PM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PukkaBen View Post
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
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:00 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.05098 seconds
  • Memory Usage 2,358KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete