News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Display different image on each board instead of the new posts image?

Started by Aloyoshenka, March 28, 2021, 11:11:43 PM

Previous topic - Next topic

Aloyoshenka

Hello there!

I was wondering if it's possible to add a custom image on each board. The idea came from this code I found

https://wiki.simplemachines.org/smf/Images_-_How_do_I_add_images_to_the_board%27s_description

Here is a screenshot from my board using this code



What I want to replace is the shield on the left, any clue you can give me to make it work would be appreciated. Thank you in advance

PS: Is there any way to block users from using dropdown menus and force them to use sidebar ones only?

Oldiesmann

Try the Custom Board Icon mod: https://custom.simplemachines.org/mods/index.php?mod=511

No there is no way to force users to only use the sidebar menu, at least not without modifying the code
Michael Eshom
Christian Metal Fans

Aloyoshenka

Quote from: Oldiesmann on March 28, 2021, 11:52:54 PM
Try the Custom Board Icon mod: https://custom.simplemachines.org/mods/index.php?mod=511

No there is no way to force users to only use the sidebar menu, at least not without modifying the code



Looking great, thank you!  ;D ;D Do you know when on2.png is displayed?

Mod says it's not compatible with 2.0.18 but everything works fine.

Also do you know which file/s should I look to remove dropdown menus? Once again, thank you

Sir Osis of Liver

Quote from: Aloyoshenka on March 29, 2021, 08:36:14 AM
Do you know when on2.png is displayed?

New posts in child boards.

Quote
Also do you know which file/s should I look to remove dropdown menus? Once again, thank you

Not a good idea, but you can remove dropmenus from main menu in main button array in Subs.php (look for 'all the buttons').

Quote
Is there any way to block users from using dropdown menus and force them to use sidebar ones only?

Yes, you can set all members to use sidebars in Admin -> Current Theme -> Member Options, and remove the option from Profile.

Profile.template.php -



<!--li>
<input type="hidden" name="default_options[use_sidebar_menu]" value="0" />
<label for="use_sidebar_menu"><input type="checkbox" name="default_options[use_sidebar_menu]" id="use_sidebar_menu" value="1"', !empty($context['member']['options']['use_sidebar_menu']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['use_sidebar_menu'], '</label>
</li-->



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aloyoshenka

Quote from: Sir Osis of Liver on March 29, 2021, 12:52:13 PM
New posts in child boards.

Oh I see  ;D
Quote
Not a good idea, but you can remove dropmenus from main menu in main button array in Subs.php (look for 'all the buttons').


Yes, you can set all members to use sidebars in Admin -> Current Theme -> Member Options, and remove the option from Profile.

Profile.template.php -



<!--li>
<input type="hidden" name="default_options[use_sidebar_menu]" value="0" />
<label for="use_sidebar_menu"><input type="checkbox" name="default_options[use_sidebar_menu]" id="use_sidebar_menu" value="1"', !empty($context['member']['options']['use_sidebar_menu']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['use_sidebar_menu'], '</label>
</li-->



Amazing, thank you Sir Osis of Liver! I also found this posts of yours

Quote from: Sir Osis of Liver on November 21, 2014, 11:07:38 PM
Ok, here's one way to do it, but it will show sidebar menus in all sections, don't know if that's what you want.

First, go to Admin -> Themes and Layout -> Member Options -> Configure guest and new user options for this theme -> Use sidebar menus instead of dropdown menus when possible.   Check that and Save.  Do the same in -> Change current options for all members using this theme .  This will show sidebar menus to all members in all sections.

To remove the toggle, so they can't switch back, look in /Themes/default/GenericMenu.template.php and find this -



if ($firstSection && !empty($menu_context['can_toggle_drop_down']))
{
echo '
<span class="ie6_header floatleft">
<a href="', $menu_context['toggle_url'], '">', $section['title'],'<img style="margin: 0 5px; vertical-align: middle;" src="', $context['menu_image_path'], '/change_menu', $context['right_to_left'] ? '' : '2', '.png" alt="!" /></a>
</span>';



Change to this -



if ($firstSection && !empty($menu_context['can_toggle_drop_down']))
{
echo '
<span class="ie6_header floatleft">', $section['title'],'
</span>';



That will remove the widget and the link from 'Messages'.  All sections that have sidebar menus will be affected.

Doing both things basically remove drop down menus completely. Once again, thank you!


Steve

So, are you all set? If so, please press the 'MARK TOPIC SOLVED' button. :)
DO NOT pm me for support!

Advertisement: