vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

Kirk Y 07-08-2005 01:45 AM

No, putting:

PHP Code:

// file.php?do=eggnog 
if ($_REQUEST['do'] == 'eggnog'

// Outputs the eggnog template 
eval('print_output("' fetch_template('eggnog') . '");'); 


Would make it so that typing www.yoursite.com/forum/test.php?do=eggnog would show the eggnog template. Typing www.yoursite.com/forum/test.php would show an entirely different page. Make sense?


Edit: I just remembered that I had a question.
PHP Code:

$navbits[$parent] = 'Site Rules'

Makes the Site Rules show in the navbar thing, is there anyway to show something under it? Like another thing? I hope that makes sense...

nix 07-10-2005 09:11 PM

Is there anyway to get it to wroth with this link? http://www.9tnclan.com/bfostat/

Right now I'm trying to do it with an Iframe but it just loads back to the stat page.

example. http://www.9tnclan.com/forum/bfs.php

Toeludeu 07-22-2005 11:12 AM

Sorry if this has been asked already but man I wasn't gonna read through 21 pages to find it.

How can I make a page viewable to registered members only?

Cheers

attroll 07-22-2005 12:42 PM

Quote:

Originally Posted by Toeludeu
Sorry if this has been asked already but man I wasn't gonna read through 21 pages to find it.

How can I make a page viewable to registered members only?

Cheers

I think this was covered in post #31

Toeludeu 07-22-2005 01:29 PM

Sorted - Thanks. :rolleyes:

SCI 07-23-2005 02:26 AM

Hi Thanks for the Hack! Ive created a couple of pages.

I put some php coding into the template in ACP to run a news feed but it doesnt work, just shows the coding on the page.

Can these templates use php coding? or just scrictly HTML? Is there a way around this, would I have to put that php code within the .php file for it to work?

Thanks

Adrian Schneider 07-23-2005 02:36 AM

Put it in the PHP file, instead of using echo/print use variables, then just put the variable in the template. If that is too much work, I think you can use something like this:
PHP Code:

ob_start();

// All your PHP you want in the template here

$above ob_get_contents();
ob_end_clean(); 

Then putting $above in your template would show all the PHP.

SCI 07-23-2005 02:54 AM

Quote:

Originally Posted by TheSpecialist
Put it in the PHP file, instead of using echo/print use variables, then just put the variable in the template. If that is too much work, I think you can use something like this:
PHP Code:

ob_start();

// All your PHP you want in the template here

$above ob_get_contents();
ob_end_clean(); 

Then putting $above in your template would show all the PHP.

Thanks Alot TheSpecialist! Ill try this out. Where would I put this coding you have above? Anywhere within the .php file?

I tried it and it didnt work. How do I delete a template that I just created in the ACP? I dont see an option for it. I just want to get rid of it. Ill make my own .php files for the news feeds. Thanks

Adrian Schneider 07-23-2005 04:43 AM

Well post your PHP file, hard to tell what you're trying to do without seeing it. Revert = delete, unless it is a default template, then it just goes to the unedited version (or inherited).

derekivey 07-23-2005 04:39 PM

Anyone know how to make it use just one style, instead of the style the user is currently on?


All times are GMT. The time now is 05:25 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.01637 seconds
  • Memory Usage 1,747KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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