vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - Icons for UserCP Navigation 1.2 (https://vborg.vbsupport.ru/showthread.php?t=170558)

nascartr 01-09-2009 04:56 PM

Quote:

Originally Posted by Hugo Holbling (Post 1706243)
I've attached my usercp_shell template, which I edited similarly to this modification. It works for 3.8.0, tested today. You obviously need to have most of the famfamfam silk icons in a usercp_icons folder in images/misc for it to work and you may prefer to change the icons I chose for others.

I've done this with all my drop-down menus (see the attachments for an idea of what I mean), choosing icons I thought give an idea of what each option links to.

Do you mind sharing how you edited your drop down menus to show icons? Thanks!

VargTimmen 01-09-2009 05:23 PM

Could you fix it, that items, which aren't supported are still shown?

Hugo Holbling 01-09-2009 05:44 PM

Quote:

Originally Posted by nascartr (Post 1706519)
Do you mind sharing how you edited your drop down menus to show icons? Thanks!

Sure. The basic idea is to just add this code to every vbmenu_option you want to show an icon:

Code:

<img src="$stylevar[imgdir_misc]/usercp_icons/**image_goes_here**.png">&nbsp;
... where your image selection replaces "**image_goes_here**", obviously. For example, if you want to edit the Quick Links menu then edit the navbar template. The first item in the menu is "Today's Posts".

Find:

Code:

<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
Replace with:

Code:

<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><img src="$stylevar[imgdir_misc]/usercp_icons/page_white_copy.png">&nbsp;<a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
The bolded part is what was added and it has "page_white_copy.png" because that's the famfamfam silk icon I chose to represent "Today's Posts"; you might want to use something else. Obviously each of the icons you use has to be uploaded to images/misc/usercp_icons.

You repeat this for each instance and you can do this for literally every drop-down menu option, which is what I have for all of my navbar and for every other drop-down. I've attached an image of my search and PM drop-downs as other examples. It might be overkill for other people but I like how it looks. :)

One thing to note is that if you have any modifications that automatically insert menu options on your navbar or in the Quick Links menu then you need to add the icon code to those also. For example, if you have vB Blog and you opt for a link in your navbar, this is the blog_navbar_link template:

Code:

<tr>
        <td class="thead">$vbphrase[search_blogs]</td>
</tr>
<tr>
        <td class="vbmenu_option" title="nohilite">
                <form action="blog_search.php?$session[sessionurl]do=dosearch" method="post">
                        <input type="hidden" name="s" value="$session[sessionhash]" />
                        <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                        <input type="hidden" name="do" value="dosearch" />
                        <input type="hidden" name="quicksearch" value="1" />
                        <div><input type="text" class="bginput" name="text" size="25" tabindex="2003" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="2004" /></div>
                </form>
        </td>
</tr>
<if condition="$vboptions[vbblog_tagging]">
<tr>
        <td class="vbmenu_option"><a href="blog_tag.php$session[sessionurl_q]" rel="nofollow">$vbphrase[tag_search]</a></td>
</tr>
</if>
<tr>
        <td class="vbmenu_option"><a href="blog_search.php?$session[sessionhash]do=search">$vbphrase[advanced_search]</a></td>
</tr>

You can then add the icon code in two places so it then looks something like this:

Code:

<tr>
        <td class="thead">$vbphrase[search_blogs]</td>
</tr>
<tr>
        <td class="vbmenu_option" title="nohilite">
                <form action="blog_search.php?$session[sessionurl]do=dosearch" method="post">
                        <input type="hidden" name="s" value="$session[sessionhash]" />
                        <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                        <input type="hidden" name="do" value="dosearch" />
                        <input type="hidden" name="quicksearch" value="1" />
                        <div><input type="text" class="bginput" name="text" size="25" tabindex="2003" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="2004" /></div>
                </form>
        </td>
</tr>
<if condition="$vboptions[vbblog_tagging]">
<tr>
        <td class="vbmenu_option"><img src="$stylevar[imgdir_misc]/usercp_icons/tag.png">&nbsp;<a href="blog_tag.php$session[sessionurl_q]" rel="nofollow">$vbphrase[tag_search]</a></td>
</tr>
</if>
<tr>
        <td class="vbmenu_option"><img src="$stylevar[imgdir_misc]/usercp_icons/cog.png">&nbsp;<a href="blog_search.php?$session[sessionhash]do=search">$vbphrase[advanced_search]</a></td>
</tr>

Again, the bold part is what I added and you may prefer to use different icons.

If it would help, maybe I can put together all my edits and release them here or separately. I don't make any pretense of this code being good or optimal; it just works for me on a small forum. :)

nascartr 01-10-2009 06:36 PM

Thanks Hugo, I figured it out from that! http://diecastcrazy.com

Hugo Holbling 01-10-2009 07:01 PM

Nice job - looks great. :up:

Bawtneez 01-10-2009 11:09 PM

Installed. Thanks =]

AcidX 01-11-2009 01:01 AM

Waiting for a 3.8 version... :(

Hugo Holbling 01-11-2009 06:35 AM

There's a 3.8 version in my post no.229; you can change the icons as you see fit using the instructions I gave above.

Edit: I've attached the icons I use, along with an edited version of demgel's product file for vB 3.8.0; hopefully this will work. (Mods, please remove this if demgel objects.) There are more icons in the zip file than you need because when I get some time I'll try to add the template edits I use to add icons to all menus.

AcidX 01-11-2009 10:13 AM

Quote:

Originally Posted by Hugo Holbling (Post 1708296)
There's a 3.8 version in my post no.229; you can change the icons as you see fit using the instructions I gave above.

Edit: I've attached the icons I use, along with an edited version of demgel's product file for vB 3.8.0; hopefully this will work. (Mods, please remove this if demgel objects.) There are more icons in the zip file than you need because when I get some time I'll try to add the template edits I use to add icons to all menus.

Works perfectly!

It would be great if you (or the mod's owner) could post it in vBulletin's 3.8 add-ons forum.

For all those who were waiting for the 3.8 version, go ahead, install it. :)

Chimpie 01-13-2009 01:59 PM

I concur, Hugo's additions work nicely.

One request... Can we get icons for Projects: 'List Subscriptions' and 'Projects'?

Thanks!


All times are GMT. The time now is 03:41 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01294 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete