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)

nomoreturn 11-17-2009 10:34 PM

Where we have to upload test.php

cellarius 11-17-2009 10:45 PM

Quote:

Originally Posted by nomoreturn@hotm (Post 1916232)
Where we have to upload test.php

Put it in your forum root.

Lionel 11-18-2009 01:11 AM

Nice, and what do you do if you want to have 3 columns in your page? Right now I had to create a table with 3 td, but I had rather avoid that

Lynne 11-18-2009 01:39 AM

Quote:

Originally Posted by Lionel (Post 1916357)
Nice, and what do you do if you want to have 3 columns in your page? Right now I had to create a table with 3 td, but I had rather avoid that

There is no reason you can't use a table if you don't want to use divs. But, if you want to use divs to make 3 columns, google is a great place to start. There are lots of sites that will show you how to use divs in place of tables.

Lionel 11-18-2009 02:22 AM

Got your first reply. Sorry Lynne. I asked because I found you extremely helpful and because I could not find any places by vb to explain about the new css, until I saw that there were new templates.

Specially whatever you put in $stylevar does not necessarily gets implemented. So instead of thinking that they were bugs, I inquire first.

Mythotical 11-18-2009 03:22 AM

Lynne, so how would we call multiple templates for the same custom page and it actually work?

Lynne 11-18-2009 03:33 AM

You would do it as before, only use the new syntax. So, something like this:
PHP Code:

$pagetitle 'My Page Title';

$foo 'hello';
$bar 'world';
$templater vB_Template::create('first_template');
$templater->register('foo'$foo);
$templater->register('bar'$bar);
$my_variable $templater->render();  


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

You would use {vb:var foo} and {vb:var bar} in your first_template to insert the variables $foo and $bar and then you would use {vb:var my_variable} in the TEST template to insert the output from $my_variable.

Mythotical 11-18-2009 03:37 AM

EDIT: I'm a fruitcake, damn pain pill is kicking my butt right now.

PHP Code:

$templater->register('my_variable'$my_variable); 

Missing that from my print_output area.

Thanks tho, at least I understand now.

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

Ok next question, I am reusing the same variable for different pages so I am not having a cluster of different variables within conditional statements. Right now it seems that is confusing me or its the meds, either way is it safe to say I can keep doing that or should I change it?

PHP Code:

$templater->register('display'$display); 

That var is what I am reusing for each page load of do=cat or do=file, etc. Do I need to change it to print_output or what?

LoveStream 11-18-2009 03:51 PM

Thank your tutor.
I had met following error, when I using this template page, there is a cookie sent already.

Uh!
PHP Code:

Unable to add cookiesheader already sent.
File: /www/forum/phoenixjournals.php
Line
1

Forums test 

I create scripts as phoenixjournals.php, but it occur if I logout.

How could I solve it? or what deos it mean in this case?

I hope your teaching. Thanks.

ragtek 11-18-2009 04:16 PM

Be sure that there's nothing before <?php


All times are GMT. The time now is 03:13 PM.

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.01771 seconds
  • Memory Usage 1,751KB
  • 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
  • (3)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