I'm not sure as I haven't checked, but a quick scan of the plugin, and I suspect these lines (appears in multiple locations):
PHP Code:
$templates->cache('postbit');
$templates->cache('postbit_classic');
|
This probably conflicts with XThreads first post handling, but the above code is incorrect, for a number of reasons:
- It's already cached by earlier bits of the code:
PHP Code:
if(!$templates->cache['postbit'])
$templates->cache('postbit');
if(!$templates->cache['postbit_classic'])
$templates->cache('postbit_classic');
|
- The two calls really should be one, so that it doesn't double query
- It doesn't check for any previously cached variable, effectively adding two queries for nothing most of the time
- It overwrites any previously cached variable (effectively destroying any modification applied to it before)
You can safely delete all 12 instances of the code above in the first code box.
Pirata Nervo made a patch for the plugin, and i send him your instructions as well
Now both plugins are working fine
Thanks!
Quickly scanning the code it looks like this will be a tricky one to do.
I'll have a bit of a think.
EDIT: I can't seem to access the thread whilst logged in.
Anyway, maybe suggest to him this:
I don't really like this solution, but it may work (untested). Maybe he's already done something like this:
PHP Code:
if (empty($postbit_backup))
{
$postbit_backup = $templates->cache['postbit'];
$postbit_classic_backup = $templates->cache['postbit_classic'];
}
|
Maybe change to:
PHP Code:
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'];
}
|
(12-06-2010 08:23 AM)ZiNgA BuRgA Wrote: [ -> ]Quickly scanning the code it looks like this will be a tricky one to do.
I'll have a bit of a think.
EDIT: I can't seem to access the thread whilst logged in.
Anyway, maybe suggest to him this:
I don't really like this solution, but it may work (untested). Maybe he's already done something like this:
PHP Code:
if (empty($postbit_backup))
{
$postbit_backup = $templates->cache['postbit'];
$postbit_classic_backup = $templates->cache['postbit_classic'];
}
|
Maybe change to:
PHP Code:
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'];
}
|
I may try that. Glas, could you please replace those lines with what Zinga has suggested? Let me know if it works please.
using 1.9 + the fix it stills the same
i've noticed that gallery is now fixed
with your fix
i've noticed that MyAchievements and Newpoints items do not appear
But i don't care about that one
(12-23-2010 08:37 AM)glas Wrote: [ -> ]using 1.9 + the fix it stills the same
i've noticed that gallery is now fixed
with your fix
i've noticed that MyAchievements and Newpoints items do not appear
But i don't care about that one
I'm lost, what's working and what's not working?