vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Bit templates :S (https://vborg.vbsupport.ru/showthread.php?t=78344)

Nickeh32 03-18-2005 08:11 PM

Bit templates :S
 
How do i insert a bit template into a page using another template?

Jolten 03-18-2005 11:42 PM

they generally have a variable set such as $templatename_bit.
You just insert that variable into your main template.

If this is for a custom script, you'll need to evaluate the template in the script.

Nickeh32 03-19-2005 09:45 AM

Like this?

PHP Code:

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


Deaths 03-19-2005 09:47 AM

Yes, add that code to the file which will call for the main template, then you can use $newsbit.

Are you wanting to actually make it display bits, like when displaying posts?
Because that's something completely different.

Nickeh32 03-19-2005 10:03 AM

I did, it didn't work.

Yes thats what i'm trying to do.
I made a table in the bit template which contains the news.
Then i want it shown in the news page, templates confuse me.
How do i do it?

Deaths 03-19-2005 10:10 AM

So, you want to create a newsbit, kinda like posts?

If so, do you want the news to be read from posts, or do you want to be able to add/edit news without adding/editing posts?

Nickeh32 03-19-2005 07:52 PM

I've made a simple php script that takes news from a database.

But it won't display more than one row of the database, so i thought a bit template would do the job.


All times are GMT. The time now is 07:26 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.01091 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete