vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   template not echoing out (https://vborg.vbsupport.ru/showthread.php?t=73831)

sabret00the 01-05-2005 04:51 PM

template not echoing out
 
PHP Code:

 // random profile
     
$randprof $DB_site->query_first("
                                         SELECT *
                                         FROM user
                                         LEFT JOIN userfield ON (userfield.userid = user.userid)
                                         WHERE user.userid > 0 AND user.usergroupid <> 10 AND user.usergroupid <> 11 AND user.posts > 0
                                         GROUP BY user.userid
                                         ORDER BY rand()
                                         LIMIT 4
                                     "
);
 
     while (
$randprofinfo $DB_site->fetch_array($randprof))
     {
         
$rpusername $randprofinfo['username'];
         if (
$randprofinfo['userid']!=0)
         {
             if (
$randprofinfo[photos])
             {
                 
$pictureurl fetch_cachedgallerypicture_url($userinfo[userid]); 
                 if (
file_exists($pictureurl))
                 {
                         
$avatarimage "<img src=\"" $pictureurl "\" border=\"0\" alt=\"" $rpusername "\" />";
                 }
             }
             else
             {
                 
$avatarurl=fetch_cachedavatar_url($randprofinfo['userid']);
                 if (
$avatarurl == "")
                 {
                     
$avatarurl "" $vboptions[bburl] . "/" $stylevar[imgdir_misc] . "/noavatar.gif";
                     
$avatarimage "<img src=\"" $avatarurl "\" border=\"0\" alt=\"" $rpusername "\" />";
                 }
                 else
                 {
                     
$avatarurl "" $vboptions[bburl] . "/" $stylevar[imgdir_misc] . "guestavatar.gif";
                     
$avatarimage "<img src=\"" $avatarurl "\" border=\"0\" style=\"filter:alpha(opacity=50)\" alt=\"" $rpusername "\" />";
                 }
             }
         }
         
         if (!
$year)
         {
             
$year vbdate('Y'TIMENOWfalsefalse);
             
$month vbdate('n'TIMENOWfalsefalse);
             
$day vbdate('j'TIMENOWfalsefalse);
         }
 
         if (empty(
$gotage["$randprofinfo[userid]"]))
         {
             
$date explode('-'$randprofinfo['birthday']);
             if (
$year $date[2] AND $date[2] != '0000')
             {
                 
$randprofinfo['age'] = $year $date[2];
                 if (
$month $date[0] OR ($month == $date[0] AND $day $date[1]))
                 {
                     
$randprofinfo['age']--;
                 }
 
                 if (
$randprofinfo['age'] < 101)
                 {
                     
$gotage["$randprofinfo[userid]"] = $randprofinfo['age'];
                 }
                 else
                 {
                     unset(
$randprofinfo['age']);
                 }
             }
             else
             {
                 
$randprofinfo['age'] = $gotage["$randprofinfo[userid]"];
             }
         }
 
         if (
$randprofinfo[field24] != "")
         {
             
$randprofinfo2[field24] = "<img src=\"$vboptions[bburl]/$stylevar[imgdir_misc]/$randprofinfo[field24].gif\" />";
         }
 
         
$show[age] = "" $randprofinfo['age'] . "/";
         
$show[gender] = "" $randprofinfo2['field24'] . "/";
         
$show[location] = "" $randprofinfo['field2'] . "";
         
//$profilebits = "TESTING";
         
eval('$profilebits .= "' fetch_template("siteindex_profilebits") . '";');
     }
     eval(
'$siteindex_profile .= "' fetch_template("siteindex_profile") . '";'); 

i have no idea what's wrong with this.

Dean C 01-05-2005 05:13 PM

You haven't actually got an eval statement which echoes?

Xenon 01-05-2005 05:14 PM

sure that
PHP Code:

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

is not intendet to be

PHP Code:

eval('print_output("' fetch_template("siteindex_profile") . '");'); 


sabret00the 01-05-2005 05:58 PM

shouldn't the print_output by the final/master template for the page? this is just for a table in a page.

sabret00the 01-05-2005 06:21 PM

found it, query_first should've been query

Xenon 01-05-2005 06:24 PM

yep, right ;)

Dean C 01-05-2005 07:52 PM

[high]* Dean C slaps everyone in this thread including himself :p[/high]


All times are GMT. The time now is 06:09 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.01887 seconds
  • Memory Usage 1,765KB
  • 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
  • (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