vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Clan Roster (https://vborg.vbsupport.ru/showthread.php?t=55288)

SmEdD 07-14-2003 11:23 PM

Clan Roster
 
Ok I am building a roser page for my clan. All the data is imputed just like user are but it can only be done in the admin panel.

Now I am working on the public side where it shows the roster to the public.

I can only get one name to come up. How do I get them all to list. And my template is set up with a bits part so it isn't that.

This is the php code that is where the data gets called. Is it anything here or with the template?

PHP Code:

if ($_REQUEST['do'] == 'getall')
{
        
$clanrosters $DB_site->query("
            SELECT * 
            FROM " 
TABLE_PREFIX "clanroster
            ORDER BY displayorder"
);
    while (
$clanroster $DB_site->fetch_array($clanrosters))
    {
        eval(
'$rosterbits = "' fetch_template('rosterbits') . '";');
    }



Lesane 07-15-2003 05:44 AM

You do know that it's vb3 code right? I don't know if we are allowed to give support on it, anyways:

Change:

PHP Code:

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

Into:

PHP Code:

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


SmEdD 07-15-2003 03:32 PM

What does the period do that you added?

Lesane 07-15-2003 04:04 PM

It adds the output to $rosterbits and don't overwrite the current value of $rosterbits. If you leave the period out of it then $rosterbits will only contains one output. It does the while loop and adds a value to $rosterbits till it's done but it overwrites it without the period.

Same like:

PHP Code:

$hello ="hello,";
$hello .="how are you?";
echo 
"$hello"// will print hello, how are you? 

But, without the period

PHP Code:

$hello ="hello,";
$hello ="how are you?";
echo 
"$hello"// will print how are you? 



All times are GMT. The time now is 10:51 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.01039 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
  • (5)bbcode_php_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