vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Forum Home Enhancements - UKBL ~ Quality Drop Down Menu System (https://vborg.vbsupport.ru/showthread.php?t=203521)

speedway 06-29-2010 01:05 PM

Quote:

Originally Posted by MagicThemeParks (Post 2060490)
Does anyone have step-by-step instructions on how to clean things up by having the javascript and CSS in separate files rather than all within the code in the template?

Don't exactly have step by step but I have successfully separated the CSS and js scripts out of the menu into files.

What resulted in my implementation was 2 css files and 5 .js files, each containing a section of the surrounding code. I had to load the external .js files in the same order as they were in the menu block given to us originally. I then called them in the headinclude template in the order I needed them:

Code:

<!-- Navbar Repplacement Files -->
<link rel="stylesheet" type="text/css" href="assets/css/cqm-menu.css" />
<link rel="stylesheet" type="text/css" href="assets/css/cqm-menuitems.css" />
<!-- Small section initialising the qmad object -->
<script type="text/javascript" src="assets/js/cqm-qmad.js"</script>
<!--  Menu 0 Add-On Settings -->
<script type="text/javascript" src="assets/js/cqm-aosetting.js"</script>
<!-- UKBL ~ Core Quality Menu Code -->
<script type="text/javascript" src="assets/js/cqm-menucode.js"</script>
<!-- Add-On Code: Rounded Sub Corners -->
<script type="text/javascript" src="assets/js/cqm-aorsubcnr.js"</script>
<!-- Add-On Code: Rounded Items -->
<script type="text/javascript" src="assets/js/cqm-aoritem.js"</script>

The names are of course my own naming convention to give me an idea of what is in each one.

I left the very last piece of .js code in the header template, haven't got as far as to try that in an external just yet.

I tested this with 3 browsers - Firefox 3.6.3, Safari 4.5 and Opera 10.10 on OSX Snow Leopard 10.6.3 and all browsers loaded fine and displayed the menu as "normal".

I would attach the files here if the author is OK with that otherwise just sort of follow what I did and you should be good to go.....


I did all this to see if I can replace the navbar sub-menu items in VB4 with this code so I can mimic my VB3 style in VB4

Cheers
Bruce

MagicThemeParks 06-30-2010 12:57 AM

The author has not been online much lately, but I'm sure he wouldn't mind :)

Can you please attach the files :up:

speedway 06-30-2010 01:03 AM

I may do soon... as soon as I work out an issue. It seems I touted Opera too soon.....

In Opera 10.x (OSX and Vista so far) the entire site header, including the navbar replacement menu, disappears. Zip, nada, nothing. Still trying to figure that one out. If I do, I will post what I can here for others,.....

Gamelobby 02-15-2011 07:16 AM

Quote:

Originally Posted by Bigj85 (Post 1800313)
Thanks for the centering tip :)
I now have it centered and used an extra <td> on each side to fill out the leftover space.
Looks even better now, here's a pic
MY MENU

Thanks UKB, great menu

Where do i put these <td>.. on each side of what.?

SBlueman 10-01-2011 09:23 PM

What do I need to remove from the code to get rid of the arrows?

Halfhidden 10-02-2011 03:30 PM

Nice mod

theparentpack 11-02-2011 10:52 AM

http://www.gimp.org it is a free program. Just download. Then open program. Once program is open click File. In the drop down menu click Open. Find image you want to change. Open it. Now click on Color tab/link. Click on Colorize in drop down menu. Adjust the three settings until you get the color you want. Save, and upload.

If you are trying to match a color on your site it might help to have a screenshot opened as a layer to compare your color change to. Just go to the page with the color you want to copy and click the Prt Scr button. Then go back to GIMP and click Edit, Paste As, New Layer. Now you have a side by side comparison for color matching.


Quote:

Originally Posted by linuxututs (Post 1901567)
I love this Hack / Mod as well !

But I'm worthless at graphics myself, and cannot seem to edit the images to get them to match my board.

Can anyone recommend a program to do this with for me ?

Thank You,


Morrus 11-14-2012 01:30 PM

Just a note - this isn't working in IE8 or earlier.

bada_bing 03-28-2013 02:46 AM

Can someone help me with that code I need to replace from my navbar template to remove the vb default menu so that I can use this one instead?

bada_bing 03-29-2013 02:01 AM

Quote:

Originally Posted by Halfhidden (Post 2005486)
Thanks for the reply.
Heres the code I've been working on to add the welcome block to the drop down menu
Code:

<if condition="$show['member']">
        <td class="alt2" nowrap="nowrap">
        <div class="smallfont">
                <strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
                <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>

                <if condition="$show['notifications']">
                        <div><span id="notifications"><a href="usercp.php$session[sessionurl_q]">$vbphrase[your_notifications]:</a> <strong>$notifications_total</strong></span></div>
                        <if condition="$show['popups']">
                                <script type="text/javascript"> vBmenu.register("notifications"); </script>
                        <else />
                                <script type="text/javascript" src="clientscript/vbulletin_notifications_nopopups.js?v=$vboptions[simpleversion]"></script>
                                <script type="text/javascript"> vBulletin.register_control("vB_Notifications_NoPopups", "notifications");  </script>
                        </if>
                <else /><if condition="$show['pmstats']">
                        <div><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></div>
                </if></if>

                <if condition="$show['pmwarning']"><div><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></div></if>
        </div>
        </td>
<else />
        <td class="alt2" nowrap="nowrap" style="padding:0px">
                <!-- login form -->
                <form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
                <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                <tr>
                        <td class="smallfont" style="white-space: nowrap;"><label for="navbar_username">$vbphrase[username]</label></td>
                        <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
                        <td class="smallfont" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
                </tr>
                <tr>
                        <td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
                        <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
                        <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
                </tr>
                </table>
                <input type="hidden" name="s" value="$session[sessionhash]" />
                <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                <input type="hidden" name="do" value="login" />
                <input type="hidden" name="vb_login_md5password" />
                <input type="hidden" name="vb_login_md5password_utf" />
                </form>
                <!-- / login form -->
</if>

Here's a screen shot of what my drop down looks like now and another showing the welcome block added but in the wrong place. I'm trying to add the welcome block to the end of the menu and have the welcome block within the menu as if it was part of the table or div.
Hope that's clear?
And thanks for your help so far.

Love your idea and tried your code and injected my menu code but when I do that the menu and login shows up correct but my forum area disappears? What am I removing thats causing this

bada_bing 03-29-2013 01:11 PM

1 Attachment(s)
I would like to replace my current navbar menu with this mod and need some guidance on what code to replace and where to inject the code for this menu. I have attached an image showing you my current navbar menu that I would like to replace.

bada_bing 03-29-2013 03:02 PM

Quote:

Originally Posted by UKBusinessLive (Post 1752634)
Hi PeterXP.

Your menu's look brilliant, but i'm suprised to see that you have a menu link to ModCP and AdminCP on view to guests and non registered :eek: if you leave them on show people will try and guess.

https://vborg.vbsupport.ru/external/2013/03/12.png


This can't be secure so you'll need to add a conditional around that menu link like this


Code:

<if condition="is_member_of($bbuserinfo, x, x, )">
where x and x is your usergroup ID for Amin and Mods

Don't forget to add the end statement at the end

Code:

</if>

Look below at the example

Code:

<li><span class="qmdivider qmdividery" ></span></li>
        <li><a class="qmparent" href="javascript:void(0)">PRIVATE MESSAGES</a>

                <ul style="width:165px;">
<if condition="is_member_of($bbuserinfo, x, x, )">
                <li><a href="http://www.ukbusinesslive.co.uk/forum/Admincp.php" title="List Messages">AdminCP</a></li>
                <li><a href="http://www.ukbusinesslive.co.uk/forum/Modcp.php?do=newpm" title="Send New Message">ModCP</a></li>
</if>
                <li><a href="http://www.ukbusinesslive.co.uk/forum/private.php?do=trackpm" title="Track Messages">Track Messages</a></li>
                <li><a href="http://www.ukbusinesslive.co.uk/forum/private.php?do=editfolders" title="Edit Folders">Edit Folders</a></li>
                </ul></li>

Once again a smashing improvement, Well done

Thanks for the tips I have added your suggestions and works great, I however wanted to completely hide the Control Panel from showing up in the menu unless you are logged in with a specific user group, sorta what you explained for the link themselves but this time A step higher. Can you explain how to do this?

Also does anyone know how to add the Logout feature in the menu?

bada_bing 03-29-2013 07:06 PM

Quote:

Originally Posted by Sador (Post 1895893)
I have no idea whether this works or not, but the standard vbulletin logout code seems to be this:

Code:

                <if condition="$show['member']">
                        <td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>
                </if>

Maybe if you were to add this?

(Again, no idea if it works, save before trying, you might accidentally destroy your forum or even the whole world with this ;) )

This does not work, or if so I placed it incorrectly in my navbar template. When I add it and I try and login my site it right after the login process it goes to a white page with an error 500 when I remove this code services are restored.

Anyone know how to add the logout to the menu ?

bada_bing 03-29-2013 07:22 PM

Quote:

Originally Posted by crazymilk (Post 1895543)
This works a treat for loging out But what about once you?ve log out it chances to loging how what that be done?

And thanks ArnyVee for the log out code

Where and how do I add this to the menu code when I add this below and I acutally logout it screws us my tempate format and the normal vb "not a member yet" message no loger displays on the bottom of my navbar but rather vertically and messing up the template

HTML Code:

<if condition="$show['member']">
<li><span class="qmdivider qmdividery" ></span></li>
                <li><a class="qmparent" href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]">LOG OUT</a></if>


m7sen 09-05-2018 01:01 PM

I want to replace navbar to this
but is it responsive ?


All times are GMT. The time now is 01:30 PM.

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.01569 seconds
  • Memory Usage 1,808KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_html_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)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