News:

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

Main Menu

Menu Icons

Started by Mick., December 13, 2010, 05:13:55 PM

Previous topic - Next topic

Mick.

Fixed an Undefined error.  Zip updated.

@tesser, thank you for finding the bug.  Its all fixed now.

eyo

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?

tesser

Your welcome  and confirmed  its fixed  no errors made by it.

Mick.

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.


Mick.

A quick tut is added to Post #2.


Have fun ;)

teh_Krall

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?

Mick.

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.

Spoogs

with RC3 installed I simply emulate RC4 and it works just fine ;)

teh_Krall

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.

Mick.

New zip loaded to cover all  rc2, rc3, rc4 versions.  ;)

teh_Krall

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 :)

Mick.

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. ;)

Kindred

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']. '"/>&nbsp; ' . $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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Mick.

Excellent idea thanx Kindred.   I likey ;)

rajt

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']. '"/>&nbsp; ' . $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







Kindred


// Aeva Media changes
'media' => array(
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/gallery.png" alt="'.$txt['aeva_gallery']. '"/>&nbsp; ' .(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']. '"/>&nbsp; ' .$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']. '"/>&nbsp; ' .$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...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

rajt


tesser

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']. '"/>&nbsp; ' . $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 ??

Am'

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
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

Mick.

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.

Advertisement: