Thread: Add-On Releases - vBExperience
View Single Post
  #1045  
Old 06-16-2008, 06:49 PM
MorrisMcD's Avatar
MorrisMcD MorrisMcD is offline
 
Join Date: Nov 2003
Location: Cincinnati, Ohio
Posts: 415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed and got the following when refreshing anywhere on my site, including admincp...

Code:
db->query_write("UPDATE " . TABLE_PREFIX . "user SET xperience_awards=CONCAT('".addslashes($award['awardid'])."|".addslashes($award['awardname'])."|".addslashes($award['awardtitle'])."', ',', xperience_awards) WHERE userid=".$userid); } function WriteShopItem($item, $userid) { global $vbulletin; if (strlen($item['itemicon']) < 3) { $item['itemicon'] = $vbulletin->options['bburl']."/images/misc/level/icon_item_s.png"; } $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET xperience_shopitems=CONCAT('".addslashes($item['itemid'])."|".addslashes($item['cnt_items'])."|".addslashes($item['itemname'])."|".addslashes($item['itemicon'])."', ',', xperience_shopitems) WHERE userid=".$userid); } function WriteShopItems($userinfo) { global $vbulletin; if ($vbulletin->options['xperience_shop_postbit'] == 0) { return; } $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET xperience_shopitems='' WHERE userid=".$userinfo['userid']); $itemsaq =$vbulletin->db->query_read("SELECT COUNT(t.itemid) as cnt_items, s.itemname, s.itemicon, s.itemid FROM " . TABLE_PREFIX . "xperience_shop_ta as t INNER JOIN " . TABLE_PREFIX . "xperience_shop as s ON s.itemid=t.itemid WHERE t.buyer=".$userinfo['userid']." GROUP BY t.itemid ORDER BY dateline DESC LIMIT ".$vbulletin->options['xperience_shop_postbit']); if ($vbulletin->db->num_rows($itemsaq) > 0) { while ($itemsa = $vbulletin->db->fetch_array($itemsaq)) { WriteShopItem($itemsa, $userinfo['userid']); } } } function GetShopItems($userinfo) { global $vbulletin, $vbphrase; $xperience_items=explode(",", $userinfo['xperience_shopitems']); foreach($xperience_items AS $itemk => $iteme) { $itemi = explode("|", $iteme); $itemid = $itemi[0]; if (is_numeric($itemid)) { $itemcount = $itemi[1]; $itemname = $itemi[2]; $itemicon = $itemi[3]; eval('$items .= " ' . fetch_template('xperience_shop_item_p') . '";'); } } return $items; } function GetAwards($MyAwards) { global $vbulletin, $stylevar; $xperience_awards=explode(",", substr($MyAwards, 0, strlen($MyAwards)-1)); foreach($xperience_awards AS $awardk => $awarde) { $awardi=explode("|", $awarde); $awardid=$awardi[0]; if (is_numeric($awardid)) { $awardname = $awardi[1]; $awardtitle = $awardi[2]; if ($vbulletin->options['xperience_awardgfx']) { $awardname .= ".png"; } else { $awardname .= ".gif"; } //this has to be hardcoded as the fetch_musername hook comes before style_fetch if (strlen($stylevar[imgdir_misc])<2) $stylevar[imgdir_misc]="images/misc"; //this has to be hardcoded as the fetch_musername hook comes before cache_templates $awards.=' ['.$awardtitle.'] '; } } return $awards; } function GetAvatar($userinfo) { global $vbulletin; $avatarurl=$userinfo['avatarurl']; if ($userinfo['avatarid']) { $avatarurl = $userinfo['avatarpath']; } else { if ($userinfo['hascustomavatar'] AND $vbulletin->options['avatarenabled']) { if ($vbulletin->options['usefileavatar']) { $avatarurl = $vbulletin->options['avatarurl'] . "/avatar$userinfo[userid]_$userinfo[avatarrevision].gif"; } else { $avatarurl = 'image.php?' . $vbulletin->session->vars['sessionurl'] . "u=$userinfo[userid]&dateline=$userinfo[avatardateline]"; } } else { if (!empty($userinfo['avatarurl'])) { $avatarurl=$userinfo['avatarurl']; } else { $avatarurl = ''; } } } return $avatarurl; } function GetItemCount($catid) { global $vbulletin; $count_items = 0; if (strlen($catid > 0)) { $itemsq = $vbulletin->db->query_read("SELECT COUNT(itemid) as c_items FROM " . TABLE_PREFIX . "xperience_shop WHERE catid=".$catid); if ($vbulletin->db->num_rows($itemsq) > 0) { $items = $vbulletin->db->fetch_array($itemsq); $count_items = $items['c_items']; } } return $count_items; } function construct_xp_categories($parentid, $current, $prechars = '') { global $vbulletin, $vbphrase; $prechars .= "     "; $catq =$vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "xperience_shop_cat WHERE catstatus<>0 AND catparent=".$parentid." ORDER BY catstatus"); if ($vbulletin->db->num_rows($catq) > 0) { while ($cat = $vbulletin->db->fetch_array($catq)) { global $bgclass, $altbgclass; exec_switch_bg(); if ($current == $cat['catid']) { $cat['catname'] = "> " . $cat['catname']; } $count_items = GetItemCount($cat['catid']); eval('$categories .= "' . fetch_template('xperience_shop_cat') . '";'); $categories .= construct_xp_categories($cat['catid'], $current, $prechars); } } return $categories; } function CheckBuyConditions($itemsa, $userstats, $getphrase = false) { global $vbulletin; $allow = true; $buyphrase = "xperience_shop_buy"; if ($itemsa['quantity'] == 0) { $allow = false; $buyphrase = "xperience_shop_err_qnt"; } if ($itemsa['costs'] > $userstats["$itemsa[costfield]"]) { $allow = false; $buyphrase = "xperience_shop_err_cost"; } if (!$vbulletin->options['xperience_shop_allow_multi']) { $userq =$vbulletin->db->query_read("SELECT itemid FROM " . TABLE_PREFIX . "xperience_shop_ta WHERE itemid=".$itemsa['itemid']." AND buyer=".$userstats['userid']); if ($vbulletin->db->num_rows($userq) > 0) { $allow = false; $buyphrase = "xperience_shop_err_own"; } } if ($getphrase) { return $buyphrase; } else { return $allow; } } function fetch_xperience($userid) { global $vbulletin; $userstats = array(); $userq =$vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "xperience_stats WHERE userid=".$userid); if ($vbulletin->db->num_rows($userq) > 0) { $userstats = $vbulletin->db->fetch_array($userq); } return $userstats; } ?>
That is all that shows up on my site when this addon is enabled. I was able to globally disable the hook system in config and ultimately disable the addon.. For now anyway. Would love to get this working. Any ideas? I installed .14Beta3
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01227 seconds
  • Memory Usage 1,799KB
  • 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_code
  • (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