vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

glen290 01-13-2010 03:36 PM

throwing in the towel, cant get no joy with this lol

TheSupportForum 01-13-2010 05:15 PM

i need help in doing the following but not sure how to

found a mod for 3.8 and need to update this error, i need to update this in either a plugin or template and need help

fetch_template() calls should be replaced by the vB_Template class

Lynne 01-13-2010 05:39 PM

Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

TheSupportForum 01-13-2010 05:53 PM

Quote:

Originally Posted by Lynne (Post 1954680)
Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

thx but this is for a php file and not a template i need to replace

eval('$tblreports_list .= "'.fetch_template in a template

Lynne 01-13-2010 06:31 PM

Quote:

Originally Posted by simonhind (Post 1954689)
thx but this is for a php file and not a template i need to replace

eval('$tblreports_list .= "'.fetch_template in a template

He explains what php code to use to render templates. You no longer use:
PHP Code:

eval('$mytemplate = "' fetch_template('mytemplate') . '";'); 

You now use something similar to:
PHP Code:

$templater vB_Template::create('mytemplate');
    
$templater->register('my_var'$my_var);
    
$templater->register('my_array'$my_array);
$templater->render(); 

It's all explained in that article.

pisymbol 01-13-2010 07:27 PM

Quote:

Originally Posted by Lynne (Post 1953595)
There will not be a session state if you are logged in.

Got it. Thanks. I think the article should put somewhere that you should go to:

http://<site url>/test.php

to verify. I was focused on the WOL hooks and got very confused about EXPECTED output (it was so obvious I didn't realize it).

Thanks!

tafreeh 01-13-2010 11:24 PM

since too many common html codes are not working...
i would like to know

which code should i use to break the line( change the link)
<p> </br> doesnt work

how do i break the line?

plus what code should i use for a list?

ul and li dont seem to work at all..

Please Advice.

Lynne 01-13-2010 11:54 PM

Quote:

Originally Posted by tafreeh (Post 1954979)
since too many common html codes are not working...
i would like to know

which code should i use to break the line( change the link)
<p> </br> doesnt work

how do i break the line?

plus what code should i use for a list?

ul and li dont seem to work at all..

Please Advice.

It's all just the way the css is set up by vBs in the css stylesheets. You can change it to be however you want by adding your own css, like I posted above for the lists.

Breaks work just fine. Your html is wrong... it's <br />.

PukkaBen 01-14-2010 11:18 AM

Worked great for me!! Cheers Lynne!! This How To is just awesome!!

Lynne 01-14-2010 04:33 PM

Quote:

Originally Posted by Allan (Post 1945997)
How add others pages 'within' current vBulletin files ?

as in this example: https://vborg.vbsupport.ru/showthread.php?t=62164

Sorry, I missed this. You would just do something like this...
PHP Code:

<?php

.......

// pre-cache templates used by all actions
$globaltemplates = array('TEST',
'TEST2',
'TEST3',
);

........
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits construct_navbits(array('' => 'Test Page'));
$navbar render_navbar_template($navbits);

// ###### When do == 'xxx' #####
if ($_REQUEST['do'] == 'xxx')
{
$pagetitle 'My Page Title';

$templater vB_Template::create('TEST');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());
}

// ###### When do == 'yyy' #####
if ($_REQUEST['do'] == 'yyy')
{
$pagetitle 'My Page Title';

$templater vB_Template::create('TEST2');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());
}

// ###### When do does not equal 'xxx' or 'yyy' #####

$pagetitle 'My Page Title';

$templater vB_Template::create('TEST3');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());


?>

There are all sorts of different ways to do it, but that is one simple way.


All times are GMT. The time now is 09:59 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.01461 seconds
  • Memory Usage 1,764KB
  • 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
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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