vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Grr stupid loop (https://vborg.vbsupport.ru/showthread.php?t=51493)

colicab-d 04-11-2003 08:40 PM

Grr stupid loop
 
1 Attachment(s)
Ok hi folks i got a wee prob.. im making a simple shoutbox for a friend norm a 5 min task...

However ive never integrated anything into vb aside throught the admin panel.. include style.css

well anyway i was told that i should eval the output for this one so it would use vb`s style etc..

anyway i got a problem now..

ive tried including an eval in the loop so it can loop the results

(my syntax is bad im too used to truebasic)


well anyway my prob is ever since i used eval at the top of the code.. it seems the loop wont return anything in it..

which kinda figures as its evaling everything before the loop

my question now is how the heck to i work around this?

should i eval the output last?

will it show say 5 results even tho its $name in the template?

im a bit stuck.. and i realise someone will come along and point out the obvious put thank you if you can :D

ive included the hack.. i just need the shout.php fixed up so its shows the results set by $last

Zzed 04-11-2003 09:00 PM

Why do you have this in the bottom of shout.php? :confused:

Code:

   
    ?>
 
<? } ?>

It seems like it is throwing off the balancing of the { and } for the while statement....

colicab-d 04-11-2003 09:20 PM

a mistake from earlier...

Code:


    while($r = mysql_fetch_array($query)){

    $id=$r['id'];
   
    $time=$r['time'];

    $message=$r['message'];

    $name=$r['name'];
   

    gettemplate('shoutbit');
   
    echo "DOES THIS WORK AT ALL???";
   
    ?>
 
<? } ?>

i had some html in there from when it wasnt being integrated to vb

so

Code:


  ?>
 
<?

isnt needed i know :(

colicab-d 04-12-2003 11:37 AM

anyone else?


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

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.02254 seconds
  • Memory Usage 1,713KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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