vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Dynamic Navbarlinks (https://vborg.vbsupport.ru/showthread.php?t=228166)

Coroner 11-16-2009 10:00 PM

Dynamic Navbarlinks
 
1 Attachment(s)
Idea by Ragtek
I only added support for dhtml menu and side selection.

What does it do:
Over your vBulletin Optionen you can create links for the navbar (single or dhtml) without changing any template (you can not use phrases).

Installation:
1st upload the php - then simply import the product.
After import 3 new links were created (the example from image no.2).

Requirements:
2 template_hooks:

$template_hook[navbar_start] (in vB 3.8 it's called: navbar_buttons_right)
$template_hook[navbar_end] (in vB 3.8 it's called: navbar_buttons_left)

If one of these HOOKs missing, the links could not be shown.

(Tested on vB4 Beta 3)

---

[28.11.2009]
Upgrade to version v1.5.
What's new ?
Usergrouppermissions and template_hooks.

You can leave the "old" structure. This will have no effect on the navbar. But ... if you like add to a line or menue:
|2,3,4|navbar_start

This little example means, that the link or menue is only visible for the primary usergroups 2,3 and 4. The Template Hook we're using is "navbar_start".
If you leave the usergroup(s) blank, permission for ALL groups are given.

Some words again:
If you are using a template_hook, the side isn't in use. If you leave the template_hook blank, default hook is "navbar_start" or "navbar_end" depended on the "side". Hook's are in Beta Stage. Normaly, it won't work with CMS.
If you really need it, change the Hook Location from "global_setup_complete" to "global_bootstrap_init_complete". Remember: With this location you can't use phrases.

Alibass 11-17-2009 04:34 AM

Great work, thanks for doing this so quickly. This is going to make things a lot easier on the navbar. :)

Tagged for a later install.

yilmaz 11-17-2009 05:23 AM

nice work

Billspaintball 11-17-2009 05:40 AM

This looks interesting.
Tagging for later use :)

ragtek 11-17-2009 06:13 AM

thx 4 releasing:)

Bounce 11-17-2009 03:00 PM

Possible to have it usergroup based? So that only a certain usergroup can see a certain link/dropdown?

rtyagis 11-17-2009 03:11 PM

Great work, thanks! :up:

Coroner 11-17-2009 03:15 PM

Not in this version. I've planing another version especially for the vB4 that you can use the "new navbar menu" in a certain Mod. This means, I've creating menues for the forum, blog, cms or ....
Therefor I can try to implement a usergroupbit for it.

But ... this is future talk.

Bounce 11-17-2009 03:41 PM

Quote:

Originally Posted by Coroner (Post 1915964)
Not in this version. I've planing another version especially for the vB4 that you can use the "new navbar menu" in a certain Mod. This means, I've creating menues for the forum, blog, cms or ....
Therefor I can try to implement a usergroupbit for it.

But ... this is future talk.

ok mate, nice add on, will prob use it for something :)

abdobasha2004 11-17-2009 04:21 PM

thanks
reserved
I think this can be done by just template edits ?

Coroner 11-17-2009 05:24 PM

Quote:

Originally Posted by abdobasha2004 (Post 1916001)
thanks
reserved
I think this can be done by just template edits ?

Yes, of course. But in vB 3.8 it isn't easy.

tafreeh 11-17-2009 10:28 PM

Quote:

Originally Posted by Coroner (Post 1915964)
Not in this version. I've planing another version especially for the vB4 that you can use the "new navbar menu" in a certain Mod. This means, I've creating menues for the forum, blog, cms or ....
Therefor I can try to implement a usergroupbit for it.

But ... this is future talk.

Thanks man, great work.. I will be waiting for the upgraded version ...

J226126F1A8D 11-19-2009 03:14 AM

Thanks for your hard work. It is greatly appreciated. I will be installing this tomorrow night for sure. Thanks again.

Jason

AzzidReign 11-19-2009 03:18 AM

I installed an older version of this...I believe it was for 3.6. This is a GREAT addon!

shadowedsoul 11-19-2009 06:54 PM

Quote:

Originally Posted by abdobasha2004 (Post 1916001)
thanks
reserved
I think this can be done by just template edits ?

Yeah it can be done with just template edits...I actually like the way Lynne came up with that uses a plugin since I can easily add some php code to test for usergroups then.

This is a really nice addon though :)

Veer 11-19-2009 07:24 PM

Quote:

Originally Posted by Coroner (Post 1915964)
Not in this version. I've planing another version especially for the vB4 that you can use the "new navbar menu" in a certain Mod. This means, I've creating menues for the forum, blog, cms or ....
Therefor I can try to implement a usergroupbit for it.

But ... this is future talk.

Sounds good, I will wait for that version :)

garretbyrne 11-19-2009 10:16 PM

I'm sorry but I've installed the plugin but now what? How do I edit them or arrange them.. Sorry not the brightest lately, lol..

Cheers

Coroner 11-20-2009 04:23 AM

See in:
AdminCP - vBulletinOptions - Dynamic Navbar
There you will find an example.

I finished the next version (include usergroup permissions and template hook). It will come in a few days.

halkum 11-20-2009 08:33 PM

When is vbulletin going to do this internally.

THANK YOU!

The Coon 11-21-2009 08:47 AM

Quote:

Originally Posted by Coroner (Post 1917542)
I finished the next version (include usergroup permissions and template hook). It will come in a few days.

Great! Thx in advance!

Veer 11-21-2009 10:49 AM

Quote:

Originally Posted by Coroner (Post 1917542)
See in:
AdminCP - vBulletinOptions - Dynamic Navbar
There you will find an example.

I finished the next version (include usergroup permissions and template hook). It will come in a few days.

Sounds good

LoveStream 11-22-2009 02:46 PM

감사합니다. Thank you. I added it too. :)

SuperGLS 11-29-2009 03:45 PM

Great mod. Can't wait to test it out once vB4 is gold. Thanks!

franzis 11-29-2009 09:04 PM

Hello Coroner,

what makes the new version, especially the possibility of new data template hook?

Do you also have a German Spachpaket?

LG Franzis

Coroner 11-30-2009 04:09 AM

With the "template_hook" you can say, that this links (or menu) is especially for the blog, ...., .... or ... or ... or. If you leave it blank, it's always for the forum (navbar_start / navbar_end).

Do you need a translation ?

The Coon 11-30-2009 09:33 AM

At first thank you! ;)

Could you please post an example with usergroup permissions?
I tried this and it does not work:

9|0|7|3|misc.php?do=page&template=Wohnorte|Wohnort e|0|0|2,6

( 2 = Registered Users; 6 = Administrators )

The links are visible (and working) always.

Another Question:
Is it possible, to embed the function (target="_blank") in the future?

THX! Great Addon and nominated! :)

Coroner 11-30-2009 12:03 PM

This is an extended example of the installed "test" LINK (line one).

For usergroups: 4 & 5
PHP Code:

1|0|0|1|test.php|Test 1|1|0|0|4,5

For all usergroups:
PHP Code:

1|0|0|1|test.php|Test 1|1|0|0|| 

or
PHP Code:

1|0|0|1|test.php|Test 1|1|0|

embeding (target="_blank"):
Yes, no problem.

franzis 11-30-2009 01:28 PM

Quote:

Originally Posted by Coroner (Post 1922883)
With the "template_hook" you can say, that this links (or menu) is especially for the blog, ...., .... or ... or ... or. If you leave it blank, it's always for the forum (navbar_start / navbar_end).

Do you need a translation ?

Ja, please, perhaps at http://www.vbulletin-germany.org would certainly welcome a lot.

And thanks for the explanation because of the hooks, I have understood it.

nominated!

LG Franzis

Coroner 11-30-2009 01:55 PM

Original:
Quote:

<phrase name="setting_dynamic_navbar_desc" date="" username="Coroner"><![CDATA[
Enter a link in each line: <b>ID|DHTML|Sub|Sort|URL|Name|Side|Phrase|Usergrou pids|Hook</b><br /><ul>
<li>ID: INT this ID must be unique</li>
<li>DHTML: INT 0 = normal / 1 = is DHTML</li>
<li>Sub: STR (ID) this means when it's a DHTML menue, the ID is the ID of the main link</li>
<li>Sort: INT a unique number inside each menu</li>
<li>URL: STR the link within</li>
<li>Name: STR name of the link</li>
<li>Side: INT 0 = left / 1 = right</li>
<li>Phrase: INT 0 = Text / 1 = Phrase</li>
<li>Usergroup: STR seperate primary Usergroupids by comma (leave blank for all)</li>
<li>Hook: STR </li>
</ul>]]></phrase>
Translated in german:
Quote:

<phrase name="setting_dynamic_navbar_desc" date="" username="Coroner"><![CDATA[
Gebe einen Link pro Zeile ein: <b>ID|DHTML|Sub|Sort|URL|Name|Side|Phrase|Usergrou pids|Hook</b><br /><ul>
<li>ID: INT diese ID muss einmalig sein</li>
<li>DHTML: INT 0 = normal / 1 = ist DHTML</li>
<li>Sub: STR (ID) gemeint ist: wenn es ein DHTML Men? ist, dann ist die ID die ID von dem Ursprung Link</li>
<li>Sort: INT eine einmalige Nummer innerhalb des Men?</li>
<li>URL: STR der Link selber</li>
<li>Name: STR Name des Links</li>
<li>Side: INT 0 = links / 1 = rechts</li>
<li>Phrase: INT 0 = Text / 1 = Phrase</li>
<li>Usergroup: STR trenne die prim?ren Benutzergruppen mit einem Komma (leer lassen f?r alle)</li>
<li>Hook: STR der Hook der benutzt werden soll (navbar_start/navbar_end ist Standard</li>
</ul>]]></phrase>

The Coon 11-30-2009 02:33 PM

Okay, I got it now! :rolleyes: Works fine!

Quote:

Originally Posted by Coroner (Post 1922994)

embeding (target="_blank"):
Yes, no problem.

:up: So it will become one of my Essentials, I guess!
Great!

LoveStream 11-30-2009 03:22 PM

Quote:

Originally Posted by Coroner (Post 1922883)
With the "template_hook" you can say, that this links (or menu) is especially for the blog, ...., .... or ... or ... or. If you leave it blank, it's always for the forum (navbar_start / navbar_end).

Do you need a translation ?

Thank you for update.

Do you mean that if template_hook STR were define, this would be show on the Navtab?

Will you show the example of template_hook?

:)

franzis 11-30-2009 04:33 PM

Thank you Coroner, works beautifully.

Do you want the finished German file?

LG Franzis

Coroner 11-30-2009 06:58 PM

Quote:

Originally Posted by franzis (Post 1923101)
Thank you Coroner, works beautifully.

Do you want the finished German file?

LG Franzis

No, not really *smile* It's only in the AdminCP and my it's english

Coroner 11-30-2009 07:08 PM

Quote:

Originally Posted by LoveStream (Post 1923064)
Thank you for update.

Do you mean that if template_hook STR were define, this would be show on the Navtab?

Will you show the example of template_hook?

:)

Ok - same example as before.

orginal (template_hook = navbar_end):
PHP Code:

1|0|0|1|test.php|Test 1|1|0|

with template_hook:
PHP Code:

1|0|0|1|test.php|Test 1|1|0|0||vbcms_navbar_start 

For CMS you have to change the hook_location to: global_bootstrap_init_complete

And remember: This function is in beta stage.

LoveStream 12-01-2009 04:45 AM

Quote:

Originally Posted by Coroner (Post 1923175)
Ok - same example as before.

orginal (template_hook = navbar_end):
PHP Code:

1|0|0|1|test.php|Test 1|1|0|

with template_hook:
PHP Code:

1|0|0|1|test.php|Test 1|1|0|0||vbcms_navbar_start 

For CMS you have to change the hook_location to: global_bootstrap_init_complete

And remember: This function is in beta stage.

Well, however under vbcms_navbar_start with global_bootstrap_init_complete, the alignment to where side is not effected.

I hope this menu product could be cover up the Nav Tab Menu System with it's subordinate template. Excellent! ;)

Coroner 12-01-2009 11:21 AM

Quote:

Originally Posted by LoveStream (Post 1923357)
Well, however under vbcms_navbar_start with global_bootstrap_init_complete, the alignment to where side is not effected.

See the 1st post.
Quote:

Some words again:
If you are using a template_hook, the side isn't in use. If you leave the template_hook blank, default hook is "navbar_start" or "navbar_end" depended on the "side". Hook's are in Beta Stage. Normaly, it won't work with CMS.
If you really need it, change the Hook Location from "global_setup_complete" to "global_bootstrap_init_complete". Remember: With this location you can't use phrases.

franzis 12-03-2009 08:27 AM

1 Attachment(s)
Hello Coroner,

I have a problem, according to my settings I see 2 identical links;)
I use this code:
Code:

1|0|0|1|arcade.php|Spielhalle|1|0|0 (or 1|0|0|1|arcade.php|Spielhalle|1|0)
6|0|0|1|forumdisplay.php?f=142|LdG|1|0|0
2|1|0|1||SHG's|1|0|0
3|0|2|2|forumdisplay.php?f=13|SHG-Sucht|1|0|0
4|0|2|3|forumdisplay.php?f=12|SHG-DeBoSvv|1|0|0
5|0|2|4|forumdisplay.php?f=120|SHG-MB|1|0|0

And then comes:
Attachment 107114

What is wrong?

LG Franzis

Coroner 12-03-2009 11:16 AM

Quote:

Originally Posted by franzis (Post 1924584)
Code:

1|0|0|1|arcade.php|Spielhalle|1|0|0 (or 1|0|0|1|arcade.php|Spielhalle|1|0)

Have you tried:
Code:

1|0|0|1|arcade.php|Spielhalle|1|0|0
I don't know, why you insert or 1|0|0|1|arcade.php|Spielhalle|1|0) ? But I think, that's a mistake by copying.

MertTurk 12-03-2009 12:27 PM

god

Coroner 12-03-2009 12:31 PM

I've tested you're 1st example and ... yes, you're right. I've got 2 "spielhalle" links.

Try this one:
Code:

1|0|0|1|arcade.php|Spielhalle|1|0|0
2|1|0|1||SHG's|1|0|0
3|0|2|2|forumdisplay.php?f=13|SHG-Sucht|1|0|0
4|0|2|3|forumdisplay.php?f=12|SHG-DeBoSvv|1|0|0
5|0|2|4|forumdisplay.php?f=120|SHG-MB|1|0|0
6|0|0|1|forumdisplay.php?f=142|LdG|1|0|0



All times are GMT. The time now is 01:40 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.01854 seconds
  • Memory Usage 1,854KB
  • 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
  • (4)bbcode_code_printable
  • (7)bbcode_php_printable
  • (18)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
  • (40)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