• OzzModz is no longer taking registrations. All registrations are being redirected to Snog's Site
    All addons and support is available there now.

April Fools Fun (vB3)

Ozzy47

Administrator
This is something someone asked for on vB.org, so I thought I would post it here to. Cute little way to flip some of your forums upside down for April Fools.

Create a plugin, ACP --> Plugins & Products --> Add New Plugin

Product: vBulletin
Hook Location: parse_templates
Execution Order: 5
Plugin PHP Code: Add the following;
Code:
if (date('F j') == 'April 1' AND THIS_SCRIPT == 'forumdisplay' AND in_array($foruminfo['forumid'], array([COLOR=#ff0000][SIZE=2][B]X,X,X[/B][/SIZE][/COLOR])))
{
    $invert = '<style type="text/css">
    body {
          -webkit-transform: rotate(180deg);
          -moz-transform: rotate(180deg);
          -ms-transform: rotate(180deg);
          -o-transform: rotate(180deg);
          transform: rotate(180deg);
    }
    </style>
    
     <script>
       window.onload=toBottom;
    
       function toBottom() {
          window.scrollTo(0, document.body.scrollHeight);
       }
    </script> ';
eval($invert);
}

Then open up your headinclude template, and ass this at the very bottom:
Code:
$invert

Just change X,X,X to the forums you want this to happen on.

Also note, I wrote this to only happen on April 1, so if you want to test it, change the date.
 
It throws a error after someone posts... And they are stuck on a blank page with only this:


HTML:
Parse error: syntax error, unexpected '<' in /home/content/85/7389985/html/global.php(607) : eval()'d code(2294) : eval()'d code on line 1 
 
Warning: Cannot modify header information - headers already sent by (output started at [path]/global.php(607) : eval()'d code(2294) : eval()'d code:1) in [path]/includes/functions.php on line 3161
 
And there's not any on Eddie's site either.

Of course, neither of you changed the plugin so radically either.
 
Back
Top