Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2857)
Menu Icons 1.0
By Mick G. idesignSMF.com
COMPATIBLE WITH SMF 2.0
To install on custom themes, tick the themes you want this mod to appear upon installation. If you forget, simply copy the "menu_icons" folder to your theme's image folder.(https://www.idesignsmf.com/images/idesignadvert.png) (https://www.idesignsmf.com)
Bug Fixes / Updates1.) Created v.1.0 on December 12th 2010
2.) Added 'ALT' tags to make images valid xhmtl. December 13th 2010
3.) Fixed an Undifined error December 16th 2010
4.) Added support to rc2 & rc3. December 17th 2010
5.) Added support to RC5. March 2011
6.) Updated to SMF 2.0 | June 2011
7.) Updated to SMF 2.0.2 | December 2012
8.) Updated to SMF 2.0.15 | July 2018
This mod installs a set of icons on your SMF menu.
Images used: Fam Fam Fam Icons
If you need support or need customize help, please post in the thread at SimpleMachines.org and @ idesignSMF.com Thanks!
For those using mods like: gallery, arcade, etc..
Open:
/Sources/Subs.php
For SMF Gallery mod:
Find:
'title' => $txt['smfgallery_menu'],
Replace with:
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/yourimage.png" alt="'.$txt['smfgallery_menu']. '"/> ' . $txt['smfgallery_menu'],
For SMF Arcade mod:
Find:
'title' => 'title' => $txt['arcade'],
Replace with:
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/yourimage.png" alt="'.$txt['arcade']. '"/> ' . $txt['arcade'],
For custom menus....
'title' => '<img align="absMiddle" src="http://www.yoursite.com/Themes/default/images/menu_icons/yourimage.png" alt="My websites" /> ' .'My Websites',
SimplePortal
Find:
'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'],
Replace
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/yourimage.png" alt="'.$txt['sp-forum']. '"/> ' . $txt['sp-forum'],
Replace:
-'My Websites' with your own menu title.
-'yourimage.png' with the name of your image of choice.
-'yoursite.com' with your own URL.
Load your images to:
your_theme/images/menu_icons
Image list:
http://www.famfamfam.com/lab/icons/silk/previews/index_abc.png
Icons ZIP included below....
Awesome idea it looks great on the default install will be adding it to my sites or something similar.
Quote from: vbgamer45 on December 13, 2010, 05:22:35 PM
Awesome idea it looks great on the default install will be adding it to my sites or something similar.
Thank you vb. I saw a couple support threads asking about images on the menu. I figured why not. ;)
Nice indeed :)
Nice idea. Looking forward to the writeup on adding to custom menus.
How about rc3 brother?Please can you provide a tutorial on how to do it manually? I have gallery,downloads,smf portal installed
Quote from: tfs on December 14, 2010, 01:22:10 AM
Nice idea. Looking forward to the writeup on adding to custom menus.
I will today ;)
Quote from: kadhafi on December 14, 2010, 06:41:32 AM
How about rc3 brother?Please can you provide a tutorial on how to do it manually? I have gallery,downloads,smf portal installed
Click on advanced at the bottom of your mod list and change it to rc3. Then install. ;)
I found a bug on rc4
IF you have some of the menu tabs hidden then it files up the error logs like mad here are my menu tabe i use
* Admin
* Moderate
* Home
* Search
* Profile
* My Messages
* Members
* Logout
my site action=admin
Apply Filter: Only show the errors with the same message
8: Undefined index: modsettings_title
Apply Filter: Only show the errors from this file
File: F:/xampp/htdocs/Sources/Subs.php
Line: 4095
my site action=shoutbox;sa=get;xml;row=0;restart
Apply Filter: Only show the errors with the same message
8: Undefined index: modsettings_title
Apply Filter: Only show the errors from this file
File: F:/xampp/htdocs/Sources/Subs.php
Line: 4095
my site /index.php?
Apply Filter: Only show the errors with the same message
8: Undefined index: modsettings_title
Apply Filter: Only show the errors from this file
File: F:/xampp/htdocs/Sources/Subs.php
Line: 4095
here is line 4095
==>4095:
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/joystick.png" alt="'.$txt['modsettings_title']. '"/> ' . $txt['modSettings_title'],
unistall it no errors at all in my logs no matter what i do i dont get errors
install it and im full of error even if i stay on the log page and just click refresh
it installs perfect on rc4 no alerts on installing
@tesser
Do you have $txt['modSettings_title'] = 'Features and Options';
in Themes/default/languages/index.english.php ??
yes i do have
$txt['modSettings_title'] = 'Features and Options';
A bump on this if i may ?
@tesser
Load your Subs.php file so I can take a looksie.
Is this what your after ? i did look for subs.php but could not see it.
Quote from: tesser on December 16, 2010, 05:05:02 PM
Is this what your after ? i did look for subs.php but could not see it.
No.
Look in Sources/Subs.php
also please list your mods installed here..
mods installed
1. Effectively Remove SMF Logo 1.2 [ Uninstall ]
2. SubAccounts Mod 1.0.1 [ Uninstall ]
3. Registered Links 3.0 [ Uninstall ]
4. Copyright & Footer Links | S-Ace 3.1 [ Uninstall ]
5. Member Color Link 3.0.8 [ Uninstall ]
6. Tidy Child Boards 1.3 [ Uninstall ]
7. Menu Buttons 1.1 [ Uninstall ]
8. InformationBar 1.0 [ Uninstall ]
9. Add Honey Pot to Track IP 1.1 [ Uninstall ]
10. Hide Edited Line 1.0.0 [ Uninstall ]
11. Favicon 1.3 [ Uninstall ]
12. Alternate User Posting 1.0 [ Uninstall ]
13. ResizeImagesToFitScreen 0.1.6 [ Uninstall ]
14. Errors in Who's Online 1.0 [ Uninstall ]
15. Attachment MP3 Player 1.0.1 [ Uninstall ]
16. Remove XHTML, RSS & WAP2 Links in Footer v1.1 [ Uninstall ]
17. sa_downloads 0.3.1 Rev23 [ Uninstall ]
18. InLine Attachments 1.08 [ Uninstall ]
19. Add IP2Location to Track IP 1.3 [ Uninstall ]
20. SMFPacks Shoutbox 1.0 [ Uninstall ]
21. Users Online Today 1.5.6 [ Uninstall ]
22. SoLoSMiLeYS 1.0 [ Uninstall ]
23. Search Focus Dropdown 1.51 [ Uninstall ]
24. Read Sticky Topics 1.0.3 [ Uninstall ]
25. Project Snow 1.1 1.1 [ Uninstall ]
26. PM Sent Notification 1.0.5 [ Uninstall ]
27. New Topic Button 1.0 [ Uninstall ]
28. More Spiders 1.2 [ Uninstall ]
29. Menu Order 0.2.5 [ Uninstall ]
30. LMGTFY BBcode 3.0 [ Uninstall ]
31. Install & Uninstall Mods Quickly 1.3 [ Uninstall ]
32. H1 BBCode 1.1 [ Uninstall ]
33. ENotify 2.0 [ Uninstall ]
34. Align text with Smiley 1.1 [ Uninstall ]
35. 2-SI Chat rev34
edit: i should point out Menu Icons is on my server but unistalled
Im going to look at your file but my guess is this mod is affecting it.
29. Menu Order 0.2.5 ......Dont know yet.....brb.
Its not your file. Its a mess up of my part in the code. I will update the zip in a minute.
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/joystick.png" alt="'.$txt['modsettings_title']. '"/> ' . $txt['modSettings_title'],
Notice "modsettings_title" ? It should be "modSettings_title".
Ty very much as this is one cool mod it realy makes a different look
Wonders how come no one else noticed the errors ???
Fixed an Undefined error. Zip updated.
@tesser, thank you for finding the bug. Its all fixed now.
great mod. simple, u see results right away , one of the few ones out there that doesnt require any edits. how do i add more icons?
Your welcome and confirmed its fixed no errors made by it.
Quote from: tesser on December 16, 2010, 05:47:45 PM
Your welcome and confirmed its fixed no errors made by it.
Thank you for verifying.
Quote from: ggman on December 16, 2010, 05:47:31 PM
great mod. simple, u see results right away , one of the few ones out there that doesnt require any edits. how do i add more icons?
I will write a quick tutorial in Post #2 on how to add more images to custom menus. Images zip also will be provided.
A quick tut is added to Post #2.
Have fun ;)
Quote from: bluedevil on December 14, 2010, 07:25:53 AM
Click on advanced at the bottom of your mod list and change it to rc3. Then install. ;)
I'm running rc3 and under advance it's emulating rc3. When I try to install your mod it says it won't work with my version. Am I doing something wrong?
Quote from: teh_Krall on December 17, 2010, 01:39:58 AM
Quote from: bluedevil on December 14, 2010, 07:25:53 AM
Click on advanced at the bottom of your mod list and change it to rc3. Then install. ;)
I'm running rc3 and under advance it's emulating rc3. When I try to install your mod it says it won't work with my version. Am I doing something wrong?
You're not. The package is set for rc4 only. I will change it tonight for rc3 and rc4. I'm at work now.
with RC3 installed I simply emulate RC4 and it works just fine ;)
Quote from: bluedevil on December 17, 2010, 08:51:10 AM
Quote from: teh_Krall on December 17, 2010, 01:39:58 AM
Quote from: bluedevil on December 14, 2010, 07:25:53 AM
Click on advanced at the bottom of your mod list and change it to rc3. Then install. ;)
I'm running rc3 and under advance it's emulating rc3. When I try to install your mod it says it won't work with my version. Am I doing something wrong?
You're not. The package is set for rc4 only. I will change it tonight for rc3 and rc4. I'm at work now.
Sweet thank you for your help :) I really need to pickup a php book so I can understand these mods better.
New zip loaded to cover all rc2, rc3, rc4 versions. ;)
Quote from: bluedevil on December 17, 2010, 04:58:54 PM
New zip loaded to cover all rc2, rc3, rc4 versions. ;)
Nice! Mod looks great on our forums, thanks for your effort :)
Quote from: teh_Krall on December 18, 2010, 12:15:45 AM
Quote from: bluedevil on December 17, 2010, 04:58:54 PM
New zip loaded to cover all rc2, rc3, rc4 versions. ;)
Nice! Mod looks great on our forums, thanks for your effort :)
youy're welcome. ;)
Nice.
However, I do have a suggestion.
this would make it easier to abstract (i.e. build an admin interface to add/change the icon for any menu item) and would make it simpler for people like me who have 9+ additional menu items...
Instead of doing it like this:
'home' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/house.png" alt="'.$txt['home']. '"/> ' . $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
),
you could add a new object into the array, thus
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'icon' => $settings['images_url']. '/menu_icons/house.png',
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
),
and then, you could call the image in the template_menu on output. or re-use it within the array itself.
Excellent idea thanx Kindred. I likey ;)
Hello
I have a problem with the "Menu Icons" and "SMF Media"
Could not set icon.
I have prepared the following line
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/smg.png" alt="'.$txt['media']. '"/> ' . $txt['media'],
And this is in the "Subs.php"
// Aeva Media changes
'media' => array(
'title' => (isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
'href' => $scripturl . '?action=media',
'show' => !empty($modSettings['aeva_enable_gallery']) && allowedTo('aeva_access'),
'sub_buttons' => !allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? array() : array(
If I insert after
'media' => array(
no icons in the menu
and if I put the following
'title' => (isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
Icons there but no icon next to "Media" icon only
Enclosed is the icon of the "SMF Media" which I revised a bit, reduce the size of 16x16
Are there a solution?
Thanks
// Aeva Media changes
'media' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_gallery']. '"/> ' .(isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
'href' => $scripturl . '?action=media',
'show' => !empty($modSettings['aeva_enable_gallery']) && allowedTo('aeva_access'),
'sub_buttons' => !allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? array() : array(
'aeva_home' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_home']. '"/> ' .$txt['aeva_home'],
'href' => $scripturl . '?action=media',
'show' => true,
),
'aeva_unseen' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_unseen']. '"/> ' .$txt['aeva_unseen'],
'href' => $scripturl . '?action=media;sa=unseen',
'show' => true,
'is_last' => true,
),
),
),
// End Aeva Media changes
and I found a good gallery image using the fam fam fam silk icons...
It was ok
Many thanks
QuoteNice.
However, I do have a suggestion.
this would make it easier to abstract (i.e. build an admin interface to add/change the icon for any menu item) and would make it simpler for people like me who have 9+ additional menu items...
Instead of doing it like this:
Code: [Select]
'home' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/house.png" alt="'.$txt['home']. '"/> ' . $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
),
you could add a new object into the array, thus
Code: [Select]
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'icon' => $settings['images_url']. '/menu_icons/house.png',
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
),
Quote from: bluedevil on December 21, 2010, 04:23:07 PM
Excellent idea thanx Kindred. I likey ;)
Hhhhhm does this mean there could be an update of some kind ??
nice mod
but it's not add icons for some menus, eg :
http://www.simplemachines.org/community/index.php?action=profile
profile info, summary, show stats ...
thx
Quote from: Am' on December 27, 2010, 04:33:34 PM
nice mod
but it's not add icons for some menus, eg :
http://www.simplemachines.org/community/index.php?action=profile
profile info, summary, show stats ...
thx
The mod does not do that in the profile area. Pretty much the icons are there in the general area.
Great mod! Looks good on my theme installed (Fresh by Skinmod)!
Just added a little icon for my ADK Downloads area...
Find:
'title' => $txt['downloads'],
Replace:
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/yourimage.png" alt="'.$txt['downloads'].'"/> ' . $txt['downloads'],
Change the yourimage.png to your preferred image.
Great mod, its awesome, seen your site and you do good work
If you ever expand on it, icons for staff(dont know what you would use), forum(mini forum), donations(dollar symbol), would be cool
Quote from: joey791 on December 29, 2010, 02:22:27 AM
Great mod, its awesome, seen your site and you do good work
If you ever expand on it, icons for staff(dont know what you would use), forum(mini forum), donations(dollar symbol), would be cool
you can add additional icons to the folder; the current icons are based off FamFamFam.
I added icons for about 8 extra menu items
Quote from: joey791 on December 29, 2010, 02:22:27 AM
Great mod, its awesome, seen your site and you do good work
If you ever expand on it, icons for staff(dont know what you would use), forum(mini forum), donations(dollar symbol), would be cool
Thank man. Its called being lazy. lol
Sometimes is easier to cut corners. I used the 'arrows' for all dropdowns instead of diff images.
...as SST stated, you could add more images to the menu_icons folder and rename them in Subs.php
Reply#1 has the fam fam images zip attached. ;)
i will have to repost i had some friends round while i was making coffee they changed it i wondered what they was laughing at lol now i know
well, is $txt['sp-here'] defined? Seems like it's not.
Why are you even using sp-here? why not use sp-forum like the actual text?
Fixed with no errors.
Lesson of the day dont leave a file open when the girls come round they changed "forum" to "here"
guess the joke was on me lol
just found this too lol @sp-house aswell as sp-here
Dont use the code below
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/house.png" alt="'.$txt['sp-forum']. '"/> ' . $txt['sp-house'],
hello,
i have some errors:
Guest
95.27.138.252
January 05, 2011, 05:56:45 PM
0c8325359183f79b038bceb7720fe977
Type of error: Undefined
http://www.vorbareti.ro/index.php?board=1.0
8: Undefined index: title
File: /home/apashi/vorbareti.ro/Themes/default/MessageIndex.template.php (body_above sub template - eval?)
Line: 413
Guest
95.27.138.252
January 05, 2011, 05:56:44 PM
0c8325359183f79b038bceb7720fe977
Type of error: Undefined
http://www.vorbareti.ro/index.php?board=1.0
8: Undefined index: href
File: /home/apashi/vorbareti.ro/Themes/default/MessageIndex.template.php (body_above sub template - eval?)
Line: 412
can you help me?
thanks!
Doesn't have to do anything with this mod unless you are on SMF 1.1. What is your SMF version?
SMF 2.0 RC4
Thanks to this mod...Simple and nice...
How do I activate it to work on my other themes... It's only working on my default theme..
My mods installed:
BBC [you]
PaypalDonations
Facebook Sharer Mod 1.0
Effectively Remove SMF Logo
Aeva Media
Menu Order
SimplePortal
Themes I want to use:
SMF Default Theme
DS-Natural
Silent Wave
great mod, thanks for making it
ynNoi,
If you are running 1.1.x, you will have to manually edit your additional themes.
This mod only works on 2.0
hmmm.... then, in 2.0, unless the themes are not using the menu array, it should automatically work on all themes.
I think those custom themes he/she want to use may not be using the menu from sources. It uses them from index.template instead.
oooohhhh... naughty themers
Quote from: Kindred on January 11, 2011, 12:47:23 PM
oooohhhh... naughty themers
yep, I use rc3 and my custom theme's menu is in the index.template.php ;)
I'm using SMF 2.0 RC4.
which part do you add code to,to add another icon next to a recently added mod ?
Quote from: kingkingston on January 13, 2011, 12:44:41 PM
which part do you add code to,to add another icon next to a recently added mod ?
see reply #1, ;)
Need some help, ive installed this MOD: http://custom.simplemachines.org/mods/index.php?mod=2657
Custom Buttons / tabs and menus, how do i change them to get icon to display?
Here is code for button 1 and sub button 1:
'custom1' => array(
'title' => !empty ($modSettings['label_custombuttons_1']) ? $modSettings['label_custombuttons_1'] : $txt['cb_default_1'],
'href' => !empty ($modSettings['url_custombuttons_1']) ? $modSettings['url_custombuttons_1'] : $scripturl,
'show' => $context['allow_custom_button1'] && !empty ($modSettings['enable_custombuttons_1']) ? true : false,
'sub_buttons' => array(
'subbutton1' => array(
'title' => !empty ($modSettings['label_subcustombuttons1_1']) ? $modSettings['label_subcustombuttons1_1'] : '',
'href' => !empty ($modSettings['url_subcustombuttons1_1']) ? $modSettings['url_subcustombuttons1_1'] : $scripturl,
'show' => !empty ($modSettings['label_subcustombuttons1_1']) ? true : false
),
I also have AEVA installed:
// Aeva Media changes
'media' => array(
'title' => (isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
'href' => $scripturl . '?action=media',
'show' => allowedTo('aeva_access'),
'sub_buttons' => !allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? array() : array(
'aeva_home' => array(
'title' => $txt['aeva_home'],
'href' => $scripturl . '?action=media',
'show' => true,
),
'aeva_unseen' => array(
'title' => $txt['aeva_unseen'],
'href' => $scripturl . '?action=media;sa=unseen',
'show' => true,
'is_last' => true,
),
),
),
Would be really nice if you could show me the correct code for this.
Greets
Kimmen
for the love of gods, why don't people even read the thread in which they post?
http://www.simplemachines.org/community/index.php?topic=413131.msg2888615#msg2888615
Quote from: Kindred on January 14, 2011, 07:22:49 PM
for the love of gods, why don't people even read the thread in which they post?
http://www.simplemachines.org/community/index.php?topic=413131.msg2888615#msg2888615
- Well, i have tested the thing you linked me to, and when i copy and paste your code, the link dissapair from main menu. I have put in the image, but it does not work for me :(
If it did not work then you miscopied or mispasted since that code is clean, right from my subs.php
I have tried as good as i can, copy single lines etc, but i cannot get your code to work. Maybe i am not doing it right ???
I will attach my subs.php file, maybe you can fix it.
Edit. I also need for TinyPortal. Ill take a summary.
Tinyportal
'tpadmin' => array(
'title' => 'TinyPortal',
'href' => $scripturl . '?action=tpadmin',
'show' => TPcheckAdminAreas(),
'sub_buttons' => array(
),
),
Aeva
// Aeva Media changes
'media' => array(
'title' => (isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
'href' => $scripturl . '?action=media',
'show' => allowedTo('aeva_access'),
'sub_buttons' => !allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? array() : array(
'aeva_home' => array(
'title' => $txt['aeva_home'],
'href' => $scripturl . '?action=media',
'show' => true,
),
'aeva_unseen' => array(
'title' => $txt['aeva_unseen'],
'href' => $scripturl . '?action=media;sa=unseen',
'show' => true,
'is_last' => true,
),
),
),
Custom Buttons / tabs and menus
'custom1' => array(
'title' => !empty ($modSettings['label_custombuttons_1']) ? $modSettings['label_custombuttons_1'] : $txt['cb_default_1'],
'href' => !empty ($modSettings['url_custombuttons_1']) ? $modSettings['url_custombuttons_1'] : $scripturl,
'show' => $context['allow_custom_button1'] && !empty ($modSettings['enable_custombuttons_1']) ? true : false,
'sub_buttons' => array(
'subbutton1' => array(
'title' => !empty ($modSettings['label_subcustombuttons1_1']) ? $modSettings['label_subcustombuttons1_1'] : '',
'href' => !empty ($modSettings['url_subcustombuttons1_1']) ? $modSettings['url_subcustombuttons1_1'] : $scripturl,
'show' => !empty ($modSettings['label_subcustombuttons1_1']) ? true : false
),
Still need help on this one.
Very nice mod, just installed it and it looks great!
Being a noodler I an noted a couple of things that you might want to consider for future updates.
1) In several places you have ' notice that space between the   and the single quote ... that causes the menu name to separate (word wrap) from the icon when you narrow the screen. Just removing that extra space will force the icon and the text to be a single item and stay together on a wrap.
2) With IE7 (yes I know but at least I did not say IE6 :) ) when you narrow the screen and end up with two lines of menu items, you get a broken div and end up with a white break across the screen. Not sure how to fix that but have not really looked at it either. Its fine in 8 and FF.
3) This is a great opportunity to use sprites instead of the images. Thats a lot of images and the overhead of making all those http calls to load a menu can be easily avoided. I actually just finished converting it to sprites for my site, and put in a bunch of extra images in to the sprite image so I would not have to edit it again. The subs.php markup is about the same and the rest is just a css. Just a thought for the future.
Thanks again for making this
hmmmm, Spuds... Can you explain further about the sprites?
Pretty much what the curve theme does with the quick buttons (themes->default->images->theme->quickbuttons.png
With sprites you are only loading a single image (well the way I did mine 2) and using css background position property to show just the icon you want. And the combined image file is smaller than the total of the individual.
The way this mod is currently you are going to make 20+ calls to load all the image files, with a sprite image it would be one. Its not really the size of the files thats an issue but the overhead of all those back and forth calls to the network, either to get the image or get a 304 header (file not changed) ... thats a lot of overhead that can be avoided and will help to make a site load faster.
can you share your updated code? Maybe if the code is in front of him, we can get the author (:P) to use it....
No problem, hope they can be of use ... here is the .xml file that I updated for use with my site, along with the two sprite images. Easy to add to a package should someone want to test.
Some important notes:
1) I tweaked the icons to be 14x14 vs 16x16 ... I like smaller menu icons :P
2) There are a quite a few 'extra' icons in the sprite, some from famfam, silk, and I think led, plus one from simpleportal, just easy to add them up front and be done so folks can tweak should they like.
3) I use aeva, simpleportal, smflinks, and bookmarks so there are lines in that xml file to make those edit since well this was for me :) If you don't use those expect it to toss and error that you can ignore
4) This version does not change the title tag but adds and img tag to the menus (suggested in this thread), that also means that it has to make a couple of theme edits to index.tempate. Basically just adds an 'if' so that if its see a menu item with a defined 'img' it will pump that out else the 'title'. I only did main and second menus, if you use a third level main menu ??? then you would have to make that edit in index.template
5) Also makes edits index.css to add in all of the position information for all those icons.
To use any particular icon set the class as class="menusprite menusprite_home" first class sets the basics the second one which icon to display, ie home icon. The css names are in left to right order of the sprite images for the curious.
One problem: what if the user likes to add a icon?
then update thw sprite image
Quote from: Kindred on January 30, 2011, 03:42:42 PM
then update thw sprite image
Yeah but not everybody knows how to do that (*looks at himself) :P
Then you use sprites for the default, and specify a normal image for everything else.
Quote from: Arantor on January 31, 2011, 12:41:02 PM
Then you use sprites for the default, and specify a normal image for everything else.
Yeah but lets say we are not able to do individual images because of......space issues.
then bloody well learn to update the sprite images.
You can't have it both ways.
my main menu has two icons only.. register and login.. and sub-menus have all the icons?
http://www.amigozone.com
Those are the only two "stock" (ie came with SMF) menu choices so they received the icons. All of the remaining menu choices are custom from your custom theme or other mods.
To add icons for the remaining menu picks you will need to 1) select an icon 2) manually add it yourself ... there are posts in this thread on how to do that.
See reply #1 ;)
i edited subs.php for my custom menu items.. everything is fine for all the buttons on menu.. but only sub-menus have icons.. main menu has only 2 icons.. for register and for login..
Won't install in RC5 -
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
emulate RC4
Quote from: Kindred on December 22, 2010, 09:38:39 AM
// Aeva Media changes
'media' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_gallery']. '"/> ' .(isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
'href' => $scripturl . '?action=media',
'show' => !empty($modSettings['aeva_enable_gallery']) && allowedTo('aeva_access'),
'sub_buttons' => !allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? array() : array(
'aeva_home' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_home']. '"/> ' .$txt['aeva_home'],
'href' => $scripturl . '?action=media',
'show' => true,
),
'aeva_unseen' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_unseen']. '"/> ' .$txt['aeva_unseen'],
'href' => $scripturl . '?action=media;sa=unseen',
'show' => true,
'is_last' => true,
),
),
),
// End Aeva Media changes
and I found a good gallery image using the fam fam fam silk icons...
thanks for this mod and all the support. when I apply the above changes the icon+text disappears from the menu!
btw, i use Arabic_utf8 default language. I checked the modification_arabic_utf8 in languages and the translation is correct.
this is my aeva section in subs
// Aeva Media changes
'media' => array(
'title' => (isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
'href' => $scripturl . '?action=media',
'show' => allowedTo('aeva_access'), 'sub_buttons' => !allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? array() : array(
'aeva_home' => array(
'title' => $txt['aeva_home'],
'href' => $scripturl . '?action=media',
'show' => true,
),
'aeva_unseen' => array(
'title' => $txt['aeva_unseen'],
'href' => $scripturl . '?action=media;sa=unseen',
'show' => true,
'is_last' => true,
),
),
),
// End Aeva Media changes
thanks in advance :)
one more question plz,
I also have a problem with adding an icon to simplePokes menu text ??! :(
I have installed this mod and I love it. Only problem is that I have added some mods that give you a tab and I have no image next to these. I have tried to put images next to it but intead it just pulls the next tab down underneath it. Can you help please as I do really like this mod and would be a shame to get rid of it. Thanks x
Quote from: swan on March 11, 2011, 12:15:50 PM
I have installed this mod and I love it. Only problem is that I have added some mods that give you a tab and I have no image next to these. I have tried to put images next to it but intead it just pulls the next tab down underneath it. Can you help please as I do really like this mod and would be a shame to get rid of it. Thanks x
checkout reply #1. It's about the same concept for mods that use tabs.
is there someone gonna help ??!
I gave you the exact code to use in subs.php
If it's not working, that is because you didn't put the code in correctly.
Quote from: bluedevil on March 11, 2011, 12:18:35 PM
Quote from: swan on March 11, 2011, 12:15:50 PM
I have installed this mod and I love it. Only problem is that I have added some mods that give you a tab and I have no image next to these. I have tried to put images next to it but intead it just pulls the next tab down underneath it. Can you help please as I do really like this mod and would be a shame to get rid of it. Thanks x
checkout reply #1. It's about the same concept for mods that use tabs.
Thank you very much for your help. I missed that post somehow. All sorted now x
Quote from: Kindred on March 11, 2011, 01:39:59 PM
I gave you the exact code to use in subs.php
If it's not working, that is because you didn't put the code in correctly.
No need to be rude and abrupt I didnt see the post!
Quote from: swan on March 12, 2011, 05:15:58 AM
No need to be rude and abrupt I didnt see the post!
No problem.
His reply wasnt to you. ;)
Oh :o ok sorry x
Hey BlueDevil!
I've started experimenting with sprites myself... it's pretty cool
http://www.simplemachines.org/community/index.php?topic=413131.msg2930754#msg2930754
one MAJOR thing that the sprites could do?
Load the entire fam fam fam icon set as a single image
set the 'img' value of the menu array rather than forcing the image into the actual title/text
use the CSS style to define the normal menu icons
However... since you have the entire icon set loaded... now adding an icon for additional menu objects means that I just have to tell the system what position to use rather than tracking down a new icon, uploading it to each theme, etc.
Also, it opens up an GREAT possibility of adding an admin interface
[sprite filename to use]
[--for each menu item--]
[define x,y position of sprite to use]
QuoteLoad the entire fam fam fam icon set as a single image
It's a great plan apart from two drawbacks when you get to having big images.
Firstly, mobile devices won't cache them (typical limit is 25KB on an image for caching) and secondly, every time that sprite is instanced on the page, even if you're only displaying part of it, the entire image is still used in memory, which means if you have a very large sprite set (e.g. the entire FamFamFam set) and display a number of them, you have multiple copies of that very large sprite hanging about.
But if you're careful you can save a lot of HTTP bandwidth by making only a single request instead of a dozen.
Correct me if I'm wrong as I'm tryin to understand how the sprite work.
Is the sprites just like the gfx image we use in curve?
http://css-tricks.com/css-sprites/
Yup, that's exactly it: you have a single large image which you're displaying parts of at one time, with the upshot being that it's a single image to be loaded, a single image to be cached. But make it too big and it won't be cached as well as it should, and it will add more weight to memory use for that browser - take a look at a browser running a default 1.1 Core install vs a default 2.0 Curve install, the exact images overhead in memory causes the browser (all of them, it should be noted) to use at least double the memory footprint.
On a desktop it might not be too important but on mobile platforms with limited memory, it can easily be an issue.
hi everyone,
how about the social groups menu icon
this is what I got in subs for sgroups
'sgroups' => array(
'title' => !empty($modSettings['sgroups_menu_title']) ? $modSettings['sgroups_menu_title'] : $txt['sgroups_text'],
'href' => $scripturl . '?action=sgroups',
'show' => allowedTo('sgroups_view'),
'sub_buttons' => array(
),
),
thanks in advance
find an icon that you like in the famfamsilk set and then add the image code into the array just like it was added for the other menu items.
thanks for the fast respond. although I am not that good, but I already tried that and it did not work
could u please write it for me, assuming that my image will be (groups)
thanks
ok this is what happened before
if i put it like this
'sgroups' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/groups.png" alt="'.$txt['sgroups']. '"/> ' . $txt['sgroups'],
'href' => $scripturl . '?action=sgroups',
'show' => allowedTo('sgroups_view'),
'sub_buttons' => array(
),
),
it gives me the image without any title
and if I put it like this
'sgroups' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/groups.png" alt="'.$txt['sgroups_text']. '"/> ' . $txt['sgroups_text'],
'href' => $scripturl . '?action=sgroups',
'show' => allowedTo('sgroups_view'),
'sub_buttons' => array(
),
),
it gives me an error
help plz
'title' => '<img align="absMiddle" src="' . $settings['images_url'] . '/menu_icons/groups.png" alt="' . $txt['sgroups_text'] . '"/> ' . !empty($modSettings['sgroups_menu_title']) ? $modSettings['sgroups_menu_title'] : $txt['sgroups_text'],
thanks for your support Kindred.
I tried the code but no changes at all. I made sure that the image is there.
See if this works
'sgroups' => array(
'title' => !empty($modSettings['sgroups_menu_title']) ? $modSettings['sgroups_menu_title'] : '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/groups.png" alt="'.$txt['sgroups_text']. '"/> ' $txt['sgroups_text'],
'href' => $scripturl . '?action=sgroups',
'show' => allowedTo('sgroups_view'),
'sub_buttons' => array(
),
),
error
/public_html/Sources/Subs.php on line 4321
which is the same line of tittle
Oh i did missed a "." out of that line, so try this 1
'sgroups' => array(
'title' =>!empty($modSettings['sgroups_menu_title']) ? $modSettings['sgroups_menu_title'] : '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/groups.png" alt="'.$txt['sgroups_text']. '"/> ' . $txt['sgroups_text'],
'href' => $scripturl . '?action=sgroups',
'show' => allowedTo('sgroups_view'),
'sub_buttons' => array(
),
),
or
'sgroups' => array(
'title' =>'<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/groups.png" alt="'.$txt['sgroups_text']. '"/> ' . !empty($modSettings['sgroups_menu_title']) ? $modSettings['sgroups_menu_title'] : $txt['sgroups_text'],
'href' => $scripturl . '?action=sgroups',
'show' => allowedTo('sgroups_view'),
'sub_buttons' => array(
),
),
Sorry I'm not an expert with this just having a bit of a guess
1 not change
2 with an error
:(
Sorry without installing the groups mod and this mod i can't test it to find a working combination, i'm sure someone will come along soon that can give you the right code
Quote from: MrGrumpy on April 06, 2011, 08:36:04 PM
Sorry without installing the groups mod and this mod i can't test it to find a working combination, i'm sure someone will come along soon that can give you the right code
thanks buddy.
really appreciate it
The code that I gave you is correct. Did you clear the cache after making the change?
Are you using a special custom theme?
no I am not. it is SM2 rc4 default theme
see circled in red.
how to fix it?
fix the code in subs.php, you are missing the <
here is the code but I do not know how to fix
'home' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/0.gif" alt="'.$txt['home']. '"/> ' . $txt['home'],
'href' => $modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
looks like this setting is wrong
$modSettings['sp_standalone_url']
The same :(
no, what I am saying that that the error is occurring in wherever that value is being set. Is that an admin setting for simplePortal?
it is in Forum Menu blok of simplePortal
you're still missing my point. :(
I would suggest checking with the simpleportal support... it looks like the setting for the home menu item is mis-set
:o ok , Thank you. ::)
Very nice mod. Can't wait to add this to two of my forums and to create an image for your MemberMap mod, too!
YOU DA MAN! 8)
@bluedevil
I truly hate asking this. I just read through the 7 pages and have added three icons to my menu.
1) I have one of your previous mods (Google Member Map) installed and it doesn't make any edits in the Subs.php file or the index.template.php. How do I go about putting an icon next to the words "Member Map"
2) I also have AEVA Media installed.
The original code for title has a lot more info in it then most of the other examples you gave.
'title' => (isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
I did get it to work by using the following and this is how I currently have it in my Subs
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/monitor.png" alt="'.$txt['aeva_gallery']. '"/> ' . $txt['aeva_gallery'],
But, I'm assuming I need to put the added code back in there. Every time I try to add it, I get a white page when I refresh the site. So, how do I incorporate the rest of the line which is:
: 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
If youre using my google member map and not Spuds', find this:
in Subs.php
Find:
// Google Maps Mod
'googlemap' => array(
'title' => $txt['googleMap'],
'href' => $scripturl . '?action=googlemap',
'show' => $modSettings['googleMapsEnable'] && allowedTo('googleMap_view'),
'sub_buttons' => array(
),
),
and replace with:
// Google Maps Mod
'googlemap' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/yourimage.png" alt="'.$txt['googleMap']. '"/> ' . $txt['googleMap'],
'href' => $scripturl . '?action=googlemap',
'show' => $modSettings['googleMapsEnable'] && allowedTo('googleMap_view'),
'sub_buttons' => array(
),
),
Make sure you replace 'yourimage.png' with yours.
I'm using Spuds most recent package. :(
Quote from: C4G-TK on June 23, 2011, 05:36:22 PM
I'm using Spuds most recent package. :(
You may want to ask him. I think he may be using hooks. I parsed the mod and i didnt see any edits in Subs.php
Yeah, there's no edits in Subs. I went ahead and posted in his thread to look over here. Thanks bluedevil!
OK, I have 4 out of 5 images done and this one is just stumping me.
According to Spuds, I need to go to sources/GoogleMap20Integration.php for the following:
$new_menu = array(
'googlemap' => array(
'title' => $txt['googleMap'],
'href' => $scripturl . '?action=googlemap',
'show' => !empty($modSettings['googleMapsEnable']) && allowedTo('googleMap_view'),
'sub_buttons' => array(),
)
);
I changed the 'title' line to the following
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/map.png" alt="'.$txt['googleMap']. '"/> ' . $txt['googleMap'],
saved, uploaded the file, copied over the previous version... and it isn't working.
I've cleared the forum cache and my browser cache and even did a hard refresh. I checked in the mennu icons folder for my image thinking that was the reason why it isn't showing up, but the image is there plain as day like the other 4 images I got to work. What am I doing wrong now?
This is my code from the file he said to use.
// Define the new menu item(s)
$new_menu = array(
'googlemap' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/map.png" alt="'.$txt['googleMap']. '"/> ' . $txt['googleMap'],
'href' => $scripturl . '?action=googlemap',
'show' => !empty($modSettings['googleMapsEnable']) && allowedTo('googleMap_view'),
'sub_buttons' => array(),
)
and from the pictures below you can see...
A) the image is in the folder
and B) the word Member Map is now shown twice
I obviously don't have the right code because I'm getting an error in the error log for that line saying:
http://www.respawnwilmington.com/index.php?action=admin;area=maintain;sa=routine;activity=cleancache
8: Undefined variable: settings
File: /home/respawnw/public_html/Sources/GoogleMap20Integration.php
declare $settings as a global in the mod function.
The code IS actually working, since you have the alt text displaying because it can't find the image
Quote from: Kindred on June 24, 2011, 07:42:18 AM
declare $settings as a global in the mod function.
The code IS actually working, since you have the alt text displaying because it can't find the image
Ok, so, I put $settings in this line and it worked.
global $txt, $scripturl, $modSettings, $settings;
Shows up fine now! Woohoo! Thanks, Kindred.
So, for adding
Google Member Map to Menu Icon do this:
in GoogleMap20Integration.php
find:
global $txt, $scripturl, $modSettings;
replace with:
global $txt, $scripturl, $modSettings, $settings;
find:
'title' => $txt['googleMap'],
replace with:
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/imagename.png" alt="'.$txt['googleMap']. '"/> ' . $txt['googleMap'],
remember to replace "imagename"
LOVE this.
However, since I also have the Aeva Media, the Google Member Map, and the Tag mods, some of the menu items (the ones corresponding to these mods) do not have their own little icon, so it looks slightly weird. But yes, totally awesome-looking. Gonna have to change the icons to match my theme though. No biggie.
Quote from: Jorge D. Fuentes on July 06, 2011, 02:20:46 PM
LOVE this.
However, since I also have the Aeva Media, the Google Member Map, and the Tag mods, some of the menu items (the ones corresponding to these mods) do not have their own little icon, so it looks slightly weird. But yes, totally awesome-looking. Gonna have to change the icons to match my theme though. No biggie.
I added what you need to do for the Google Member Map above. (with help from Kindred and Spuds)
Also, I have it working for AEVA, so if you need any help let me know. I normally check boards where I've posted.
Hello,
This is NOT sanctioned by the Mod author, it was discovered by trial and error.
ALWAYS remember to BACK-UP BEFORE MODIFYING your forum!
Here's what I did.
A) Find an icon you want to use
B) Back-up your forum
C) Go to your host's File Manager
D) Locate and open ..(your directory)/Sources/Subs.php
E) Highlight all and save to a text program (ie, MS Notepad, MS Word, Notepad++ (http://notepad-plus-plus.org/), etc.) "Subs-works-08-01-11( <--date ).php.
This is your safety net.
F) Use "Find" (usually "Ctrl+F") to locate the menu item "Help" (this gives you an example of how the code is written)
G) Highlight and then copy it to your computer's clipboard (see example of code below)
H) Paste it into a text program (ie, MS Notepad, MS Word, Notepad++, etc.)
--> The example does NOT have sub menus, I will not be including how to add icons to sub menu items. <--
I) Use "Find" to locate the menu item you want to add the icon to (ie, "Notepad", "My Bookmarks", etc.)
J) Copy the code you had previously gotten as an example.
K) Highlighted the code (see example of code "A" below)
L) Paste over what you had highlighted
M) Modify the name (ie [help] to [notepad] or [bookmarks] (see Code "B" below)
N) Modify the image source (path to the image) accordingly. (see Code "B" below)
O) Save the Subs.php
P) Upload the images to ..(your directory)/Themes/default/(name of image here)
Remember that the image is ONLY 16 pixels by 16 pixels AND is in the *.png format
NOTE: As I added Menu_Icons to all my themes, I uploaded to "all my themes".
You're done.
Enjoy
Remember, if it doesn't work, you can go back and upload "Subs-works-08-01-11( <--date ).php to ..(your directory)/Sources
Mod Author / bluedevil feel free to Delete / Modify / Sticky as you wish.
Be Well,
Cloud 8)
Code "A"
'help' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/help.png" alt="'.$txt['help']. '"/> ' . $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
Code "B"
'bookmarks' => array(
'title' =bookmarks> '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/bookmark.png" alt="'.$txt['help']. '"/> ' . $txt['bookmarks'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
thanks Cloud... and I don't intend any offense, but we've already given those same instructions 4 or 5 times in this thread....
Quote from: Kindred on August 01, 2011, 11:45:56 AM
thanks Cloud... and I don't intend any offense, but we've already given those same instructions 4 or 5 times in this thread....
None taken. :)
You are like a SMF God to me. ;D
Perhaps I used different wording that will "click" with some. :P
Wishing You The Best, ;)
Cloud 8)
lol. :laugh:
Looks good to me Cloud ;)
Quote from: bluedevil on August 01, 2011, 04:35:29 PM
Looks good to me Cloud ;)
Thanks bluedevil, :D
I tried to be thorough in my disclaimers. LOL :laugh:
thanks for the mod!
i installed it, ok...
i have Simple Portal and Menu Order.
I inserted the edit for SP
when i modify my subs.php, i can't see any icons in the primary menu, neither i can add to custom menu following your rules... :(
i see them only in sub menus!?! :(
i use italian language
can someone help me?
i attach the file...
thanks!!!
Quote from: C4G-TK on July 06, 2011, 02:44:40 PM
Quote from: Jorge D. Fuentes on July 06, 2011, 02:20:46 PM
LOVE this.
However, since I also have the Aeva Media, the Google Member Map, and the Tag mods, some of the menu items (the ones corresponding to these mods) do not have their own little icon, so it looks slightly weird. But yes, totally awesome-looking. Gonna have to change the icons to match my theme though. No biggie.
I added what you need to do for the Google Member Map above. (with help from Kindred and Spuds)
Also, I have it working for AEVA, so if you need any help let me know. I normally check boards where I've posted.
I'm interested to know how you got it to work for AEVA please :)
Quote from: Kindred on December 22, 2010, 09:38:39 AM
// Aeva Media changes
'media' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_gallery']. '"/> ' .(isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
'href' => $scripturl . '?action=media',
'show' => !empty($modSettings['aeva_enable_gallery']) && allowedTo('aeva_access'),
'sub_buttons' => !allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? array() : array(
'aeva_home' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_home']. '"/> ' .$txt['aeva_home'],
'href' => $scripturl . '?action=media',
'show' => true,
),
'aeva_unseen' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_unseen']. '"/> ' .$txt['aeva_unseen'],
'href' => $scripturl . '?action=media;sa=unseen',
'show' => true,
'is_last' => true,
),
),
),
// End Aeva Media changes
and I found a good gallery image using the fam fam fam silk icons...
Thanks Kindred, you da man :)
It would be cool if there was a way to mark posts that have work arounds/solutions somehow or have them kept in a sub forum.
you know...... there is a little "Search" box up there on the screen... you can search for key words within only a single thread....
Quote from: Kindred on September 06, 2011, 12:00:05 PM
you know...... there is a little "Search" box up there on the screen... you can search for key words within only a single thread....
Actually I forgot that was available on SMF and usually go through a thread page by page looking for stuff.
Hi
I was using 2.0.0 and installed "menu Icons", works great !!!! I updated to 2.0.1 and still works great !!!
The problem that I am having , is I cannot completely remove " Menu Icons ".....There is a theme that I would like to try, but I need to remove the menu icons first. And no matter what I do, I cannot remove this mod...
How do I do this without starting over again ?
Use the emulation feature under "advanced options" in the package manager
Does anyone get a zipped file when they download this mod? I don't....
Ron
To validate xhtml you must change all lines with
<img align="absMiddle"
to
<img style="vertical-align: middle"
SMF 2.0.3 with default theme curve
For some reason, I'd like to uninstall menu icons but,
even trying with emulation mods RC2 - 3 - 4 uninstall option is missing and package manager says "no uninstall section for this version of SMF"
Any clue what is wrong ?
Doing manual uninstall is really hard for me, I'm afraid I'll mass up subs.php which vital for the system.
Quote from: teos55 on January 03, 2013, 01:19:47 PM
SMF 2.0.3 with default theme curve
For some reason, I'd like to uninstall menu icons but,
even trying with emulation mods RC2 - 3 - 4 uninstall option is missing and package manager says "no uninstall section for this version of SMF"
Any clue what is wrong ?
Doing manual uninstall is really hard for me, I'm afraid I'll mass up subs.php which vital for the system.
Try SMF 2.0.3
Sorry for late reply, notification was not set properly by me :-)
First tried with 2.0.3 for sure -- negative
2.0.1 negative
2.0 worked.
Thanks ...
I'm relatively new to php and SMF, and I'm running into a few issues with adding new images for buttons.
I have Google Member Map (from Spud), SMF Gallery and SMF Links installed. I followed the directions listed
on page 1, and on page 7. I am able to get the images to show up, but I get a bunch of extra text in front of the images.
So, instead of having the default of Gallery Gallery, I see the following....
<img align= Gallery"title="myimage Gallery"/>myimage Gallery
......with myimage being the actual graphic I have chosen.
I added the $settings to global, and used the following for the $title....this was done in subs.php and GoogleMapIntegration.php in /Sources
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/smi/photo.png" alt="'.$txt['smfgallery_menu']. '"/> ' . $txt['smfgallery_menu'],
Any assistance that could be provided would be greatly appreciated. Thanks!
Quote from: Mick. on December 13, 2010, 05:21:32 PM
For those using mods like: gallery, arcade, etc..
Open:
/Sources/Subs.php
For SMF Gallery mod:
Find:
'title' => $txt['smfgallery_menu'],
Replace with:
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/yourimage.png" alt="'.$txt['smfgallery_menu']. '"/> ' . $txt['smfgallery_menu'],
[...]
Hi,
I'm using the Gallery mod and the changes I made doing very well.
I'm using the Google Member Map (http://custom.simplemachines.org/mods/index.php?mod=1010) mod too.
I'm not really familar with the internal structure of the SMF.
Could someone tell where to find the place to make this mod with the Menu Icons mod working?
I searched in the Subs.php but there is nothing.
Any help?
Jens
the main menu array is present in Subs.php, as indicated.
Adding additional images for mod-specific menu items would be done the same way that you quoted.... for each and every mod that adds itself to the main menu array.
The exception to that would be mods which use the menu hook to add themselves into the main menu rather than the direct code edits... in which case, you would need to ask in the support thread for that specific mod, to find out which file contains the insert menu item hook code.
Correct. The Google Member Map uses 'hooks' in which i dont know which file the button was added.
Quote from: Kindred on May 06, 2013, 03:20:56 PM
..... in which case, you would need to ask in the support thread for that specific mod, to find out which file contains the insert menu item hook code.
Thank you!
This helps me a lot to ask the right questions in the Google Member Map forum.
Cheers!
Jens
QuoteExecute Modification ./Sources/Subs.php Test failed
Replace ./Sources/Subs.php Test failed
Replace ./Sources/Subs.php Test failed
i am using smf 2.0.4
why doesn't anyone ever read the wiki/manual? Or even bother to use search?
http://wiki.simplemachines.org/smf/Error_in_mod_installation
Quote from: terrible on May 07, 2013, 01:25:02 PM
QuoteExecute Modification ./Sources/Subs.php Test failed
Replace ./Sources/Subs.php Test failed
Replace ./Sources/Subs.php Test failed
i am using smf 2.0.4
I recommend go to the mod page and use the parser. Chances are you modified the menu with another mod.
http://custom.simplemachines.org/mods/index.php?mod=2857
Hi.
Don't know if this thread still can be used, only one way to know... :)
I installed this mod on a SMF board 2.0.5 and Simple Portal 2.3.5 - no trouble and works perfect.
I would like to add a link/icon to a gallery outside the SMF, but still on the same domain (if this means anything).
Today SMF/portal at mydomain.com and the gallery at mydomain.com/gallery
If possible, can someone tell me what to do?
http://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0
WOW :laugh: that was fast. Thank you, Kindred.
But trouble is (for me and my knowledge) how to include both an icon and a link to "outside" the frum folder. I'm sure this is exremly easy for most people her, but unfortunately I'm not there now.
This is how it looks today:
$buttons = array(
'home' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/house.png" alt="'.$txt['home']. '"/> ' . $txt['home'],
'href' => $modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'forum' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/application.png" alt="'.$txt['sp-forum']. '"/> ' . $txt['sp-forum'],
'href' => $scripturl . ($modSettings['sp_portal_mode'] == 1 && empty($context['disable_sp']) ? '?action=forum' : ''),
'show' => in_array($modSettings['sp_portal_mode'], array(1, 3)) && empty($context['disable_sp']),
'sub_buttons' => array(
),
),
'help' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/help.png" alt="'.$txt['help']. '"/> ' . $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'search' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/magnifier.png" alt="'.$txt['search']. '"/> ' . $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/star.png" alt="'.$txt['admin']. '"/> ' . $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/joystick.png" alt="'.$txt['modSettings_title']. '"/> ' . $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
yes? That indicates how to include both....
you use the <img > tag in the title section and put the external link in the href section...
Thank you again, Kindred. Unfortunately I'm not able to figure out how to put in the URL. Image seems easy, but I understand I need to read myself up on how to use basic coding in order to manage this, I tried different things but ony result is white screen.
Anyway, I honestly thank you for trying to show me :)
'href' => 'http://yoururl.com',
Hi.
Great mod thanks but I have one question. I can see how to add icons to things like SMF Gallery, Contact etc but I am still running an older mod called 'Bakers Dozen Pages' which does not have similar code to change as the others. Is it possible someone could take a look at this and help me on how to put an icon in front of the "Pages" button.
What I have in Subs.php is here with the 'Pages' code in the middle..
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'pages' => array(
'title' => !empty($modSettings['dozen_pages_tab_label']) ? $modSettings['dozen_pages_tab_label'] : $txt['dozen_pages_tab_default'],
'href' => $scripturl . '?action=pages',
'show' => $user_info['is_guest'] ? !empty($modSettings['dozen_pages_enable_guest_access']) : !empty($modSettings['dozen_pages_enable_member_access']),
'sub_buttons' => array(
),
),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
I am running SMF 2.0.5 and Simple Portal 2.3.5.
Thanks in advance.
try this
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/PAGES.png" alt="'. !empty($modSettings['dozen_pages_tab_label']) ? $modSettings['dozen_pages_tab_label'] : $txt['dozen_pages_tab_default'] .'"/> ' . !empty($modSettings['dozen_pages_tab_label']) ? $modSettings['dozen_pages_tab_label'] : $txt['dozen_pages_tab_default'],
Actually that won't work properly due to the order of operator precedence.
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/PAGES.png" alt="'. (!empty($modSettings['dozen_pages_tab_label']) ? $modSettings['dozen_pages_tab_label'] : $txt['dozen_pages_tab_default']) .'"/> ' . (!empty($modSettings['dozen_pages_tab_label']) ? $modSettings['dozen_pages_tab_label'] : $txt['dozen_pages_tab_default']),
ah. thanks Arantor.
No worries; it's one of those things that trips a *lot* of people up haha
Wow, Kindred and Arantor, you are fast like a bolt's of lightning :)
I have yet to install the Icon mod as I was not sure if the Pages button would be a problem - Looks like it's worth a go now though. I will install after dinner and report back this UK evening.
Thanks for your help and fast replies.
Everything works perfectly, no errors, and my forum now looks nicer too. Thanks Kindred & Arantor for your editing help and thanks Mick for creating the mod 8).
Thanks for the mod Mick!
Hi,
I tried to install this mod, but nothing changed. I use also menu editor lite mod now, maybe it mess everything?
this will NOT work with the menu editor mod.
Quote from: Kindred on December 21, 2013, 07:02:40 AM
this will NOT work with the menu editor mod.
I uninstalled menu editor and then installed this mod. Everything messed up again.
Can you install it for me if I give right permissions for you? Or even check what is the problem..
Unfortunately, I do not have time to do it for you...
However, "Everything messed up" is not actually descriptive at all. Exactly WHAT "messed up"? How as it "messed up"?
Well, everything works now.
How I can add icons for my own special buttons?
[code] 'Special menu' => array(
'title' => 'Test',
'href' => 'http://www.testingtesting.com',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'Test1' => array(
'title' => 'Test1',
'href' => 'http://www.testing1.com',
'show' => $context['allow_admin'],
),
'Test2' => array(
'title' => 'Test2',
'href' => 'http://www.testing2.com',
'show' => $context['allow_admin'],
'is_last' => true,
),
),
[/code]
So now my titles are only one word 'Test'
and so on. How I rewrite this title line?
What is today's updates log? ???
Probably listing 2.0.15 compatibility since that's also marked as a change by the mod site and notifies people by default, even if the actual files haven't changed.
Quote from: pocttopus on July 28, 2018, 08:40:27 AM
What is today's updates log? ???
Quote from: Arantor on July 28, 2018, 08:43:49 AM
Probably listing 2.0.15 compatibility since that's also marked as a change by the mod site and notifies people by default, even if the actual files haven't changed.
Yup, no mod changes. Just ticking the slot for 2.0.15
Quote from: pocttopus on July 28, 2018, 08:40:27 AM
What is today's updates log? ???
Quote from: Arantor on July 28, 2018, 08:43:49 AM
Probably listing 2.0.15 compatibility since that's also marked as a change by the mod site and notifies people by default, even if the actual files haven't changed.
Also mentioned in the first post of this topic.
@Mick
Might be an idea to drop this bit from the First post in this topic, and the modsite, "COMPATIBLE WITH SMF 2.0.2"
Quote from: lurkalot on July 28, 2018, 08:56:57 AM
Also mentioned in the first post of this topic.
@Mick
Might be an idea to drop this bit from the First post in this topic, and the modsite, "COMPATIBLE WITH SMF 2.0.2"
Got it. :)
Hi all,
maybe I don't see the wood before the trees, but the menu icons don't show up on my board - SMF 2.0.15.
The directories are there:
./core/images/icons/menu_icons
./off/bootUs-orig/images/menu_icons
./off/theme1/images/menu_icons
./default/images/menu_icons
./bootUs-v1/images/menu_icons
The .png image files are there, too.
Code Modification in Subs.php has been done, e.g.
$buttons = array(
'home' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/house.png" alt="'.$txt['home']. '"/> ' . $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
Did I miss something important? Just to tick the "enable" switch somewhere?
Thank you for your help!
I'm also having issues with this mod but just on 1 site. it installed fine on 7 others without a hitch. This 1 site no matter what I chmod the folders to and I tried 755, 775 & 777 kept getting the error some files are not writable I went through the smf permissions I went through my file manager and then even through ftp to change permissions and no luck so decided to do a manual install so did all the required changes to subs.php from this list https://custom.simplemachines.org/mods/index.php?action=parse and now I have no images on the board but double names instead of the icons yet the menu_icons folder is uploaded with all the images.
Also checking my error log I have 21 pages of errors just from this install I made sure the log was empty before I started here is a screen of the error log. any help getting this 1 site fixed would be greatly appreciated as I really like the look of this mod on the other 7 sites it's installed on. all sites are using smf 2.0.15 including the one this error screen is from.
sorry for a double post but there was no modify to add to the post above. checking the error logs of the other sites after this mod was installed I have oodles of errors all in subs.php every site has the same error
8192: Function create_function() is deprecated
opening subs.php and checking the line numbers listed with all the erros on all the sites it's the same error but different line numbers. this is the line of code these errors are refering to
'validate' => create_function('&$tag, &$data, $disabled', '
so that means anywhere this line of code appears I get an error related to the line number this line of code appears on. I removed all the errors entries from the log and then re-logged the site and checked the error log it had generated 42 errors all the same just different line numbers all all in subs.php
What PHP version are you using? I guess 7.2?
SMF 2.0.15 is not suitable for 7.2, try switching back to PHP version 7.1
A search on this forum also helps... https://www.simplemachines.org/community/index.php?topic=562520.msg3991076#msg3991076