Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #39  
Old 03-13-2015, 06:58 PM
KGodel's Avatar
KGodel KGodel is offline
 
Join Date: May 2011
Location: Indiana
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey guys. So the BBCode issue is still one I need help solving. I have it displaying but not being executed. Second, the PHP I am attempting to put in a direct evaluation page through CMS is below, except I have changed everything from "echo" to $var = or$var.=, then set $output = $var; at the end. This code IS working on the site on a non-VMS page.

PHP Code:
//Get List of Divisions 
$sql "SELECT * FROM " TABLE_PREFIX "gamelist ORDER BY gamename ASC"
$result $db->query_read_slave($sql); 

// Start Division/Area List 
$areas = ["Administration""Clan Staff"]; 
$alist "'Administration', 'Clan Staff'"

while (
$g mysql_fetch_array($result)) { 
    
$areas[] = $gn $g[1]; 
    
$alist .= ", '$gn'";

$areas = ["Games in Progress"]; 
$alist .= ", 'Games in Progress'"

// Get the Staff Members 
$sql "SELECT * FROM " TABLE_PREFIX "staff ORDER BY FIELD(divdept, $alist), position DESC, username DESC"
$result $db->query_read_slave($sql); 

//Begin Output (Hopefully) 
echo "<p> Zealot Gaming hosts a variety of leaders in order to help ensure that all aspects of the clan are taken care of and any issues members have may be resolved at any time. For a list of positions, please visit the&nbsp;<a href='index.php/info/clan-structure' target='_self'>structure page</a>.</p>"

// Set basic cell counter 
$i 1

// Set previous area to nothing damnit. 
$prev ""

//Go through each staff member 
while ($u mysql_fetch_array($result)) { 
    
    
// Let's set our data. 
    
$userid $u[0]; 
    
$username $u[1]; 
    
$rname $u[2]; 
    
$rank $u[3]; 
    
$area $u[4]; 
    
$facebook $u[5]; 
    
$twitter $u[6]; 
    
$bio $u[7]; 
    
$img "images/staff/" strtolower($username) . ".png"
    
$email strtolower($username) . "@zealotgaming.com"
    
    
// Check for Social Media code. 
    
if (!empty($facebook)) { $facebook "&nbsp;&nbsp;<a href='$facebook'><img alt=\"$username's Facebook\" src='images/staff/social/facebook.png' /></a>"; } 
    if (!empty(
$twitter)) { $twitter "&nbsp;&nbsp;<a href='$twitter'><img alt=\"$username's Twitter\" src='images/staff/social/twitter.png' /></a>"; } 
    
    
//Is this a new area? 
    
if ($area != $prev) { 
        
        
// Yes 
        // Do we need to close the previous table and add a cell? 
        
if ($i == && !empty($prev)) { 
            
//Add a cell and close 
            
echo "  <td valign='top'>&nbsp;</td> 
                  </tr> 
                </table>"

        } elseif (
$i == && !empty($prev)) { 
            
//Just close the table 
            
echo "</table>"
        } 
        
        
// Reset the column we're in. 
        
$i 2;
        
$prev $area;
        
        
//New Area Heading 
        
echo "<h2 class='whiteglow' style='margin-bottom: 10px;'>$area</h2>"
        
        
//Start of Table 
        
echo "<table border='0' cellpadding='1' class='zebra' style='width: 100%;'>"
        
        
// First column, new row. 
        
echo "<tr> 
                <td valign='top' width='50%'><div style='float: left; margin-right: 10px;'> <img alt='
$username' height='110' src='$img' width='110' /></div> 
                <div style='float: right;'> <a href='mailto:
$email'><img alt='Email $username' src='images/staff/social/email.png' /></a>".$facebook.$twitter."</div> 
                <strong>User</strong>: <a href='member.php?u=
$userid'>$username</a><br /> 
                <strong>Name</strong>: 
$rname<br /> 
                <strong>Position</strong>: 
$rank<br /> 
                <strong>Bio</strong>: 
$bio</td>"
    } else { 
        
        
//No 
        
        // Is this a new row? 
        
if ($i == 0) { 
            
            
//No 
            // Enter the information then close the row 
            
echo "  <td valign='top' width='50%'><div style='float: left; margin-right: 10px;'> <img alt='$username' height='110' src='$img' width='110' /></div> 
                    <div style='float: right;'> <a href='mailto:
$email'><img alt='Email $username' src='images/staff/social/email.png' /></a>".$facebook.$twitter."</div> 
                    <strong>User</strong>: <a href='member.php?u=
$userid'>$username</a><br /> 
                    <strong>Name</strong>: 
$rname<br /> 
                    <strong>Position</strong>: 
$rank<br /> 
                    <strong>Bio</strong>: 
$bio</td> 
                </tr>"

            
            
//Set our cell counter 
            
$i++;
            
$prev $area;
            
        } else { 
            
            
//No 
            // Start a new row. 
            
echo "<tr> 
                    <td valign='top' width='50%'><div style='float: left; margin-right: 10px;'> <img alt='
$username' height='110' src='$img' width='110' /></div> 
                    <div style='float: right;'> <a href='mailto:
$email'><img alt='Email $username' src='images/staff/social/email.png' /></a>".$facebook.$twitter."</div> 
                    <strong>User</strong>: <a href='member.php?u=
$userid'>$username</a><br /> 
                    <strong>Name</strong>: 
$rname<br /> 
                    <strong>Position</strong>: 
$rank<br /> 
                    <strong>Bio</strong>: 
$bio</td>"
            
            
//Set our cell counter 
            
$i++;
            
$prev $area;
        } 
        
    } 


// Do we need to close the previous table and add a cell? 
if ($i == ) { 
    
//Add a cell and close 
    
echo "  <td valign='top'>&nbsp;</td> 
          </tr> 
        </table>"

} else { 
    
//Just close the table 
    
echo "</table>"

Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:58 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.07568 seconds
  • Memory Usage 3,650KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (40)post_thanks_box
  • (2)post_thanks_box_bit
  • (40)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (40)post_thanks_postbit_info
  • (40)postbit
  • (1)postbit_attachment
  • (40)postbit_onlinestatus
  • (40)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete