Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #61  
Old 02-13-2015, 04:59 PM
KGodel's Avatar
KGodel KGodel is offline
 
Join Date: May 2011
Location: Indiana
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright. I'll try to find where to do that. Thanks for the help.
Reply With Quote
  #62  
Old 03-08-2015, 02:07 AM
KGodel's Avatar
KGodel KGodel is offline
 
Join Date: May 2011
Location: Indiana
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey guys, I'm still having no luck figuring out where to add/remove code to parse the BBCode in article previews. ANy help would be great!
Reply With Quote
  #63  
Old 03-11-2015, 09:54 PM
KGodel's Avatar
KGodel KGodel is offline
 
Join Date: May 2011
Location: Indiana
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still working on the above issue, but I have another concern.

I have some PHP I'd like to put in a CMS direct evaluation. I followed the rules, doing anything but then setting the $output variable, but all I get is a white page. I have tested this code via a plugin we have to create pages via the forum and it works as intended. Are there functions that are disallowed in the CMS?
Reply With Quote
  #64  
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
  #65  
Old 03-16-2015, 02:13 PM
KGodel's Avatar
KGodel KGodel is offline
 
Join Date: May 2011
Location: Indiana
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Summary: DIV is supposed to include PHP output, instead div is there but contains nothing (even though the php code is in the div) and preview output is below it.

EDIT: Contained everything in a div with max height 100% and that seemed to fix it.

Now, about that BBCode in article previews....
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:58 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03878 seconds
  • Memory Usage 2,261KB
  • Queries Executed 12 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (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_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete