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)

zemic 02-16-2005 07:58 AM

Yeah I understand the way it works because I've got around 10 pages already, Its just im creating loads more pages now which non Vb experts need 2 update :( . Never mind, will think of something. Thanks :)

HuangA 02-19-2005 05:45 AM

Anyone know how to modify the templates so that they work with this hack? Namely, the breadcumb and footer.

I am running into a problem right now because my forum is installed on /forums/ but I want to have these pages located in / instead. Since vB doesn't output full path, my URL for those two templates are http://domain.com/page.php, which gives noting but fugly 404's. I've tried <if condition="THIS_SCRIPT == 'lega'">forum/</if> but that doesn't work at all as nothing comes up! Is there any thing that I'm missing on? Does anyone know how to fix it?

SVTBlackLight01 02-19-2005 07:01 AM

As far as the (footer) links using the right path. It's been discussed plenty in this thread. A few posts up in post 271 nad again here in post 125.

To solve the navbar issues, I created a new navbar for the non-vb pages and hardcoded the breadcrumb links.

Redclan 02-23-2005 09:10 AM

Dude, you are the man! All said and done at my site ;) www.bahamascope.net, will finish update now

Xtrm2Matt 02-23-2005 02:00 PM

Hi,

Could anyone email (or post) some code to display the current active users on the forum on a NON-VB page? Such as:

There are current xx users online
- x registered
- x guests

..etc? I don't think it'd be too hard but obviously it's too hard for me! :)

Thanks a lot if anyone can help,

Matt

Challenge 03-06-2005 04:56 PM

Hi.
A bit late question here baybe, hope you still help out.
I am about to make a "results" page, with your mod. I want to make a drop down list (without links) that shows the latest races won.
Anyway, how can i make a drop-down list like the 'Quick Links', just inside your mod? (not in navbar ;))

Regards,

Challenge

keymistress 03-10-2005 05:18 AM

had to allow openbase redirect...

Revoverdrive 03-11-2005 08:32 PM

1 Attachment(s)
I want to integrate only certain aspects of the forums into my site. I want to stay away from templates.

Mainly I want to get the information thats generating on the welcome/home page for the forums into the new site.

If the visitor is not logged in then the login form replaces the user CP.
Any suggestions ?

Revoverdrive 03-14-2005 02:41 PM

I figured it out.

Jenta 04-16-2005 04:48 PM

Quote:

Originally Posted by Gary King
Also if guests are not allowed to view your forums, then they can't view these new pages you create, etc. :)

been going nuts with this on some other pages that call global.php
didnt make any sense to me since i had no restrictions on the script
guess its just the way vb behaves?

is there some trickey i can perform so that guest with no forum permission can view custom pages?

Snake 04-17-2005 05:17 PM

Hehe, thanks for this tut. ^_^

CrimsonGT 04-20-2005 05:24 AM

Quote:

Originally Posted by Xtrm2Matt
Hi,

Could anyone email (or post) some code to display the current active users on the forum on a NON-VB page? Such as:

There are current xx users online
- x registered
- x guests

..etc? I don't think it'd be too hard but obviously it's too hard for me! :)

Thanks a lot if anyone can help,

Matt

I too am looking for this...

JimBeam 05-13-2005 01:31 AM

Thanks for the information! matters a lot :) CHEERS!

CSS59 05-13-2005 01:56 AM

Quote:

Originally Posted by SVTBlackLight01

wow, how did you make the vb look alike table?

Michaelb.dk 05-23-2005 09:48 PM

Where should i put the template?

attroll 05-24-2005 05:12 AM

Quote:

Originally Posted by Michaelb.dk
Where should i put the template?

In your Admincp you need to create a template.

JohnBee 05-24-2005 03:05 PM

Is there a way to use an include function and call some other .php
data into this page?

When I try it, it never shows any data past the "eval templates"
I need to display some none vBul. data in a page as well and I cannot use
the php include start methgos because the file is static (changes) for every
user.

Michaelb.dk 05-30-2005 01:56 PM

Quote:

Originally Posted by attroll
In your Admincp you need to create a template.

OK Thanks i found out :)

Benj 05-31-2005 09:28 AM

@include("localhost/1/get_counts.php?mode=bands"); this includes produces a number how could i asign this number to a $varible to i can use it in a template ?

paul41598 06-02-2005 03:56 PM

Im not understanding this hack. Is this a replacement for the cpms system? Where I could take my current homepage, and just make php includes to call whatever info i want?

Adrian Schneider 06-03-2005 12:29 AM

No it's the basic script vBulletin uses for all of its pages. You could make it into anything you want. :)

Personally I did this for all my custom content, more control this way rather than using a CMS, but if you're not much of a coder, go with the CMS.

Marcus Lau 06-10-2005 08:46 AM

Good stuffs!.

MrToasty 06-15-2005 03:15 PM

Would this page need to be altered much, if at all for v3.5? I've yet to try it, but has anyone had success?

Andreas 06-15-2005 03:24 PM

It should work the same in 3.5, except the WOL stuff which can be done with Plugins now.

theoperative 06-24-2005 09:01 AM

This hack works fine for me when logged in...however, when I am not logged in...I get this error message on a blank white page:

Unable to add cookies, header already sent.

Line 2

Thanks for the help.

Edit: PROBLEM fixed...It was white space I had left before the <?php at the top.

JohnBee 06-24-2005 09:50 AM

Quote:

Im not understanding this hack. Is this a replacement for the cpms system? Where I could take my current homepage, and just make php includes to call whatever info i want?
It works as advertised but know that you are limited to declaring your php includes
through variables in your php include start template, you cannot do any php include
straight from your pages. (which is quite limiting)

otherwise I would use it all over my site.

mismatch 06-24-2005 11:49 AM

I've read all 21 pages of this and have the same qu a number of others had.

I can get this to work within my forums directory - which is great, thank you, especially for additional info pages.

But I want it working outside my forum directory in my own folder as I have a lot of other pages i simply want to integrate the navbar/login aspect with.

I have tried the suggestions eg chdir and stating which directory I am working in and I've tried commenting out the template call in preference of my own text and also tried someone suggestion of putting
$vbulletin[bburl] at the top. my navbar and vb header scripts etc.. all have full url so the links should work - if they ever show lol!

like others all I get is a blank page which suggests its not finding something.

Can someone repost this script as though it were for a page that resides outside the forums as no doubt it is simply an incorrect pathway or similar on my part - eg I get lost with the ../howmanydots../andslashes./beforethefolder/

Many Thanks

Snake 06-27-2005 10:21 AM

Quote:

Also if you want to create your own pages 'within' current vBulletin files, do the following:

Open the file you want, and then right before the final ?> in the source code, add the following:

PHP Code:

if ($_REQUEST['do'] == 'xxx')
{
    eval(
'print_output("' fetch_template('TEMPLATE_XXX') . '");');


Replace 'xxx' with whatever you want ?do= in the query string to be (for example, replace 'xxx' with 'showprofile' so then someone would type in example.php?do=showprofile to view this template.) Then of course, change TEMPLATE_XXX to your template name, it's that simple! :D
Uh... what do you mean by that?

Adrian Schneider 06-27-2005 03:54 PM

It allows one php file to output more than one template according to the address bar.


PHP Code:

// file.php?do=eggnog
if ($_REQUEST['do'] == 'eggnog')
{
    
// Outputs the eggnog template
    
eval('print_output("' fetch_template('eggnog') . '");');
}

// file.php?do=vbulletin
elseif ($_REQUEST['do'] == 'vbulletin')
{
    
// Outputs the vbulletin template
    
eval('print_output("' fetch_template('vbulletin') . '");');



Stachel 06-30-2005 01:56 AM

Then, putting

$eggnog

is what triggers that "if" to execute?

Stachel

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 01:20 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.03802 seconds
  • Memory Usage 1,839KB
  • 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
  • (6)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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