vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Some basics of vB3(mini howto) (https://vborg.vbsupport.ru/showthread.php?t=59939)

gmarik 02-03-2004 05:18 AM

Cool, waiting for further instructions.

mossyuk 02-04-2004 11:58 AM

im confused - how do i make the navbar i have included in my page change to show your status as logged in?

Gio Takahashi 02-11-2004 01:35 AM

Quote:

Originally Posted by mossyuk
im confused - how do i make the navbar i have included in my page change to show your status as logged in?

This is nice stuff here Faranth, very useful.

I do have a question, how do I have "Who is online" show the location.

IE:

Gio "Unknown"
main.php

To

Gio Test Page
test.php

Zachery 02-11-2004 01:48 AM

I THINK i know how to do that, but i need to double check somthing ^_^

Dark_Wizard 02-11-2004 10:46 AM

Quote:

Originally Posted by Gio Takahashi
This is nice stuff here Faranth, very useful.

I do have a question, how do I have "Who is online" show the location.

IE:

Gio "Unknown"
main.php

To

Gio Test Page
test.php

This would all be done in the ./includes/functions_online.php file. I'll let Faranth finish this up as it is his "HowTo" thread. ;)

AndrewD 02-11-2004 03:39 PM

What is the recommended way to install/upgrade the series of templates used with a hack? (I know htl deals with this but...) Installing the templates manually is a pain and error prone, as is asking the user to go to the admin cp and upload the xml file.

How does one create a new template group?

I imagine one has to install/overwrite the templates in the base style(s). As a hack is being developed (and templates changed), one also has to be sure that any modified templates in the main and other styles are flagged.

I'm sure that tips on these points would be most welcome.

Sent1nel 02-11-2004 04:55 PM

Edit: Sorry I got told off for posting in the wrong forum.

I fixed the problem and to simply make a new page which utilises existing stylesheets and headers, technically all you need to do is:

1. Create Custom Template with everything you Require - Ensure you include your header, footer etc references, shown below.

PHP Code:

{htmldoctype}
<
html>
<
head>
  <
titleBlah </title>
  
$headinclude
</head>
<
body>
$header

BLAHBLAHBLAHBALH

$footer

</body>
</
html

2. In your new page - use the below code to invoke your template. (My Custom template was called "blah").

PHP Code:

<?php
  $templatesused 
"blah";
  include(
"./global.php");
  eval(
"dooutput(\"".gettemplate("blah")."\");");
?>

Tony.

Zachery 02-12-2004 01:23 AM

Quote:

Originally Posted by Sent1nel
Edit: Sorry I got told off for posting in the wrong forum.

I fixed the problem and to simply make a new page which utilises existing stylesheets and headers, technically all you need to do is:

1. Create Custom Template with everything you Require - Ensure you include your header, footer etc references, shown below.

PHP Code:

{htmldoctype}
<
html>
<
head>
  <
titleBlah </title>
  
$headinclude
</head>
<
body>
$header

BLAHBLAHBLAHBALH

$footer

</body>
</
html

2. In your new page - use the below code to invoke your template. (My Custom template was called "blah").

PHP Code:

<?php
  $templatesused 
"blah";
  include(
"./global.php");
  eval(
"dooutput(\"".gettemplate("blah")."\");");
?>

Tony.

Your methdo should only work for vB2 $templateused is no longer a valid varible in vB3

tehste 02-17-2004 09:24 PM

Hi, I am making a mod and im new to VB but Im a fast learner.

I want to load a template called (test) inside test i want to put rows from a db table (test) with value1|value2|value3 i want to print the 3values for each row in the table and display them in the html defined in the (test2) template... and then load the rest of the (test) template. Is this possible?

Another question is: Would cases be suitable rather than all the ifs? or are ifs better?
thanks for help.

kontrabass 03-16-2004 02:43 PM

Sorry for the stupid question -

How does one pass a variable from a php script TO the template?

I've got a file, page.php, that includes the basic instructions in the first post in this thread, ending with (eval('print_output("' . fetch_template('my_template') . '");');

It works great - 'my_template' contains $header, some html, $footer, and it renders the page as expected.

However, in page.php I also define a variable $output = "some output"; I put $output in 'my_template' but it does not print out "some output" as expected.

Again sorry I'm probalby out of my legue here but if there's an easy way to do this please let me know!

TIA!


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