@wageral
The error tells you exactly what the issue is, it is looking for 'MYSQL_BOTH' when the plugin has MYSQL_BOTH and it tells you that line 83 is where it is located..., thus you would simply go to that line:
While ($row = $db->fetch_array($count, MYSQL_BOTH)){
and provide what it was assuming:
While ($row = $db->fetch_array($count, 'MYSQL_BOTH')){
Also you need to fix the submenu function for it to display in acp...
Instead of:
function ads_nav($sub_menu){
$sub_menu[] = array(
"id" => "ads",
"title" => "Ad Rotation Manager",
"link" => "index.php?module=config/ads"
);
}
Do something like so:
function ads_nav(&$sub_menu){
global $mybb;
if(is_super_admin((int)$mybb->user['uid']))
{
$sub_menu['310'] = array(
"id" => "ads",
"title" => "Ad Rotation Manager",
"link" => "index.php?module=config/ads"
);
}
}
You also will need to modify this:
function ads_activate(){
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets(
"footer",
'#'.preg_quote('<div class="bottommenu">').'#',
'<center>{$banner}</center><div class="bottommenu">'
);
}
function ads_deactivate(){
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets(
"header",
'#'.preg_quote('<center>{$banner}</center><div class="bottommenu">').'#',
'<div class="bottommenu">',
0
);
}
And change to something like this for example if you want it in the footer below the bottom menu:
function ads_activate(){
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets(
"footer",
'#'.preg_quote('{$auto_dst_detection}').'#',
'<br /><center>{$banner}</center><br />{$auto_dst_detection}'
);
}
function ads_deactivate(){
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets(
"footer",
'#'.preg_quote('<br /><center>{$banner}</center><br />{$auto_dst_detection}').'#',
'{$auto_dst_detection}',
0
);
}
or change to something like this for example if you want it in the footer above the bottom menu:
function ads_activate(){
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets(
"footer",
'#'.preg_quote('<div id="footer">').'#',
'<center>{$banner}</center><br /><br /><div id="footer">'
);
}
function ads_deactivate(){
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets(
"footer",
'#'.preg_quote('<center>{$banner}</center><br /><br /><div id="footer">').'#',
'<div id="footer">',
0
);
}
The reason this must be done is that the bottom menu name is not the same in 1.8 as it was in 1.4 so that should get the ads to display in the footer again and also allow it to uninstall in the template as the old deactivate function was looking in header template for footer items???.... thus not uninstalling in the template
This has the previous things already simply to get you started:
[
attachment=41599]
There is one issue I did notice but did not have the time to look into and perhaps another member that has more free time can focus on that and that is the the null entry issue on max because it will error if max input is empty so you may want to fix that and I currently do not have the free time to look at that further.
As far as any other changes that might or might not need to be made please note: * I did not look at this further nor does my current allotted free-time allow me to do so, apologies...
*** Also note: the tablespace notice you have in your screenshot should not be present if you are using the fixed prostats
https://community.mybb.com/thread-222168...pid1325417