(2018-12-15, 08:11 PM)DevLife Wrote: I am using daddyo plugin sorry for the misspelled username I can't seem to make it show on the forum https://community.mybb.com/mods.php?action=view&pid=854.
https://imgur.com/a/1C3dMBH
Hmmm, thanks for pointing out that the button insertion stopped working though fyi the plugin would display fine without the button insertion by simply visiting the forums/downloads.php page. Anyhoo, the button insertion can work again by doing the following:
In "inc/plugins/downloads.php" plugin file find:
require_once MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets('header', '#<navigation>
<br />#', '<navigation>
<br /><!-- Downloads -->
<style>
#downloads ul {
list-style-type: none;
overflow: hidden;
}
#downloads li a {
display: block;
color: #333;
text-align: center;
text-decoration: none;
}
#downloads li b {
background-color: green;
}
#downloads li a:hover {
color: #0072BC;
}
</style>
<div id ="downloads" style="position:relative;list-style-type:none;margin: 2px 6px 6px 2px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;background:#F5F5F5 url(images/buttons_bg.png) repeat-x;padding: 3px 8px;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:16px;border:1px solid #bbb;outline:0;display:inline-block;z-index:9998;">
<li><a href="{\$mybb->settings[\'bburl\']}/downloads.php"><img src="{\$theme[\'imgdir\']}/download.png" alt="" title="" /> {$lang->downloads}</a></li></div><!-- /Downloads -->');
}
and replace with:
}
function downloads_activate()
{
require_once MYBB_ROOT . '/inc/adminfunctions_templates.php';
find_replace_templatesets("header", "#<navigation(.*?)<br />#ism", '<navigation>
<br /><!-- Downloads -->
<style>
#downloads ul {
list-style-type: none;
overflow: hidden;
}
#downloads li a {
display: block;
color: #333;
text-align: center;
text-decoration: none;
}
#downloads li b {
background-color: green;
}
#downloads li a:hover {
color: #0072BC;
}
</style>
<div id ="downloads" style="position:relative;list-style-type:none;margin: 2px 6px 6px 2px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;background:#F5F5F5 url(images/buttons_bg.png) repeat-x;padding: 3px 8px;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:16px;border:1px solid #bbb;outline:0;display:inline-block;z-index:9998;">
<li><a href="{\$mybb->settings[\'bburl\']}/downloads.php"><img src="{\$theme[\'imgdir\']}/download.png" alt="" title="" /> {$lang->downloads}</a></li></div><!-- /Downloads -->', 0);
}
function downloads_deactivate()
{
require_once MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets('header', '#\<!--\sDownloads\s--\>(.+)\<!--\s/Downloads\s--\>#is', '', 0);
}
Or just download:
https://community.mybb.com/mods.php?acti...4&bid=3672