Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2012, 06:19 AM
Christos Teriakis Christos Teriakis is offline
 
Join Date: Jul 2011
Location: Thessaloniki, Greece
Posts: 1,228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 09-30-2012, 06:29 AM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChrisTERiS View Post
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
Reply With Quote
  #3  
Old 09-30-2012, 06:48 AM
Christos Teriakis Christos Teriakis is offline
 
Join Date: Jul 2011
Location: Thessaloniki, Greece
Posts: 1,228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by simonhind View Post
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
Reply With Quote
  #4  
Old 09-30-2012, 07:20 AM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChrisTERiS View Post
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
Reply With Quote
  #5  
Old 09-30-2012, 12:53 PM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 09-30-2012, 02:12 PM
Christos Teriakis Christos Teriakis is offline
 
Join Date: Jul 2011
Location: Thessaloniki, Greece
Posts: 1,228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 10-01-2012, 10:11 AM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then the last paragraph of my reply applies to what you want to do.
Reply With Quote
  #8  
Old 10-17-2012, 05:31 AM
Christos Teriakis Christos Teriakis is offline
 
Join Date: Jul 2011
Location: Thessaloniki, Greece
Posts: 1,228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 11-05-2012, 01:58 PM
Omegatron Omegatron is offline
 
Join Date: Feb 2003
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 11-05-2012, 02:32 PM
Christos Teriakis Christos Teriakis is offline
 
Join Date: Jul 2011
Location: Thessaloniki, Greece
Posts: 1,228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Omegatron View Post
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/
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:34 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.04121 seconds
  • Memory Usage 2,251KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete