vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create a New Tab in the navbar (with template) (https://vborg.vbsupport.ru/showthread.php?t=228313)

ndL 11-30-2009 04:10 PM

Quote:

Originally Posted by Lynne (Post 1922503)
Reread part 2 of the article:

sorry, but i did everything the same as explained, but the tab doesnt become "selected" when its opened.

would be great if you add a sample of your test.php, because ive searched everywhere and didnt come accross with it

ragtek 11-30-2009 04:16 PM

Quote:

Originally Posted by ndL (Post 1921747)
please post "news.php" content, because i cant find how to make a selectednavtab, did what you have said, but it still doesnt work!

in news.php i have
PHP Code:

define(ragteknewstrue); 

what is very important but i think that it could be solves without
template:
PHP Code:

<template name="ragtek_news_navbar" templatetype="template" date="1258595041" username="ragtek" version="1.0.0">
- <![
CDATA[ <vb:if condition="$vboptions['selectednavtab'] == 'ragteknews'">
<
li class="selected">
    <
class="navtab" href="news.php{vb:raw session.sessionurl_q}">{vb:rawphrase ragtek_news}</a>
<
ul class="floatcontainer">
<
li><a href="#">#</a></li>
</ul>
</
li>
<
vb:else />
<
li><class="navtab" href="news.php{vb:raw session.sessionurl_q}">{vb:rawphrase ragtek_news}</a></li>
</
vb:if>
  ]]> 
  </
template

plugin at hook process_templates_complete
PHP Code:

if (defined('ragteknews'))
{
    
$vbulletin->options['selectednavtab'] = 'ragteknews';
}
$template_hook['navtab_middle'] .= vB_Template::create('ragtek_news_navbar')->render(); 


Adem GEN? 11-30-2009 08:30 PM

Quote:

Originally Posted by ragtek (Post 1923091)
in news.php i have
PHP Code:

define(ragteknewstrue); 


Thank you very much
Now okay


Regards

ndL 12-05-2009 06:33 PM

Thanks, this is what i needed.

define(ragteknews, true);

you must include this in your how-to

ragtek 12-05-2009 07:34 PM

i've updated the article

DesignWerks 12-11-2009 01:45 AM

Still tinkering around with this. Is it possible to define the selectednavtab for a CMS page to use with this method? For example if my news.php page was part of the CMS such as http://www.mydomain.com/content.php?5-news where would I define define(news, true); ?

Code:

<vb:if condition="$vboptions['selectednavtab'] == 'news'">
or is there a different condition I could use based on the "5-news" perhaps...

ragtek 12-11-2009 03:07 AM

Quote:

Originally Posted by DesignWerks (Post 1928639)
Still tinkering around with this. Is it possible to define the selectednavtab for a CMS page to use with this method? For example if my news.php page was part of the CMS such as http://www.mydomain.com/content.php?5-news where would I define define(news, true); ?

Code:

<vb:if condition="$vboptions['selectednavtab'] == 'news'">
or is there a different condition I could use based on the "5-news" perhaps...

atm i don't know this, sorry.

i wish this would be possible with vB4 ( http://www.vbulletin.com/forum/showt...07#post1852507 )^^

DesignWerks 12-11-2009 10:50 AM

Your template works like a charm for my non-CMS pages - thanks for that! I will have to leave News down in the submenu bar for now and hope that they improve the ability to manage the navbar in upcoming releases.

MaryTheG(r)eek 12-13-2009 09:14 AM

1 Attachment(s)
Fantastic! Thank you for sharing. It was the only missing to finish microSUPPORT for vB4. Works like a charm and I don't have wrong highlight problems.

Maria

ragtek 12-13-2009 10:51 AM

Quote:

Originally Posted by MicroHellas (Post 1929798)
Fantastic! Thank you for sharing. It was the only missing to finish microSUPPORT for vB4. Works like a charm and I don't have wrong highlight problems.

Maria

[ot]
haven't you wrote that you've finished with the vB Community and don't want to code anything else?[/ot]


All times are GMT. The time now is 03:59 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.02039 seconds
  • Memory Usage 1,757KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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