MyBB Community Forums

Full Version: Download Plugin Does not display
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
You will need to update the header_welcomeblock_guest, header_welcomeblock_member, or both templates. It could also be just the header template as it varies from style.
(2018-12-15, 09:30 PM)Omar G. Wrote: [ -> ]You will need to update the header_welcomeblock_guest, header_welcomeblock_member, or both templates. It could also be just the header template as it varies from style.

What would be the code I must put in those templates?

Still Looking!
It would be easier for you to guess than us, since you have the theme installed. Search the code that is printing the other menu items and replicate it.

Such code should be in some of the templates I mentioned early.
(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
Ah thank you Sir Smile