vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Useful function when you are coding addons (https://vborg.vbsupport.ru/showthread.php?t=41598)

hamoe 07-31-2002 12:54 AM

Hey I'm here. What I am wondering is why you don't just have that link in your template file....

PHP Code:

  $reviewb $DB_site->query("SELECT * FROM reviews");
  while(
$ra $DB_site->fetch_array($reviewb)) {


   eval(
"dooutput(\"".gettemplate("reviews_list")."\");");    

  } 


Can you not just have that link that I took out in your template? Here is how the function call would look:

loop_template("*", "reviews","list", "reviews");

In your template the variables will be available to you like this:

$reviews[list_fieldname]

All other variables you want to use that arent taken from the mysql query are just available how you would expect them.

DrkFusion 07-31-2002 12:57 AM

Thanks man, you are the coolest person around, can you help me further on aim, if you have it :)

my friend sat ScapeStudio, I am at his house :)

Thanks

Chris M 07-31-2002 01:14 AM

Cool...:)

Satan

SaintDog 07-31-2002 03:24 AM

Quote:

Originally posted by hamoe
I just realized this would probably do better in the Hacking Hints and Tips forum. If some bored mod feels like moving it for me it would be appreciated :)
Bored....Moved.... ;)


- SaintDog

hamoe 08-01-2002 05:36 AM

lol, thanks saintdog, i knew someone would get bored eventually :)


All times are GMT. The time now is 09:16 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.01121 seconds
  • Memory Usage 1,723KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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