|
Condition and vbnavbar for 1.4.11
|
|
12-28-2008, 04:12 PM
(This post was last modified: 02-11-2010 12:10 AM by flick.)
Post: #1
|
|||
|
|||
|
Condition and vbnavbar for 1.4.11
For those wondering what this is, this code modification allows your MyBB forum to have a vBulletin-style feature, drop down navigation, for both the search box and the User CP.
The original plugin - Conditional and vb navbar for 1.20 - was released by Lapsetur and all I have done here is to tidy it up and tweak it a little so that it looks and works fine for MyBB 1.4.4+. In other words, the actual code released by Lapsetur that drives the plugin *still* works in MyBB 1.4.4+. The only difference is the additional modifications to bring it up to date - display wise and link edits - for MyBB 1.4.4+. Files that you need
You can find all the files at the end of this post, but this is what you need to do with them:
The next step is to edit the template of your theme. I have used the default theme for my example, but hopefully it should work with other themes as well. Replace the contents of each template with the code below: Header Templates / header Code: <script language="Javascript" type="text/javascript">Header Templates / header_welcomeblock_guest Code: <a href="{$mybb->settings['bburl']}/member.php?action=register"><strong>{$lang->welcome_register}</strong></a>Header Templates / header_welcomeblock_member Code: <a href="usercp.php" id="usercp" onclick="return openMenu(this)" class="popup_button">User CP<img src="images/popup_down.gif" border="0" /></a>Header Templates / header_welcomeblock_member_admin Code: <td class="tcat" align="center"><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php"><strong>{$lang->welcome_admin}</strong></a></td>Header Templates / header_welcomeblock_member_moderator Code: <td class="tcat" align="center"><a href="{$mybb->settings['bburl']}/modcp.php"><strong>{$lang->welcome_modcp}</strong></a></td>Ungrouped Templates / headerinclude Code: <link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />Forum Bit Templates / forumbit_depth2_forum Code: <tr>Navigation Templates / nav Code: <div class="navigation">Navigation Templates / nav_sep Code: >Navigation Templates / nav_sep_active Code: <br /><img style="vertical-align:bottom;" src="$theme[imgdir]/nav_end.gif" />The next step is to create a new .css file to add to your theme. Quote:Click on Themes->Name of your theme, e.g. Default->Add Stylesheet vbnavbar.css Code: /* Popup Menus */Any corrections are welcome so please let me know if this works or doesn't work for you. Some screenshots of the code modification in action can be seen below: Guest view: Admin view: ![]() Admin/Member CP view: ![]() Admin/Member Search view: ![]() Condition and vbnavbar live samples Screenshots and links to sites that use this code modification on their forums. Thanks to okitai for his permission to allow us to feature his forum here! ![]() Admin: okitai Forum URL: http://www.ithelp.co.il/forum/ Comments: okitai has actually extended the functionality of the code modification by adding icons for each item in the navigation menu and customising the sub-menus as well, which you can read about here. ------------------------ CHANGELOG Jan 7th 2009: Minor corrections to vbnavbar.css and headerinclude (Details in post #19) March 26th 2009: Minor correction to header (Details in post #50) April 26th 2009: New functions.php for MyBB 1.4.5 (Details in post #59) July 1st 2009: New functions.php and class_templates.php uploaded for MyBB 1.4.8. Existing users do not need to change to this new version. December 10th 2009: New functions.php uploaded for MyBB 1.4.10. ------------------------ Known Bugs New users using IE7 (and IE6) trying to register on the Forums may experience a Passwords must match error. This is because these versions of the browser are unable to handle two sets of password boxes on the same page: one set from the registration section, and the other from this code modification. Current known solutions are to: 1. Set up 'send random password instead of allowing users to create their own password 2. Ask new users to type the password into the topright login password box as well. ------------------------ FAQs Q: Guests can see the 'Private messages' menu option although there is a random {1} and {2} instead of any actual values? A: Please ensure that you download class_templates.php below and replace this file with the one in your /inc folder (clearer instructions in Step 1) The specific difference between the standard MyBB and the download below can be found in this post. Q: How can I change the background colour of my logo header to [insert name of colour]? A: By default, the template edits above sets the default background colour to white, so if you would like to change this (like indigored) to something else, please look for this line Code: <div class="logo" style="background:#fff url('$theme[imgdir]/logobg.gif');">An example can be found here Q: How can I change the font or text colour of my User CP dropdown menu to [insert name of colour]? A: The text colour is inherited from the class tcat so to override this, you will need to add a few extra lines to vbnav.css. This question came about as a user had a white font against their white background (you can find the original reply here) and the necessary change was as follows: Code: td.tcat td.menu_row a:link,Current motto: Cross referencing threads by providing links is a good idea! Back-on Online - Back-on Fansite http://www.backon-online.com/ WordPress Snippets http://www.wpsnippets.com/ |
|||
|
12-28-2008, 07:55 PM
Post: #2
|
|||
|
|||
|
RE: Condition and vbnavbar for 1.4.4
Nice mod, thank you and happy new year
[]s, Claudio Petition: Distinction between "Premium" and "Free" Plugin & Themes Thread Releases |
|||
|
12-29-2008, 09:03 AM
(This post was last modified: 12-29-2008 10:01 AM by okitai.)
Post: #3
|
|||
|
|||
|
RE: Condition and vbnavbar for 1.4.4
Loved it. Worked on getting it to work on my forum up to the, very, early, hours of the morning.
It does work, but: 1) your code is missing (in many places) '{' or '{}' and some other stuff (everything can be found, pretty, easily). 2) All the butty of the code (tabs and sections) are lost using copy&paste from here. 3) this code doesn't "know" how to "make itself" theme friendly if your not using the MyBB default theme. If you used "tborder" and "thead" insted of "tcat" it would have been easier. 4) everyone that use this code has to understand that if you've installed plugins that put themselves in the index (or the other parts of the template cod here), they have to find this parts and copy them into the correct place at this code. 5) the UserCP/AdminCP/ModeratorCP menu cannot use MyBB arguments (like: {$lang->marked}) instead of the text for some reason. I wanted the code to be easily transferable to other languages (some caused the menu to be shown without any text at all and other where not shown as themselves). Hope this helps, Ori... P.S. Sorry for the bad English, My Hebrew is better. Of two equivalent theories or explanations, all other things being equal, the simpler one is to be preferred. simplified translation of Occam's razor |
|||
|
12-29-2008, 09:35 PM
Post: #4
|
|||
|
|||
|
RE: Condition and vbnavbar for 1.4.4
When new updates are avaible, the files that you change should be also updated.
|
|||
|
12-29-2008, 11:39 PM
(This post was last modified: 12-29-2008 11:57 PM by flick.)
Post: #5
|
|||
|
|||
RE: Condition and vbnavbar for 1.4.4
(12-28-2008 07:55 PM)aglioeolio Wrote: Nice mod, thank you and happy new year Thanks for the kind words, aglioeolio. A very happy new year to you too! ![]() (12-29-2008 09:03 AM)okitai Wrote: Loved it. Worked on getting it to work on my forum up to the, very, early, hours of the morning. This is great feedback actually, really thanks a tonne okitai I find this sort of commentary very helpful!1) I would be grateful if you wouldn't mind being a little more specific as to any missing { or {} brackets. What I had done was essentially copy what I had working on my own installation to each code part, so I could easily have missed out something important! 2) For the 'butty' do you mean the tabbed-space or spacing? If so, from a quick test that I've done (using Firefox 2.0.x) the code seems to copy across with the existing spacing from the forum post to the MyBB template editor. Please could you kindly elaborate on what method you're using here? ![]() 3) I have to admit "tcat" is something brought over/inherited from the original plugin, but I had assumed (without doing any research) that this was still a commonly used table class in newer themes. I did add in a new table class tvbnav which ultimately styles the vbnav menu as after trying out thead and tborder, neither of them seemed to have the style I had in mind. Perhaps I should have pointed this out more clearly. Any further thoughts? ^^ 4) Hmm... by this I think you mean plugins that automatically insert themselves into the index page? As far as I am aware, no changes have been made to the index page templates, so I am a little confused. Please could you let me know which plugin you were testing with this? I have tested this out just using Online Today plugin which was originally released by ethernet and brought up to date by Samuel and it seems to be automatically inserting itself just fine. ![]() 5) This is something that I vaguely picked up on as well whilst editing the file and thought that it was something I was doing wrong; you are right that it should be {$lang->language} so that it can be used with any language pack, and I was intending to do this when updating the original modification, but I am clearly missing a step somewhere so will continue to look out for a solution. Thanks for highlighting it though, sometimes it's just so easy to forget that MyBB *is* a very international community, esp. having been away for so long, so apologies for the moment. (12-29-2008 09:35 PM)adigec Wrote: When new updates are avaible, the files that you change should be also updated. This is very true! Quite often one gets the 'Template needs to be reverted' message with new MyBB updates. Am not too sure what MyBB 1.5 will bring (or 1.6?) but hopefully the rest of the 1.4.x releases won't have any drastic template changes. I will continue to keep functions.php and class_templates.php as up to date as possible though. Current motto: Cross referencing threads by providing links is a good idea! Back-on Online - Back-on Fansite http://www.backon-online.com/ WordPress Snippets http://www.wpsnippets.com/ |
|||
|
12-29-2008, 11:54 PM
Post: #6
|
|||
|
|||
|
RE: Condition and vbnavbar for 1.4.4
I'm thinking of doing a copy&paste from the code I have now (with some changes and corrections) and attaching it to my next post. You are invited to my forum: http://www.ithelp.co.il/forum . Although its in Hebrew, I'm sure you'll understand what I changed and how it works.
If you want to view the forum with a user (for the user menu), use: tempuser and password: 12345 (its a regular user). Ori... Of two equivalent theories or explanations, all other things being equal, the simpler one is to be preferred. simplified translation of Occam's razor |
|||
|
12-30-2008, 12:01 AM
(This post was last modified: 12-30-2008 12:02 AM by flick.)
Post: #7
|
|||
|
|||
|
RE: Condition and vbnavbar for 1.4.4
Looks good!
I see you've added some icons to the menu as well - very nice! I would have loved to do it for the drop-down User CP part (never thought of it for the actual navigation menu!) but couldn't get it to work properly without extra edits.Looking forward to seeing your changes ![]() p/s: I tried to login to your site initially using the "ברוך הבא, אורח" login box, but it gave me this error: Quote:SQL Error: p/s2: Would you mind me taking a screenshot to share with others? Current motto: Cross referencing threads by providing links is a good idea! Back-on Online - Back-on Fansite http://www.backon-online.com/ WordPress Snippets http://www.wpsnippets.com/ |
|||
|
12-30-2008, 12:27 AM
(This post was last modified: 12-30-2008 12:33 AM by okitai.)
Post: #8
|
|||
|
|||
|
RE: Condition and vbnavbar for 1.4.4
First: as for your request to take a picture - no problem, you can go ahead. I do sugest clicking on the forum that ends with "(Pocket PC)" - the site map works after some tinkering.
Second: thanks for telling me about the error. It seems that the sidebox plugin that I have doesn't know how to work with the changed SQL database in 1.4.4 version. I'll try to fix it (or download labrocca's one from his site). Ori... P.S. (no. 1) I changed the help so it pops up a window (so you can look at it with the site - not insted of it). I know it doesn't show anything - I have a problem with all functions using 'misc.php'. P.S. (no. 2) As you saw, I added a menu that will (in the near future) have a few links in it. for now I keep it as a "place keeper". Of two equivalent theories or explanations, all other things being equal, the simpler one is to be preferred. simplified translation of Occam's razor |
|||
|
01-01-2009, 03:49 AM
Post: #9
|
|||
|
|||
|
RE: Condition and vbnavbar for 1.4.4
Thanks okitai!
I will be sure to do a nice screen shot first thing on New Year's Day!Please do keep us all posted about your progress. It would be nice if new features could be built into this code modification. ![]() p/s: Happy new year for 2009 everyone! p/s2: Will also take a look at the Help part that you mentioned in your post. Current motto: Cross referencing threads by providing links is a good idea! Back-on Online - Back-on Fansite http://www.backon-online.com/ WordPress Snippets http://www.wpsnippets.com/ |
|||
|
01-01-2009, 10:37 AM
Post: #10
|
|||
|
|||
|
RE: Condition and vbnavbar for 1.4.4
This is lucky for me. I just got my forum back up and running. I had to change a lot as the system got "funny" some times. This is probbly do to the too many plugins I had.
Ori... Of two equivalent theories or explanations, all other things being equal, the simpler one is to be preferred. simplified translation of Occam's razor |
|||
|
« Next Oldest | Next Newest »
|
Search
Member List
Calendar
Help

![[Image: vbnavbar_guest.jpg]](http://www.backon-online.com/mybb/vbnavbar_guest.jpg)
![[Image: vbnavbar_admin.jpg]](http://www.backon-online.com/mybb/vbnavbar_admin.jpg)
![[Image: vbnavbar_member_cp.jpg]](http://www.backon-online.com/mybb/vbnavbar_member_cp.jpg)
![[Image: vbnavbar_member_search.jpg]](http://www.backon-online.com/mybb/vbnavbar_member_search.jpg)
![[Image: ithelp.jpg]](http://e.imagehost.org/t/0988/ithelp.jpg)



![[Image: untitled13tu.jpg]](http://img130.imageshack.us/img130/7599/untitled13tu.jpg)
![[Image: vbnavbar_onlinetoday.jpg]](http://e.imagehost.org/t/0523/vbnavbar_onlinetoday.jpg)
I see you've added some icons to the menu as well - very nice! I would have loved to do it for the drop-down User CP part (never thought of it for the actual navigation menu!) but couldn't get it to work properly without extra edits.