vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Users Can create their own drop down list in navbar (https://vborg.vbsupport.ru/showthread.php?t=72980)

MikaK 12-28-2004 12:56 PM

*click*:)

wirewolf 12-28-2004 01:59 PM

Quote:

Originally Posted by wirewolf
................................... Any clue where to start looking?
Thanks, John

After looking again at the code again (after getting a nights sleep) I think I found the answer. In the code for includes/functions_links.php around line 398:
Quote:

// ##################### Construct Navbar #################################
if (!function_exists('construct_adv_navbar'))
{
function construct_adv_navbar($navbits, $index = 'false')
{
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox;
I added $mylinks to the one line:
Quote:

// ##################### Construct Navbar #################################
if (!function_exists('construct_adv_navbar'))
{
function construct_adv_navbar($navbits, $index = 'false')
{
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $mylinks;
The "My Links" now shows in the navbar when going to my "Links Directory" Pages. The only thing I'm not sure of is in the rest of the code in the Construct Navbar section:
Quote:

if (!empty($navbits))
{
$navbits = construct_navbits($navbits);
}
eval('$navbar = "' . fetch_template('navbar') . '";');

$navbar = str_replace(
array(
'"memberlist.php',
'"usercp.php',
'"register.php',
'"faq.php',
'"calendar.php',
'"search.php',
'"login.php',
'"forumdisplay.php',
'"profile.php',
'"private.php',
'"subscription.php',
'"member.php',
'"online.php',
'"clientscript',
'\'misc.php',
$vboptions['bbtitle'],
'"' . $vboptions['forumhome'] . '.php'
),
array(
'"' . $vboptions['bburl'] . '/memberlist.php',
'"' . $vboptions['bburl'] . '/usercp.php',
'"' . $vboptions['bburl'] . '/register.php',
'"' . $vboptions['bburl'] . '/faq.php',
'"' . $vboptions['bburl'] . '/calendar.php',
'"' . $vboptions['bburl'] . '/search.php',
'"' . $vboptions['bburl'] . '/login.php',
'"' . $vboptions['bburl'] . '/forumdisplay.php',
'"' . $vboptions['bburl'] . '/profile.php',
'"' . $vboptions['bburl'] . '/private.php',
'"' . $vboptions['bburl'] . '/subscription.php',
'"' . $vboptions['bburl'] . '/member.php',
'"' . $vboptions['bburl'] . '/online.php',
'"' . $vboptions['bburl'] . '/clientscript',
'\'' . $vboptions['bburl'] . '/misc.php',
iif($vba_options['links_navbarhomelink'], $vboptions['hometitle'], $vba_options['links_title']),
'"' . iif($vba_options['links_navbarhomelink'], $vboptions['homeurl'], $vba_options['links_homeurl'])
), $navbar);
return $navbar;
}
}
Would any changes have to be made in this section too? I know this coding comes from vbadvanced, but I'm just asking as a general coding question.
John

Michael Morris 12-28-2004 04:40 PM

I don't think so - but I'm soon to find out. I have to install vbadvanced links directory to ENWorld next month :) I'll let you know if I hit any snags.

wirewolf 12-28-2004 06:01 PM

Got an answer from Brian over at vbadvanced. Everything in your coding is fine. The includes/functions_links.php constructs the navbar. The links scripts read the PHPINCLUDE_START template but you have to include $mylinks in the global line and then the "My Links" shows in the navbar on the links directory pages. The only changes in the array section would be if a user did not write in a full url path in the My Links text box. Such would be the case as in [ post=475]Post #475[/post]. The url would show in the "Directory" navbar with the "links directory folder in front of showthread.php - /links/showthread.php etc.. of course being wrong. One fix is to include showthread.php in the array:
Try replacing that function in includes/functions_links.php with this:
Quote:

// ##################### Construct Navbar #################################
if (!function_exists('construct_adv_navbar'))
{
function construct_adv_navbar($navbits, $index = 'false')
{
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $mylinks;

if (!empty($navbits))
{
$navbits = construct_navbits($navbits);
}
eval('$navbar = "' . fetch_template('navbar') . '";');

$navbar = str_replace(
array(
'"memberlist.php',
'"usercp.php',
'"register.php',
'"faq.php',
'"calendar.php',
'"search.php',
'"login.php',
'"forumdisplay.php',
'"profile.php',
'"private.php',
'"subscription.php',
'"member.php',
'"online.php',
'"clientscript',
'\'misc.php',
'"showthread.php',
$vboptions['bbtitle'],
'"' . $vboptions['forumhome'] . '.php'
),
array(
'"' . $vboptions['bburl'] . '/memberlist.php',
'"' . $vboptions['bburl'] . '/usercp.php',
'"' . $vboptions['bburl'] . '/register.php',
'"' . $vboptions['bburl'] . '/faq.php',
'"' . $vboptions['bburl'] . '/calendar.php',
'"' . $vboptions['bburl'] . '/search.php',
'"' . $vboptions['bburl'] . '/login.php',
'"' . $vboptions['bburl'] . '/forumdisplay.php',
'"' . $vboptions['bburl'] . '/profile.php',
'"' . $vboptions['bburl'] . '/private.php',
'"' . $vboptions['bburl'] . '/subscription.php',
'"' . $vboptions['bburl'] . '/member.php',
'"' . $vboptions['bburl'] . '/online.php',
'"' . $vboptions['bburl'] . '/clientscript',
'\'' . $vboptions['bburl'] . '/misc.php',
'"' . $vboptions['bburl'] . '/showthread.php',
iif($vba_options['links_navbarhomelink'], $vboptions['hometitle'], $vba_options['links_title']),
'"' . iif($vba_options['links_navbarhomelink'], $vboptions['homeurl'], $vba_options['links_homeurl'])
), $navbar);
return $navbar;
}
}
I tried the changes above and they work. But it might be just as easy to have users enter the full url path. Most of mine aren't too good with bbcodes anyway. So I just left in the global line - $mylinks, instructed my users to put in the full url path and everything is working fine.
BTW Michael - you may find other scripting problems in the vbadvanced links program where the links directory folder is placed in front of a typical forum file path - /forum/links/member.php? for example. Look in any array section in the links php files (like browslinks.php, showlink.php, misc.php, etc) that deal with a forum function(member.php is one). Had that problem when I first installed "Links Directory". Brian has cleaned up a lot of the code, but you may hit a snag.
Thanks and have a Happy New Year!!
John

nautiqeman 01-21-2005 06:45 PM

I'm having a simliar problem in the vba Gallery -- I put in the steps above (but of course reflected for the gallery portion), but for some reason, it's not showing up. Any ideas??

jamesyfx 02-02-2005 11:24 AM

Hello,

I'm wondering, would it be possible for an option to click an "Add to Links" button in threads, so it would add a link to the thread to your menu?

A member of my team suggested it, I think it could be useful.. but I don't know how to do it myself.

OrangeFlea 02-11-2005 11:14 PM

I can't get it to show on my navbar. I'm not running Vbadvanced. What's the deal?

mikexxx 02-12-2005 10:06 AM

If i use this link:

PHP Code:

[url=http://www.vbulletin.com/search.php?do=getdaily&days=7]7 Dagen[/url] 

This is the link when i use it:

PHP Code:

http://www.vbulletin.com/search.php?do=getdaily&days=7 

The & (replaced by: &) is not in the link. Is there a solution for this?

OrangeFlea 02-13-2005 03:33 PM

I use vB 3.0.3 without the vbadvanced hack. I entered the information exactly as outlined in the instructions and read every single post in this thread even remotely related to my dilemma, but the link is just not appearing on my navbar.

Can someone -- anyone -- help?

Michael Morris 02-14-2005 03:38 AM

Check to make sure there isn't a parse error in your PHPINCLUDE_START template. To do this, put this in your footer.

$phpinclude_output

Then, if there's a parse error, it will appear in your footer.


All times are GMT. The time now is 05:31 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.01157 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_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