View Single Post
  #1  
Old 01-15-2010, 09:19 PM
majorj0nny majorj0nny is offline
 
Join Date: May 2005
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default php5 incompatability ?

hi all - we use a staffpage mod for vbadvanced on our 3.8.4 vb forum, and have done for some years, ive used the basic mod to create other similar pages - ie for tagged members and clans ect..

last night our hosting apparently did some kind of a server upgrade , since then everything still works except any pages using a module that uses on of these 3 php files..

php file example -

PHP Code:

<?php
//////////////////////////////////////////////////////////////////////////////////
//                         staffpage.php version 1.6
//                  A dynamic staffpage for vBadvanced CMPS
//                         Installation Instructions
//////////////////////////////////////////////////////////////////////////////////
// staffpage.php /////////////////////////////////////////////////////////////////
// 1.6  Added support for filesystem and database
// 1.5  Added support for vBulletin 3.5
// 1.4a Added display of staff without a profile pic
// 1.4  Added support for updated profile images
// 1.3  Added support for secondary usergroups
// 1.2  Added display of line breaks
//      Seperated titles to allow for spaces
//      Added links to member profiles from name and picture
//      Fixed width display for non uniform profile pics.
// 1.1  Reverted to use all three usergroups.
// 1.0     Initial code
//////////////////////////////////////////////////////////////////////////////////
// ? 2005 Written by Alexander "Kesomir" Worton
// You are not permitted to remove the link to Online Gamers or distribute this code
// http://www.onlinegamers.org.uk <- UK based PC Gaming enthusiasts community
//////////////////////////////////////////////////////////////////////////////////
// Read the installation instructions. Support is only provided at Online Gamers
// enter the number of your biography field //////////////////////////////////////

$bionum "5";

$picturewidth "100";

///////////////////////// NO NEED TO EDIT BELOW THIS LINE  ///////////////////////


$biofield "field".$bionum;
// Grabbing that data
$result $db->query_read("SELECT userfield.userid, user.userid, user.username, user.membergroupids, user.usergroupid, user.avatarrevision, user.profilepicrevision, customprofilepic.dateline, customprofilepic.filename, userfield.$biofield
FROM " 
TABLE_PREFIX ."userfield AS userfield 
INNER JOIN " 
TABLE_PREFIX ."user AS user ON (userfield.userid=user.userid) 
LEFT JOIN " 
TABLE_PREFIX ."customprofilepic AS customprofilepic ON (customprofilepic.userid=user.userid)
WHERE FIND_IN_SET(5,user.membergroupids) OR FIND_IN_SET(6,user.membergroupids) OR FIND_IN_SET(67,user.membergroupids) OR FIND_IN_SET(9,user.membergroupids)OR FIND_IN_SET(7,user.membergroupids)OR FIND_IN_SET(54,user.membergroupids) 
OR (user.usergroupid = 5) OR (user.usergroupid = 6) OR (user.usergroupid = 67) OR (user.usergroupid = 9)OR (user.usergroupid = 7)OR (user.usergroupid = 54)
ORDER BY userfield.userid ASC
"
);

//loop it baby yeah!
while($row mysql_fetch_array($result)) 
{    
  
$bio stripslashes(nl2br($row[$biofield])); 
    
$susername $row['username'];
    
$susergroup $row['usergroupid'];

    if (
in_array('9',explode(","$row['membergroupids'])))
    { 
        
$susergroup "9";        
    }

if (
in_array('67',explode(","$row['membergroupids'])))
    { 
        
$susergroup "67";        
    }

    if (
in_array('54',explode(","$row['membergroupids'])))
    { 
        
$susergroup "54";        
    }
    
    if (
in_array('5',explode(","$row['membergroupids'])))
    { 
        
$susergroup "5";    
    }
    
    if (
in_array('6',explode(","$row['membergroupids'])))
    { 
        
$susergroup "6";    
    }

    if (
in_array('7',explode(","$row['membergroupids'])))
    { 
        
$susergroup "7";    
    }


        
 switch (
$susergroup
    {
        case 
"7":
            
$staffrank "VeteranModerator";
            
$staffname "Veteran Moderator";
            break;   
     
             case 
"6":
            
$staffrank "Administrator";
            
$staffname "Founder";
            break;
            
    case 
"54":
            
$staffrank "Administrator";
            
$staffname "Founder";
            break;

        case 
"9":
            
$staffrank "ServerAdmin";
            
$staffname "Server Admin";
            break; 

case 
"67":
            
$staffrank "GServerAdmin";
            
$staffname "Girly Server Admin";
            break; 
  

case 
"5":
            
$staffrank "Moderator";
            
$staffname "Moderator";
            break; 


         
    }
    
    
     
// if ($row['userid'] != 1) uncomment these three lines to stop the default admin account from appearing. (Line 1)
// { //uncomment these three lines to stop the default admin account from appearing. (Line 2)
            
$$staffrank .= "<table class=\"tborder\" cellpadding=\"$stylevar[cellpadding]\" cellspacing=\"$stylevar[cellspacing]\" border=\"0\" width=\"100%\" align=\"center\">";
            $
$staffrank .= "<thead><tr align=\"left\" height=\"10\"><td class=\"tcat\">";
          $
$staffrank .= "<span class=\"smallfont\"><b>$vboptions[blockbullet] ".$staffname." <a href=\"$vboptions[bburl]/forum/member.php?u=".$row[userid]."\">".$susername."</a></b></td>";
            $
$staffrank .= "</tr></thead>";
            $
$staffrank .= "<tr class=\"alt2\">";                
            $
$staffrank .= "<td class=\"alt1\" width=\"100%\">";
            $
$staffrank .= "<!-- avatar -->";
            $
$staffrank .= "<table align=\"left\" cellspacing=\"4\"><tr><td>";
            $
$staffrank .= "<a href=\"".$vbulletin->options[bburl]."/member.php?u=".$row[userid]."\">";
            if (
$vbulletin->options['usefileavatar'])
            {
            $
$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/customprofilepics/profilepic".$row[userid]."_".$row[profilepicrevision].".gif\" border=\"0\" width=\"$picturewidth\" /></a> </td></tr></table>";    
            }
            else    {
            $
$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/image.php?u=".$row[userid]."&type=profile&dateline=".$row[dateline]."\" valign=\"top\" alt=\"".$row[username]."\" border=\"0\" width=\"$picturewidth\" /></a> </td></tr></table>";
                         }
            $
$staffrank .= "<!-- /avatar -->";
            $
$staffrank .= "<div align=\"left\">".$bio."</div>";
            $
$staffrank .= "</td>";
            $
$staffrank .= "</table> <br />";
            
// } //uncomment these three lines to stop the default admin account from appearing. (Line 3)
            
}    



eval(
'$home[$mods[\'modid\']][\'content\'] = "' fetch_template('adv_portal_staffmembers') . '";');
?>
nothing has changed with these files - but they just dont work anymore..

ive asked our hosting and they say it might be a php5 incompatability ?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01501 seconds
  • Memory Usage 1,876KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete