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)

amcd 04-02-2008 11:43 AM

Quote:

Originally Posted by dfc005 (Post 1480763)
So, I'm thinking of implementing this into my forum but I have a question, do you have to edit any vbulletin files to make this work? Or is it just templates and then creating my own php files?

just templates and new php

dfc005 04-02-2008 08:29 PM

In the instructions it says I have to open up includes/functions_online.php and edit to enable Who's Online. Isn't that a file?

Sorry if these are stupid questions.

lukemax 04-02-2008 09:04 PM

1 Attachment(s)
I have like 30 lines of php code which I want inside the box instead of Text. How do I make it so that I can have the template read my php code? (Take a look at the template I created), how do I get the php to be executed?

dfc005 04-02-2008 11:17 PM

Quote:

Originally Posted by lukemax (Post 1481345)
I have like 30 lines of php code which I want inside the box instead of Text. How do I make it so that I can have the template read my php code? (Take a look at the template I created), how do I get the php to be executed?

I was coming here to ask the same thing. Need to use a plugin don't we?

But what hook do I use?

lukemax 04-03-2008 03:23 AM

I know the global_start hook location works, but I think there is a way around the hook/plugin system.

dfc005 04-03-2008 03:36 AM

Yeah, I was pretty sure global_start would work but thought there might be a better hook location, don't want the piece of code being executed for every page call....

lukemax 04-03-2008 03:57 AM

ea, same here. I'm trying to figure out a way to do this without using the hook thing, if I find it, ill let you know, k?

dfc005 04-03-2008 04:05 AM

Cheers mate, that'd be great.

The powered pages are exactly what I'm after but if I can't include a bunch of PHP code in the actual templated, they are pretty useless to me.

amcd 04-03-2008 04:09 AM

You dont have to edit any vbulletin php file to make new pages work. Who's online can be done using hooks.

php code is not supposed to be written in templates.

Hooks are needed only if you want to insert code into the existing pages. This thread is about creating new pages.

The idea is to have a new page. See the countries page on my site for example.

For a general explanation of how templates and hooks work, see the vbulletin manual.

lukemax 04-03-2008 04:22 AM

is this what you used http://www.vbulletin.com/docs/html/m..._externalfiles ?

What hook location did you use?
Thanks...

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

Also, did you create a custom template, like this tutorial?


All times are GMT. The time now is 10:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03574 seconds
  • Memory Usage 1,734KB
  • 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
  • (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