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') . '";'); }