View Full Version : Add-On Releases - CES Navbits Designer
thincom2000
01-03-2007, 10:00 PM
CES Navbits Designer
Version: 1.4.3
*** NEWS ***
3/17/2007 - v1.4.3 released
2/25/2007 - v1.4.2 released
2/3/2007 - v1.4.0, v1.4.1 released
2/2/2007 - v1.3.0 released
1/24/2007 - v1.2.3 released
1/15/2007 - v1.2.0, v1.2.1, v1.2.2 released, screenshots updated
1/7/2007 - v1.1.0 completed - withheld due to inefficient processing
1/5/2007 - v1.0.1, 1.0.2, 1.0.3 released, screenshots added
1/4/2007 - v1.0.0 released - Custom Navbits launched
Known Issues:
- If you are a vbWiki Pro user, and you are getting a "Style has not been updated for Custom Navbits" message in your wiki, see this post: #21
What It Does:
Using a wizard in the AdminCP, allows admins to create a breadcrumb path for the vBulletin navbar that could be practically anything. This is useful for automating navbits on custom pages or anywhere else.
For example: After searching for threads or posts, vBulletin's default lastelement is always "Search Results." However, using this mod, I have been able to change it to "Search Results in Threads" and "Search Results in Posts" respectively.
Products to Install: 1
Plugins Included: 1
Files to Upload: 5
Templates to Edit: 1
Files to Edit: 2
Queries Added:* 0
*This now adds ZERO queries to modified pages, which I figure is the query count we all care about.
Mod Features:
- Add navbits for any page in the AdminCP
- Now makes use of the datastore
- Settings in vBulletin Options
- Supports relative and absolute links
- Breadcrumb can use any custom text
- Name your various custom navbit sets
- Use conditionals for further control
- Set execute priority of navbit sets with overlapping conditions
- Navbits immediately updated
- use FORUM_HOME, THIS_PAGE, WIKI_NAME as preset variables
- supports $vboptions, $vbphrase, other variables, and HTML
- Complete support for vbWiki Pro
How many more features can we add to a navbits extension? :)
Current Syntax:
As of v1.2.0, just fill in the form!
When using $vbulletin options or $vbphrases, do not use quotes inside the brackets:
BAD: $vbulletin->options['option']
GOOD: $vbulletin->options[option]
Tutorials:
- Introduction to creating custom navbits: Basic Tutorial
- How to exclude a parent forum from multiple subforums at once: Parentlist Tutorial
Changelog:
As of Version 1.4.3:
- fixed a warning that would occur in the AdminCP when no custom sets
had been created
As of Version 1.4.2:
- updated product dependency
As of Version 1.4.1:
- fixed a bug where the last element would be empty if script had a
custom set and the conditions returned false
- updated phrases
- fixed bug where table ces_navbits would not be removed from the
database on upgrade
Ideas for Future Versions:
- Suggestions?
Screenshots:
In order, these screenshots show the process:
1. Before Navbits Management
2. AdminCP Link
3. AdminCP Navbits Manager
4. AdminCP Navbits Designer (pre v1.4.1)
5. After Navbits Management
blacklancer
01-04-2007, 08:30 PM
*waits for screen shots*
sounds interesting!
Hornstar
01-05-2007, 01:46 AM
well hopefully you will post it by today, because otherwise a mod will delete this as its againt the rules.
You dont need to make a thread like this, there is another way to do what you were probably trying to do. (forgot the name of the option in the product manager)
thincom2000
01-05-2007, 02:14 AM
Yeah, I needed the threadid to put in the product. Also taking a little longer than expected to debug. As usual.
Dismounted
01-05-2007, 05:18 AM
You can use misc.php?producthelp=PRODUCTID to link to the release thread. Much easier.
FleaBag
01-05-2007, 11:37 PM
I really do not understand what this does. :(
thincom2000
01-06-2007, 12:41 AM
It basically provides a manager and designer to change the way navbits are displayed on a page.
For example, I first realized I wanted a mod like this when I installed vbJournal just to handle my site's news. On the news page I didn't want the word "Journals" in the navbits, but it was there.
It's also useful if you have coded your own custom pages. I wrote about 15 of them, where some were TOC, or they had obvious page hierarchies, and I wanted navbits to appear on them and to keep track of this. My navbar template ended up becoming a huge mess of conditionals that eventually took weeks to debug when the navbar stopped working.
Using the interface provided in this mod is not much different than defining the navbits directly in the code (which is a simple task now that I understand how construct_navbits() works). But it sure is a lot more pleasant and MUCH less time consuming to open up a manager in the ACP than searching through the source code to modify navbits entries one by one.
thincom2000
01-09-2007, 05:45 PM
Sorry to double post in my own thread, but I have a question to those few who are actually using this mod. And also the instructions to get it working if you didn't read the readme.
As I'm working on the much more efficient v1.2.0, I think it's possible to have the installer/another page do all the file edits automatically, but is it that unfair to ask people to open the vBulletin PHP files in their FTP clients, search for the lines:
$navbits = construct_navbits($navbits);
or in vbJournal's journal.php:
$navbits= construct_navbits($navbits);
(I hope that's the only addon that doesn't use spaces appropriately)
Would it even be wise to have automated file edits add:
($hook = vBulletinHook::fetch_hook('Navbits_Process')) ? eval($hook) : false;
before those lines? It seems to me that manual edits would be safer, that way if the code gets mangled you sort of know what changed. But I have seen people groaning over 1 measly file edit in other threads.
Does anyone have any thoughts?
Tamrin
01-11-2007, 09:08 PM
Small question, I read the readme.txt file included with this, and it has a header with:
** FILE EDITS **
Probably a lot. If you want any custom navbits to appear
you must do the following in each PHP file you want
affected by the hack --
Now I'd love to edit our navbits as your plugin allows, but I'm afraid it's going to screw with future forum upgrades due to manual hacks in vBulletin's PHP files.., or am I wrong here ?
thincom2000
01-12-2007, 05:21 AM
It's not going to really screw with future upgrades. The changes the hack makes will be overwritten when you upgrade to a newer version of vBulletin, and the modifications made have no known negative side-effects on vBulletin functionality. All we're doing is adding a single line of code here and there, not removing anything at all. <-- I believe that answers your question.
If your issue is not wanting to make file edits again when you upgrade your vBulletin software, read on. Most vBulletin updates are small, and you don't have to overwrite every file every time.
Many hacks may require you to make file edits. The upside of the Product Management system is that after a forum upgrade you can check your products and see which have file edits you may need to do again.
The edit for this isn't a big one, and with a quick Edit -> Find in your FTP client, it really shouldn't take too long to make the changes. The template edits required take into account the case of an upgrade where the new hook is overwritten from your edits, so that your navbits won't be mysteriously broken. Instead, the hack will just be non-functional until you re-edit your files.
thincom2000
01-19-2007, 01:25 AM
Has anyone tried using this to extend their navbits in vbWiki Pro?
I haven't had a chance to use it myself (writing and testing and overwriting, thus clearing my navbits table over and over), so I'm curious as to how well it works especially with that software.
I also haven't been able to test the set displaytitle feature. I know MediaWiki versions 1.7.1+ have this built in, but this feature was added to the navbits for people who were stuck using 1.6.8 (e.g. myself). Since I reduced the file edits for the last big release, I didn't think to test this feature. Does it still work?
Please someone try it and let me know. My test site is being annoying again with its 404 errors. There's a possibility it will work without it but if it doesn't it should be a quick fix (just adding a single array value).
Terminatoronly
01-19-2007, 11:39 AM
cool i was waiting for this mod really its the best thanks for the release :D
Installed & Nominated
thincom2000
01-19-2007, 03:18 PM
Glad I'm not the only one who saw the use in it. :)
djjeffa
01-19-2007, 11:40 PM
im a lil confused?
so basicly you could add or removing things from the nav bar on eack page?
if I am right would this work for difrent forums if chosen?
thincom2000
01-20-2007, 03:23 AM
Yes, you are adding and removing things from the navbar. Technically they are called navbits or breadcrumbs, which I try to use in my explanations so people don't get confused and think I am talking about the entire navbar template.
if I am right would this work for difrent forums if chosen?
This allows you to edit the breadcrumbs, and could work for anything (different forums, whatever) if you use the advanced options like Global Variables and Conditions.
Terminatoronly
01-25-2007, 08:12 AM
thanks for making the hack mate but i have a problem i dont know how to use the navbits managment thingy i dont know what shall i set into it please give me some examples i dont know how to use it and i find it useful
thincom2000
01-25-2007, 09:20 PM
Script Title tells the hack what PHP script to modify navbits in. If you're not sure what this is, open the file and look for the line that starts
define('THIS_SCRIPT' ...
The definition of THIS_SCRIPT is what you fill in here.
Label is essentially a filename. The hack uses this to tell your various navbits apart if you make more than one.
First Element is the forum level of your navbits. Usually your navbits starts with the name of your board - this is where you can change that.
Last Element is the final navbit usually defined as $navbits[lastelement]. This is where you can that.
There are two columns for URLs and text. Type your links into the URL column, and type the text for those links into the Text column. The boxes between First Element and Last Element are for all the navbits in between, just put each one on its own line.
Global Variables is for including variables that you might want to include in your conditions below it. Global Variables must be defined somewhere else in the script with the Script Title you are modifying.
Conditions is for entering an argument that would be in a PHP conditional or <if condition="..."> This is useful if you only want to display the customized navbits on a page when certain conditions are met.
For example:
I want to make the navbits for the search results page say "Search Results in Posts" if we have searched for posts instead of threads. By default, the search results page would say the following no matter what:
Forum > Search Forums
Search Results
What we do in the Navbits Designer to make it say "Search Results in Posts" ONLY if we have searched for posts:
Script Title: search
Label: Search Posts
First Element URL: FORUM_HOME
First Element text: FORUM_HOME
URL: $vboptions[bburl]/search.php
text: Search Forums
Last Element URL: THIS_PAGE
Last Element text: Search Results in Posts
Global Variables: $search
Conditions: ($search['showposts'] == true) AND ($_REQUEST['do'] == 'showresults')
will return:
Forum > Search Forums
Search Results in Posts
Hope that helps!
Terminatoronly
01-28-2007, 06:39 AM
cool thanks alot i will try it :D
thincom2000
01-31-2007, 05:05 AM
I'm working on version 1.3.0 now which uses the datastore and thus requires no extra queries on runtime. (The tradeoff with eliminating queries I have found to usually be additional file edits). Navbits are pre-sorted in init_startup to eliminate the memory issues I was worried about with users who used this heavily.
The new version should be ready by the weekend.
thincom2000
02-03-2007, 09:07 PM
Went from Version 1.3.0 to Version 1.4.0 in two days. Enjoy the new features and the zero-query-ness.
thincom2000
02-19-2007, 08:58 PM
vbWiki Pro does not properly get the global variables $first_navbit, $bitters, and $last_navbit
As a result, if you try to modify navbits for a wiki article, you will get a "This style has not been updated for Custom Navbits" error, even though you have made the correct updates. In order to workaround this strangeness, vbWiki Pro users should add the following plugin (this requires vbWiki Pro hooks which is why I am not including this in the product).
Product: CES Navbits Designer
Hookname: vbwikipro_before_navbits
Title: Navbits Globals
Phpcode:
global $first_navbit, $final_navbit, $bitters;
RedGTiVR6
02-25-2007, 04:37 PM
I've tried installing this mod on our forums and I'm getting an error that it needs 3.6.4 to run. We're currently running 3.6.3.
I noticed in the description that it' listed as just needing 3.6.0.
Perhaps I'm doing something wrong?
thincom2000
02-25-2007, 06:42 PM
You can edit the product file in Notepad, and change the product dependency to match your installation. I'll update the product posted here, thanks.
RedGTiVR6
02-25-2007, 11:18 PM
sweet!
that did it.
Thanks...
*clicks installed* and rates!
RedGTiVR6
02-26-2007, 01:24 PM
Invalid argument supplied for foreach() in /admincp/navbits_designer.php on line 273
Any ideas?
Installed and edited code and templates. When I go to the AdminCP pannel for the NavBits, this is above it.
This is like 273:
foreach ($ces_navbits AS $navers)
RedGTiVR6
02-26-2007, 01:33 PM
Script Title tells the hack what PHP script to modify navbits in. If you're not sure what this is, open the file and look for the line that starts
define('THIS_SCRIPT' ...
The definition of THIS_SCRIPT is what you fill in here.
Pardon my ignorance...but I don't understand this statement. Where do I look to find this? In the .xml file? In one of the uploaded files? In a template? And what does it do?
thincom2000
02-26-2007, 03:57 PM
It's in vBulletin's PHP files. For example, on SHOWTHREAD (showthread.php), the line would be:
define('THIS_SCRIPT', 'showthread');
In search.php:
define('THIS_SCRIPT', 'search');
In FORUMHOME, or index.php:
define('THIS_SCRIPT', 'index');
Unless you have them memorized (or for files added by hacks), you have to check the file for the THIS_SCRIPT definition, otherwise this hack won't know what page to change the navbits on.
Souli
03-01-2007, 01:52 AM
thx4share
click install and nominate :up:
my navbar:
FORUM_HOME > Forum1 > Forum2 > Forum3 > THIS_PAGE
I need in a specific subforum for all included subs:
Forum2 > Forum3 > THIS_PAGE
is it possible ?
the NAVKEYS (3-4) function doesn?t work :confused:
thincom2000
03-01-2007, 02:25 AM
the NAVKEYS (3-4) function doesn?t work
Don't use parentheses. The readme just shows ( ) to indicate that part is optional.
I need in a specific subforum for all included subs:
Forum2 > Forum3 > THIS_PAGE
is it possible ?
This was not possible until Version 1.4.0. If you are running 1.4.x or later,
I have done what you ask with the following:
Script Title: forumdisplay
First URL: FORUM_HOME
URLs: NAVKEYS 3-4
- In this case, Forum Home > Forum1 would be NAVKEYS 1-2
Final URL: THIS_PAGE
First Text: FORUM_HOME
Text: NAVBITS
Final Text: THIS_PAGE
Globals: $foruminfo, $subforum_is_parent
Condition: ($foruminfo['forumid'] == SUBFORUM_ID) OR $subforum_is_parent
In order for this to work you need to create a plugin to get the current forum's parentlist, and perform a check that will set $subforum_is_parent
Hook Location: forumdisplay_start
Plugin Code: global $subforum_is_parent;
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
$subforum_is_parent = ($forumID == SUBFORUM_ID) ? true : $subforum_is_parent;
}
Note that additional $subforums can easily be added to this check by creating additional variables in the global statement, and by duplicating the line $subforum_is_parent = ($forumID == SUBFORUM_ID) ? true : $subforum_is_parent;
Souli
03-01-2007, 02:40 AM
thank you!
works without any problems :up:
thincom2000
03-01-2007, 04:04 AM
You're welcome. I will add a link in the first post to this tutorial in case someone else wants to do this in the future.
thincom2000
03-01-2007, 04:17 AM
Invalid argument supplied for foreach() in /admincp/navbits_designer.php on line 273
This is like 273:
foreach ($ces_navbits AS $navers)
Sounds like a bug that occurs when zero custom navbits exist (which would usually be the first time you use the script, after which the error would disappear). This does not affect functionality, it's just an annoying message. If you can confirm this behavior disappeared for you once you designed your first navbits, I will include a bug fix shortly; otherwise, it may be something else.
thincom2000
03-17-2007, 04:39 PM
Posted the fix for the bug mentioned above.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.