Thread Rating:
  • 45 Vote(s) - 3.73 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Script to Update Plugins for 1.6.5
#11
Not Solved
(2011-11-29, 10:13 PM)Pirata Nervo Wrote: Someone PM'd me that this script was saying that MyAdvertisements required to be updated but MyAdvertisements always used receiving by reference. Either your script is failing somewhere or something else is happening.

Oh and this was the function it mentioned:
function myadvertisements_postbit_disable(&$post)
{
	global $mybb, $templates;
	
	$cachetemps = array();
	
	if(!$templates->cache['postbit'])
		$cachetemps[] = 'postbit';
		
	if(!$templates->cache['postbit_classic'])
		$cachetemps[] = 'postbit_classic';
	
	if (!empty($cachetemps))
		$templates->cache(implode(',', $cachetemps));
		
	if (!isset($mypostcounter))
		$mypostcounter = 0;
		
	static $postbit_backup = '';
	static $postbit_classic_backup = '';
	
	// Fix purposed by Yumi/Zinga
	// http://mybbhacks.zingaburga.com/showthread.php?tid=572&pid=5133#pid5133
    static $restore_postbit = null;
    if (empty($postbit_backup) || $restore_postbit)
    {
        $viewmode = ($mybb->settings['postlayout'] == 'classic' ? '_classic' : '');
        $restore_postbit = (
            !isset($restore_postbit)
            && isset($templates->cache['postbit_first'.$viewmode])
            && $templates->cache['postbit_first'.$viewmode] == $templates->cache['postbit'.$viewmode]
        );
        $postbit_backup = $templates->cache['postbit'];
        $postbit_classic_backup = $templates->cache['postbit_classic'];
    }
	
	$templates->cache['postbit'] = str_replace('{myadvertisements[zone_3]}', '', $postbit_backup);
	$templates->cache['postbit_classic'] = str_replace('{myadvertisements[zone_3]}', '', $postbit_classic_backup);
}


they may be using the old version that only indicated that a plugin uses one of the hooks listed as effected by the 1.6.5 changes and lists the filename, hook name and function name referenced by the hook. It was not smart enough to know if the fix was actually needed. That was explained several times in the original thread. The person that contacted you did not read the whole original thread.

This new version actually checks if the "&" is there already and updates the local file if it is not.
Lost interest, sold my sites, will browse here once in a while. It's been fun.


Messages In This Thread
Script to Update Plugins for 1.6.5 - by pavemen - 2011-11-28, 05:47 AM
RE: Script to Update Plugins for 1.6.5 - by pavemen - 2011-11-29, 10:19 PM
RE: Script to Update Plugins for 1.6.5 - by alv4 - 2011-12-03, 03:00 PM
RE: Script to Update Plugins for 1.6.5 - by lexy - 2011-12-07, 07:39 PM
RE: Script to Update Plugins for 1.6.5 - by lexy - 2011-12-07, 08:08 PM
RE: Script to Update Plugins for 1.6.5 - by lexy - 2011-12-15, 03:31 PM
RE: Script to Update Plugins for 1.6.5 - by lexy - 2011-12-15, 04:44 PM
RE: Script to Update Plugins for 1.6.5 - by lexy - 2011-12-25, 10:30 AM
RE: Script to Update Plugins for 1.6.5 - by lexy - 2011-12-25, 05:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)