vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   How to add a Tab at Navigation bar? (https://vborg.vbsupport.ru/showthread.php?t=288486)

Christos Teriakis 09-30-2012 06:19 AM

How to add a Tab at Navigation bar?
 
Hello,

Does anybody know how I can add a new tab at navigation bar? eg beside of Home, Blogs, Groups I want to add a new tab "Classifieds".

Thank you
Chris

TheSupportForum 09-30-2012 06:29 AM

Quote:

Originally Posted by ChrisTERiS (Post 2369700)
Hello,

Does anybody know how I can add a new tab at navigation bar? eg beside of Home, Blogs, Groups I want to add a new tab "Classifieds".

Thank you
Chris

Turn Site Builder on then Click Navigation Bar

Christos Teriakis 09-30-2012 06:48 AM

Quote:

Originally Posted by simonhind (Post 2369702)
Turn Site Builder on then Click Navigation Bar

Thank you so much, but sorry as I was not clear in my post. I meants "programatically" and not as a manual entry. On vB4.2 even with manual entries you have the ability to assign a product, so it was easy to get the code by exporting the product file.

Chris

TheSupportForum 09-30-2012 07:20 AM

Quote:

Originally Posted by ChrisTERiS (Post 2369704)
Thank you so much, but sorry as I was not clear in my post. I meants "programatically" and not as a manual entry. On vB4.2 even with manual entries you have the ability to assign a product, so it was easy to get the code by exporting the product file.

Chris

i asume if you look at the examples in core/install there are a couple .xml file there that have the navigation setup example

nhawk 09-30-2012 12:53 PM

One of the nice things about vB 5 is that admins have the ability to control the way their site looks through the use of the modules (widgets). They can place things where THEY want them, not where a coder/developer thinks they should go. So, you're better off creating a widget to hold your content and let admins place it where they want it. Even if they must create a page to hold the widget.

If you go that route, you simply need to create the module (widget) and a widget template. Then code your API to handle the info displayed in the widget.

In cases where a page must be pre-defined and nothing can be moved around on that page you need to create a page, a page template, a page route, a system widget, a widget template and a widget instance ID. In your case you would also need to add to the headernavbar column of the site table. All of that needs to be done in the install code for the product. At this time, there is no way to add a navigation link or page via the XML itself. And at this time, the widget instance ID must be created in your API. I think I got eveything there. ;)

Christos Teriakis 09-30-2012 02:12 PM

Yes, I know it, that's why in all my vB4 addons I had a block generator so admins where able to build (almost) any type of blocks and/or widgets, and then add them in their pages. So I'm aware of this. But still believe that a main tab for holding the main listings is a must. Otherwise we're going back to vB3.7 by saying "Open template xxx and add after calendar.php this code".

Chris

nhawk 10-01-2012 10:11 AM

Then the last paragraph of my reply applies to what you want to do.

Christos Teriakis 10-17-2012 05:31 AM

Finally I was able to create Tab(s) using the product file. You can read my article at:
https://vborg.vbsupport.ru/showthread.php?t=289075

Omegatron 11-05-2012 01:58 PM

Adding the tabs is easy just like adding navbar tabs the part that is missing is how to enable that tab to be the highlighted one. Any ideas on that.

Christos Teriakis 11-05-2012 02:32 PM

Quote:

Originally Posted by Omegatron (Post 2378571)
Adding the tabs is easy just like adding navbar tabs the part that is missing is how to enable that tab to be the highlighted one. Any ideas on that.

In my article above I'm explaining how to add a tab automatically with a produc xml file. And believe me it was not so easy. As for highlighting it, check my dev site. The highlight works fine.
http://www.christeris.net/vb5/


All times are GMT. The time now is 06:16 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.01047 seconds
  • Memory Usage 1,738KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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