PDA

View Full Version : Miscellaneous Hacks - Add an advert into your redirect page


Yours Truly
07-05-2007, 10:00 PM
Note: This enhancement was originally posted by me under my old name Move-Along over here (https://vborg.vbsupport.ru/showthread.php?t=125773). So before any confusion arises it was made by me =]. I no longer support it on that thread and will continue to do so on this thread =]. Enjoy!

Time taken: 2 Minutes
Difficulty: Easy as pie
What it does: This will basicly just add an advert in the redirect screen. There is a screenshot attatched to show you what i mean.

You can also use this for Vb 3.5.x too

You shouldn't use AdSense here, because redirection pages wouldn't really count as content pages.


Go to:

Style manager --> [Style you want to edit] --> Edit templates --> STANDARD_REDIRECT

Now find:


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


And replace it with this:

<noscript>
<meta http-equiv="Refresh" content="10; URL=$url" /> // Change the content="10" to whatever you like the bigger it is the longer it will take to redirect
</noscript>


After find this code:


<p class="smallfont"><a href="$url">$vbphrase[click_if_browser_does_not_redirect]</a>

After add:


<br>
<br>
<a href="http://www.adminpath.com" target="_blank"><img src="http://www.adminpath.com/delisiosso/misc/banner_right.gif"></a>


Obviously change the url's to your desired url's.

---------------------------------------------------------------------------------------

Extending the load time:

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


Find that piece of code and replace it with this:

var myvar = "";
var timeout = 100;
exec_refresh();
//-->


If you would like it so it doesn't automatically redirect then you can do this:

Find:


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


Replace With:


var myvar = "";
var timeout = 10000;
exec_refresh();
//-->


Find:

<p class="smallfont"><a href="$url">$vbphrase[click_if_browser_does_not_redirect]</a></p>


Replace With:

<p class="smallfont"><a href="$url">Click here to continue to the page you requested</a></p>



To come:


Admincp options to add url from the CP as opposed to changing the template each time
Rotating banners
Post some ideas :p

Yours Truly
07-07-2007, 08:04 AM
var myvar = "";
var timeout = 20;
exec_refresh();
//-->


Find that piece of code and replace it with this:

var myvar = "";
var timeout = 100;
exec_refresh();
//-->


If you would like it so it doesn't automatically redirect then you can do this:

Find:


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


Replace With:


var myvar = "";
var timeout = 10000;
exec_refresh();
//-->


Find:

<p class="smallfont"><a href="$url">$vbphrase[click_if_browser_does_not_redirect]</a></p>


Replace With:

<p class="smallfont"><a href="$url">Click here to continue to the page you requested</a></p>

TGR
07-09-2007, 11:49 PM
nice thanks

Yours Truly
07-10-2007, 11:12 AM
Wow, great!

Thanks a bunch.

No problem =]

nice thanks

Your welcome mate =]

nul7
09-08-2007, 10:42 PM
To add rotating banners you can use the sponsors.php file from the sponsors mod...how would you show it to point to the PHP file to initiate the banner to show?

powerful_rogue
01-13-2008, 01:38 PM
Any idea on how to get the advert to apear randomly from a list of banners?

that would be awsome..

SAReefer
02-17-2008, 07:41 PM
this is what i get when i try the hack, any idea's why??

https://vborg.vbsupport.ru/external/2008/02/9.gif

kyle83
02-17-2008, 11:46 PM
To add a rotating banner, use this script: http://javascript.internet.com/miscellaneous/rotating-banner.html

The header code into your headinclude, and the rest into the redirect template.