Thread: Major Additions - Goldbrick Audio/Video Media System
View Single Post
  #1057  
Old 12-03-2008, 04:38 AM
TomasDR TomasDR is offline
 
Join Date: Feb 2006
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried 1.91 and my header is messed.

On a thread with media inside it I see the following at the top of the page.

Code:
";'); } if ($vbulletin->options['gb_enabled']) { eval('$headinclude .= "' . fetch_template('goldbrick_header') . '";'); } tin->options['gb_height'], 'autoplay' => $vbulletin->options['gb_autoplay'], 'loop' => $vbulletin->options['gb_loop'] ); return $gb_options; } } /** * Fetches all old content from the database, and checks if it's still active. * If it's not, it will be reverted to its [url] form. * * @param integer Expiration period */ function goldbrick_exec_cleanup($hashes) { global $vbulletin; require_once(DIR . '/goldbrick/includes/class_goldbrick_cache.php'); $goldbrick = new Goldbrick_Cache($vbulletin); $media = $goldbrick->fetch_expired_media($hashes); $to_revert = array(); $to_remove = array(); $to_bump = array(); foreach ($media as $link) { if (empty($link['postids'])) { $to_remove[] = $link['hash']; continue; } if ($goldbrick->is_inactive($link['url'])) { $to_revert[] = $link; $to_remove[] = $link['hash']; continue; } $to_bump[] = $link; } if (defined('GOLDBRICK_DEBUG_CLEANUP')) { goldbrick_debug('revert, remove, bump', $to_revert, $to_remove, $to_bump); } if (!empty($to_revert)) { $goldbrick->revert_posts($to_revert); } if (!empty($to_remove)) { $goldbrick->remove($to_remove); } if (!empty($to_bump)) { $goldbrick->bump($to_bump); } } /** * undocumented function * * @return $value **/ function multiarrayearch($needle, $haystack) { $value = false; $x = 0; foreach ($haystack as $temp => $k) { $search = array_search($needle, $k); if (strlen($search) > 0 && $search >= 0) { $value[0] = $x; $value[1] = $search; $found = array($k[$search], $temp); } $x++; } return $found; } ?>of postids */ public function set_uniques($uniques) { if ($this->debug) { goldbrick_debug('PostIDs', $postids); } /*if (is_array($uniques)) { $this->media = $this->fetch_media_from_cache(implode(',', $postids)); } else { $this->media = $this->fetch_media($fetch_hash); }*/ if (!$this->media = $this->fetch_media($uniques)) { return null; } return $this->media; if ($this->debug) { goldbrick_debug('Fetched Media', $this->media); } } /** * Fetches all media associated with $postids from the cache. * * @param string Comma-separated list of post ids * @return array Media records */ private function fetch_media_from_cache($postids) { $result = $this->registry->db->query_read(" SELECT cache.* FROM " . TABLE_PREFIX . "gb_media LEFT JOIN " . TABLE_PREFIX . "gb_cache as cache using (hash) WHERE postid IN ($postids) "); $records = array(); while ($record = $this->registry->db->fetch_array($result)) { $records[] = $record; } $this->registry->db->free_result($record); return $records; } private function fetch_media($uniques) { global $vbulletin; /*$result = $this->registry->db->query_read(" SELECT * FROM " . TABLE_PREFIX . "gb_cache WHERE $uniques = hash "); $records = array(); while ($record = $this->registry->db->fetch_array($result)) { $records = $record; }*/ if ($vbulletin->options['gb_cache']) { $result = $this->cacheCheck($uniques); return $result; } else { return $this->registry->db->query_first(" SELECT * FROM " . TABLE_PREFIX . "gb_cache WHERE hash = '$uniques' "); } } private function cacheCheck($uniques) { require_once(DIR . '/Zend/Cache.php'); $frontendOptions = array( 'lifetime' => 604800, // cache lifetime of 7 days 'automatic_serialization' => true ); $backendOptions = array( 'cache_dir' => './goldbrick/cache/' // Directory where to put the cache files ); // getting a Zend_Cache_Core object $cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions); if(!$result = $cache->load($uniques)) { // cache miss; connect to the database $result = $this->registry->db->query_first(" SELECT * FROM " . TABLE_PREFIX . "gb_cache WHERE hash = '$uniques' "); $cache->save($result, $uniques); return $result; } else { return $result; } } }
On every page I see just

Code:
'";'); } if ($vbulletin->options['gb_enabled']) { eval('$headinclude .= "' . fetch_template('goldbrick_header') . '";'); }
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01375 seconds
  • Memory Usage 1,787KB
  • 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
  • (2)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