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)

Goomzee 07-10-2008 03:28 AM

how to make mod could to made and pm me that mod Please

DieselMinded 07-10-2008 07:55 AM

There is no mod here , its just html

Design the page in html and use this article to build a vb powered page and paste the html code in the new template

Zaxuhe 07-20-2008 01:32 AM

Thanks my page is finally using the vbulletin login systen due to this =D thanks a lot, members areas working anyone that need help fell free to send me a private message I wont probably reply on here

Mikhal 07-22-2008 12:42 PM

Using this method, is there anyway I can pass the content of the page into the template from the script? Essentially, I'm wondering if I can replace the value "Text" with something that is generated by the php script. Any hints would be appreciated.

Sergio68 07-22-2008 10:07 PM

Quote:

Originally Posted by amcd (Post 1540325)
Templates are not supposed to execute code. This is not just with vbulletin, but the entire concept of templating is separation of presentation from code (business logic).

Execute the php before calling the template, keep the presentation data in certain variables, and use the template just to show those variables.

Quite clear, can you please make an example ?

Suppose I have some pages I need to execute and show : page1.php, page2.php, page3.php
I should create some templates : template1, template2, template3
Then insert the variables : $show1 (containing the html execution of page1.php) into template1, $show2 (containing the html execution of page2.php) into template2 and so on.

But how can I generate/fill (for example) the variables and insert them into the template when I link the user to mysite.com/forums/page2.php ?

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

Found, may be, I should add a plugin :

Code:

ob_start();
  include('./page2.php');
  $show2 = ob_get_contents();
  ob_end_clean();


Is it ?

Chris11987 07-23-2008 06:46 AM

Is there a way to do this outside of the forums directory?

Sergio68 07-23-2008 09:03 AM

Quote:

Originally Posted by Sergio68 (Post 1581826)
Quite clear, can you please make an example ?

Suppose I have some pages I need to execute and show : page1.php, page2.php, page3.php
I should create some templates : template1, template2, template3
Then insert the variables : $show1 (containing the html execution of page1.php) into template1, $show2 (containing the html execution of page2.php) into template2 and so on.

But how can I generate/fill (for example) the variables and insert them into the template when I link the user to mysite.com/forums/page2.php ?

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

Found, may be, I should add a plugin :

Code:

ob_start();
  include('./page2.php');
  $show2 = ob_get_contents();
  ob_end_clean();


Is it ?

And.... what about a change in my page1.php :

PHP Code:

eval('print_output("' fetch_template('test') . '");'); 

with
PHP Code:

Direct execution of template+php code 

It's most probably not safe, but, is it working ?

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

Ok, I apologize for all this asking and answering by myself :D , I've tried and it's working.
Can be a big shortcut, no templates, no plugins, but it's obviously less safe.

amcd 07-23-2008 05:48 PM

Quote:

Originally Posted by Sergio68 (Post 1582122)
Can be a big shortcut, no templates, no plugins, but it's obviously less safe.

Then it is not really a vb-powered page, is it?

Sergio68 07-24-2008 10:25 AM

Quote:

Originally Posted by amcd (Post 1582438)
Then it is not really a vb-powered page, is it?

LOL :D May be, right. That's what I'm trying to figure it out, I'll be still able to use VB variables, IFs and so on or should I just please myself with the look and style of the forum ?

Stryker412 07-24-2008 04:44 PM

How can you get your page to auto adapt to the current theme a user is running (ie. font and panel colors)?


All times are GMT. The time now is 06:02 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.02427 seconds
  • Memory Usage 1,746KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (4)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