Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-14-2010, 12:16 AM
A Dead Puppie A Dead Puppie is offline
 
Join Date: Oct 2009
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Title Rotator v4

Hey, I recently wanted a title rotator on my forum, where each time you refresh the page on FORUMHOME, the title in the header would change.

I created a plugin with the following data:

PHP Code:
ob_start();
include(
'Title_Rotator.php');
$shuffle ob_get_contents();
ob_end_clean();

$templater vB_Template::create('FORUMHOME');
$templater->register('shuffle'$shuffle);
$templatevalues['shuffle'] = $templater->render();
vB_Template::PreRegister('FORUMHOME'$templatevalues); 
The "Title_Rotator.php" is a file you upload directly onto the server and it goes as:
PHP Code:
<?php
/* Vanguard Title Shuffler -|- Only licensed to be used by Vanguard Gaming or websites that have permission. Copyright 2010 Vanguard Gaming. */
function title()
{
$num rand(110);
$title = array();
$title[1] = "<title>Vanguard Gaming - Bleep Bloop!</title>"//1
$title[2] = "<title>Vanguard Gaming - The Vanguard is always watching.</title>"//2
$title[3] = "<title>Vanguard Gaming - Ferret says hello.</title>";//3
$title[4] = "<title>Vanguard Gaming - Oh Noez!</title>";//4
$title[5] = "<title>Vanguard Gaming - So I heard you liek mudkipz.</title>"//5
$title[6] = "<title>Vanguard Gaming - Your mom says hi!</title>";//6
$title[7] = "<title>Vanguard Gaming - Cr15py says, Pie > Cake!</title>"//7
$title[8] = "<title>Vanguard Gaming - The internet is a series of tubes.</title>"//8
$title[9] = "<title>Vanguard Gaming - In Soviet Russia, cookie eat monster!</title>"//9
$title[10] = "<title>Vanguard Gaming - A perfect 9.5</title>"//10
return $title[$num];
}
$Cr15py_title title();
?>
Now, I've uploaded it on another server and tried it, and worked perfectly without failure.

I bring it into vBulletin, and replace the FORUMHOME code:
Code:
<title>{vb:raw vboptions.bbtitle}</title>
with
PHP Code:
<?php
include("/Title_Rotator.php");
print 
$Cr15py_title;
?>
And it doesn't work because vBulletin filters out direct php. (security i know.)

But what I'm asking is, my setup, is their anyway i can modify it to work with vBulletin? I'm using vbulletin 4.0.4 if it matters.

Thanks in advance.

--------------- Added [DATE]1281807163[/DATE] at [TIME]1281807163[/TIME] ---------------

bump...please help...
Reply With Quote
 


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 01:29 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.03807 seconds
  • Memory Usage 2,373KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete