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)

SVTOA 12-18-2004 02:44 PM

I have been comparing the code between vBAdvanced homepage and VBA CMPS, and began to play with the index.php files for both. I took this bit of code from vbAdvanced homepage:

Code:

if ($vboptions['home_navbar'])
{
        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]</strong>"
        ),
        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[hometitle]</strong>"
        ), $navbar);
}

and went to the CMPS index.php and inserted it directly below this:

Code:

require_once('./global.php');
Renamed the page as test.php and called it up in my browser. This "my links" hack started working on that page.
The ratio of php-to-mysql and page load time changed very little, if any.
I get no errors either. Is this an acceptable fix or have I introduced bad code into the CMPS page?

SVTOA 12-18-2004 03:10 PM

Quote:

Originally Posted by Michael Morris
Two added.

Note, minor glitch found for RC4 - you can't have user input fields beyond 500 characters or so (odd). I presume this is fixed in later versions.

Ugh, I think I have to give up on this one. In 3.0.0:

"Maximum Input (Input, Textarea only)
This setting is how many characters a user is allowed to enter into this field. This can be any number between 1 and 250."

Nice idea but it's not working out like I had hoped. :(

Michael Morris 12-18-2004 07:37 PM

Quote:

Originally Posted by SVTOA
Ugh, I think I have to give up on this one. In 3.0.0:

"Maximum Input (Input, Textarea only)
This setting is how many characters a user is allowed to enter into this field. This can be any number between 1 and 250."

Nice idea but it's not working out like I had hoped. :(

I'm pretty sure you can run a query to override this - run the query after the table is created.

SVTOA 12-18-2004 07:41 PM

And that query would be?

Michael Morris 12-18-2004 07:46 PM

Testing it now - Such things can royally mess up a board if done incorrectly :)

BTW, 3.0.3 allows you to set any length.

Michael Morris 12-18-2004 08:12 PM

The correct query is..

ALTER TABLE userfield MODIFY COLUMN fieldX TEXT

You need to change fieldX to the actual field # you're going to use.

PS you can use this script to up the lengths of the other profile fields, such as biography, if you want.

SVTOA 12-18-2004 08:24 PM

Thank you for the followup, if this works then the hack becomes extremely useful to me and my members. Will check back in a bit.

Jaxx 12-18-2004 08:27 PM

Nice Michael. :)

Along the same lines as the msg I sent you, just got to figure out how to get the actual links to work in the profile view if other members look at it.

I know I could keep it a private field, but whats the fun in that. :p

SVTOA 12-18-2004 08:35 PM

BRAVO!!!! Worked perfectly!!! Much appreciated!!!!

SVTOA clicks *INSTALL*

wirewolf 12-27-2004 08:12 PM

Michael, very nice hack. Installed it today and it went smoothly. However, I have the "Links Directory v1.0.0 RC3" by vBadvanced installed on my forum. All of the "links" directory scripts call for their links_config.php file, which in turn calls for the vbulletins' global.php file, where the PHPINCLUDE_START is called. The "links" templates also call for the vbulletin $navbar. But the "My Links" drop down does not show when you go to the Links Directory Pages. I suspect it has to do with the PHPINCLUDE_START not being called apon correctly in the "links" files, but I'm not sure. I'm not getting any errors. The "Links Directory" files are in a separate directory within my main forum directory.
/home/vbforum/links

See the two attachments. Any clue where to start looking?
Thanks, John


All times are GMT. The time now is 12:43 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.01102 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)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