vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Custom Navbar Links (https://vborg.vbsupport.ru/showthread.php?t=98934)

harmor19 10-20-2005 10:00 PM

Custom Navbar Links
 
Author: Andrew Harmor
Version: 1.20
File Edits: 0
Template Edits: 1
Difficulty: Easy

Please click https://vborg.vbsupport.ru/



Description:
Adds a drop down menu on your navbar which contains links you add through the ACP.


################################################## ###############
FAQ


Q: The link doesn't look right on the navbar
A: While on your forums view the source and search for id="navbar_search"
To the right should be "class" (For the default skin the class is "vbmenu_control")

Edit the navbar template
Find:
PHP Code:

<td id="custom_links" class="vbmenu_control"

Replace the "class" so it's the same as the search's class.
Let's say you're class is "nav_element" then it should look like this
PHP Code:

 <td id="custom_links" class="nav_element"

Open the product xml in an editor
Find:
PHP Code:

<td class='vbmenu_control'

Replace with your class.
PHP Code:

<td class='nav_element'

################################################## ###############

To get this to work with CMPS (Thanks To: drl2005)
Code:

In your CMPS settings under Portal Output Global Variables place:
custom_droplinks
custom_singlelinks

###########Changelog################

1.00
Initial Release

1.02
All Phrases are now in the product xml
The option to have link open in new window

1.03
Option to add new links on navbar as a stand alone link or in the drop down menu.

1.04
Sort the display order of links in the drop down menu.

1.05
16x16 images can be added to both stand-alone and drop down links

1.06
Templates are now cached


1.07
Fixed bug in product.
Changed the maximum characters for "name" from "20" to "100"

1.20
Usergroup permissions per link

SnowBot 10-21-2005 12:11 PM

Any screenshots mate?

harmor19 10-21-2005 12:12 PM

Just posted them, SnowBot

SnowBot 10-21-2005 12:13 PM

LOL yer i just hit refrsh :) OK mate gonna take a look but this is the sort of thing i have been looking for :)

jugo 10-21-2005 12:41 PM

LOL...dude...this is wonderful.

I think that the navbar should be fed from the admincp instead of a templet....it just makes more sense.

The Realist 10-21-2005 01:05 PM

Add The Following Phrases to Error Messages

What error mesages

Do you mean to add these new phrases to cp stop messages?

harmor19 10-21-2005 01:12 PM

Quote:

Originally Posted by The Realist
Add The Following Phrases to Error Messages

What error mesages

Do you mean to add these new phrases to cp stop messages?

I was looking at "faq.php" and I saw "saved_faq_x_successfully"
I search for it and I got the following results
Error Messages Phrases Containing 'saved_faq_x_successfully'
saved_faq_x_successfully Standard Phrase Saved FAQ <i>{1}</i> Successfully

and that isn't an error message as you can see.

I already tried "cp stop messages" but it didn't work.

The Realist 10-21-2005 01:19 PM

Same here M8

Quote:

Originally Posted by harmor19
I was looking at "faq.php" and I saw "saved_faq_x_successfully"
I search for it and I got the following results
Error Messages Phrases Containing 'saved_faq_x_successfully'
saved_faq_x_successfully Standard Phrase Saved FAQ <i>{1}</i> Successfully

and that isn't an error message as you can see.

I already tried "cp stop messages" but it didn't work.


nexialys 10-21-2005 01:25 PM

suggestion for the tool: - new structure for editing the links:

a: Name of the Link
b: URL of the link
c: TARGET (new window or not)
d: Title for the title tag when hovering

;)
HTML Code:

<a href="$url" target="$target" title="$title">$name</a>

harmor19 10-21-2005 01:29 PM

Quote:

Originally Posted by nexialys
suggestion for the tool: - new structure for editing the links:

a: Name of the Link
b: URL of the link
c: TARGET (new window or not)
d: Title for the title tag when hovering

;)
HTML Code:

<a href="$url" target="$target" title="$title">$name</a>

@c
I'll have to find the function for the radio buttons

@d
do you mean when hovering it shows text in the status bar?

The Realist 10-21-2005 01:35 PM

The instructions state:

Quote:

--------------------------------------------------------------
Add The Following Phrases to Error Messages
--------------------------------------------------------------
Varname: custom_link_added
Text: The custom link has successfully been added.

Varname: custom_link_edited
Text: The custom link has successfully been edited

Varname: custom_link_deleted
Text: The custom link has successfully been deleted
The instructions should state the following:
Quote:

--------------------------------------------------------------
Add The Following Phrases to "Front-End Error Messages" in Phrase Manager > Add New Phrase.
--------------------------------------------------------------
Varname: custom_link_added
Text: The custom link has successfully been added.

Varname: custom_link_edited
Text: The custom link has successfully been edited.

Varname: custom_link_deleted
Text: The custom link has successfully been deleted.
Laters

Cyricx 10-21-2005 03:51 PM

Should those phrases just add in through the product? :)

Nice hack!! Definately will use this and prolly tweak it abit to handle multiple menus :)

harmor19 10-21-2005 04:02 PM

Quote:

Originally Posted by Cyricx
Should those phrases just add in through the product? :)

Nice hack!! Definately will use this and prolly tweak it abit to handle multiple menus :)

I don't know how to add phrases automatically but I'll look through some hacks and figure it out.

nexialys 10-21-2005 04:04 PM

Quote:

Originally Posted by harmor19
@c
I'll have to find the function for the radio buttons
@d
do you mean when hovering it shows text in the status bar?

the TITLE tag show the information in a popup when you hover the link, like everywhere here... not in the navbar...

for the radio button: something like this:
PHP Code:

    print_yes_no_row($vbphrase['theoptions_text'], 'link[theoptions]'$link['theoptions']); 


harmor19 10-21-2005 04:12 PM

I'm working on the phrases in the product then I'll add that hover thingy.

I already added the "open in new window" option (check the screenshots)

The Realist 10-21-2005 05:46 PM

Uninstalled due to errors on forum. Will wait until its out of beta.

harmor19 10-21-2005 05:50 PM

What errors were you recieving?
Has anyone else recieved any errors?

New screenshots added

The Realist 10-21-2005 06:07 PM

They were database errors but removed hack now so cant recover error text.

yinyang 10-21-2005 06:36 PM

how many extra queries does this run? (if any)

Cyricx 10-21-2005 06:41 PM

Just add the phrases and in the product drop down select your product, then when you export your product it'll have it in the xml :)

harmor19 10-21-2005 06:51 PM

Quote:

Originally Posted by yinyang
how many extra queries does this run? (if any)

Only one on the board and admin panel


Quote:

Originally Posted by Cyricx
Just add the phrases and in the product drop down select your product, then when you export your product it'll have it in the xml

I looked at another plugin and noticed the <phrasetype> tags.

Phlex 10-21-2005 07:20 PM

great mod !!

Chris M 10-21-2005 11:36 PM

Quote:

Originally Posted by The Realist
The instructions state:



The instructions should state the following:


Laters

Error Messages is in fact the correct name for the phrasegroup - Your's is called Front-End Error Messages because you upgraded from vB 3.0.x and the phrasegroup name has not been altered correctly ;)

Chris

The Realist 10-22-2005 09:10 AM

Wrong, I was originally using 3.5.0 and installed this hack ands phrases manually because thats how the developer produced the install file.

Then the developer introduced the hack as a plugin so I removed the manual entries and used the new install system and thats when I got the database erors.

Laters

Quote:

Originally Posted by Chris M
Error Messages is in fact the correct name for the phrasegroup - Your's is called Front-End Error Messages because you upgraded from vB 3.0.x and the phrasegroup name has not been altered correctly ;)

Chris


harmor19 10-22-2005 11:22 AM

@The Realist

hmmm,
Did you uninstall the product from the product manager then re-upload the xml?
If not please do so and report back with your results.

Chris M 10-22-2005 02:45 PM

Quote:

Originally Posted by The Realist
Wrong, I was originally using 3.5.0 and installed this hack ands phrases manually because thats how the developer produced the install file.

Then the developer introduced the hack as a plugin so I removed the manual entries and used the new install system and thats when I got the database erors.

Laters

Has your forum, at any point, been 3.0.x?

A completely fresh installation of vB 3.5.x will name the phrasegroup as "Error Messages", which is what the correct name is - If you have, at any point, used the 3.0.x database to upgrade to the 3.5 BETAs, then that is why your phrasegroup is called "Front-End Error Messages" ;) (Mike Sullivan @ vB.com - http://www.vbulletin.com/forum/showp...06&postcount=3)

Chris

harmor19 10-22-2005 09:04 PM

I have added the option to have the link as a stand alone or in the drop down menu.
Look at the last screen shot

srh 10-22-2005 09:46 PM

When trying to import the xml file in "manage product" this happens

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Messages = 'a:4:{s:17:\"custom_link_added\";s:44:\"The custom l
Error Number : 1064
Date : Sunday, October 23rd 2005 @ 12:41:57 AM
Referrer : https://xxxxxx-xxxxxx.dk/admincp/plu...?do=productadd

UPDATE language SET title = title, phrasegroup_user = 'a:226:{s:21:\"activate_your_account\";s:17:\"Akti ver din konto\";s:15:\"activation_code\";s:15:\"Aktivering skode\";s:20:\"add_x_to_ignore_list\";s:35:\"Tilf? j %1$s til din \"Ignorer liste\"\";s:23:\"add_x_to_your_buddylist\";s:33:\" Tilf?j %1$s til din \'Buddy Liste\'\";s:22:\"additional_information\";s:28:\"Y derligere brugerinformation\";s:16:\"additional_users\";s:18 :\"Yderligere brugere\";s:29:\"administrators_may_send_email\";s :175:\"Engang i mellem vil Forum Admin gerne ha lov til at sende dig E-mail.<br />\r\n <br />\r\n Hvis du ikke ?nsker at modtage E-mail fra Forum Admin, frav?lg denne mulighed.\";s:15:\"aim_screen_name\";s:14:\"AIM Brugernavn\";s:3:\"all\";s:4:\"Alle\";s:27:\"allow _daylight_savings_time\";s:53:\"<br>Ydeligere, kan du indstille til sommertid<br><br>\";s:28:\"allow_members_send_you_ email\";s:50:\"Du kan tillade andre brugere at sende dig E-mails.\";s:20:\"allow_vcard_download\";s:21:\"Till ad vCard download\";s:25:\"anyone_free_to_join_group\";s:53 :\"Alle har tilladelse til at indg? i denne brugergruppe\";s:30:\"are_you_sure_you_want_to_add _x\";s:26:\"Tilf?j %1$s til din liste?\";s:33:\"are_you_sure_you_want_to_remove_x\ ";s:25:\"Fjern %1$s fra din liste?\";s:23:\"attachments_posted_by_x\";s:28:\"V edh?ftninger postet af %1$s\";s:33:\"automatically_detect_dst_settings\"; s:28:\"Automatisk indstil sommertid\";s:6:\"avatar\";s:6:\"Avatar\";s:15:\"a vatar_category\";s:15:\"Avatar kategori\";s:28:\"avatars_small_graphics_short\";s :90:\"En Avatar, er et lille billede der kan vises sammen med dit brugernavn hvergang du poster.\";s:28:\"basic_editor_simple_text_box\";s: 35:\"Simpel Editor - standard tekst boks\";s:10:\"birth_date\";s:10:\"F?dselsdag\";s:8 :\"birthday\";s:10:\"F?dselsdag\";s:31:\"board_can _be_shown_any_language\";s:133:\"Vores forum kan ikke overs?tte det egentlige indhold af indl?g, men indstillinger og hj?lpetekster kan bliver vist p? f?lgende sprog.\";s:14:\"board_language\";s:15:\"Forum sprogvalg\";s:10:\"board_skin\";s:12:\"Forum \'Skin\'\";s:30:\"browsing_when_receive_pm_popup\" ;s:113:\"Hvis du l?ser i forummet og du modtager D-mail, kan du bede om notifikation i form af en popup, om de nye D-mail.\";s:27:\"can_automatically_subscribe\";s:229 :\"N?r du laver eller svare p? et nyt indl?g kan du v?lge automatisk at tilf?je det din liste over <a href=\"%1$s\">Abonnerede tr?de</a>.<br><br>\r\nDette giver dig ogs? mulighed for tilsendelse

......... and so on (maybe forever) Please help...

harmor19 10-22-2005 10:01 PM

I'm sorry I cannot reproduce that error.
Perhaps trying to upload the product again.

Is anybody else recieving and such error?

srh 10-23-2005 05:30 AM

Tried to uninstall and reupload files, with exact same result :o

BTW in the control panel, it displays strange, text is missing

In "Add" no text are displayed

In modify/delete it only displays this
Code:

test [] [] [Drop]
[] [] [Single]
[] [] [Single]
[] [] [Single]

(links I've tried make)

- the button, "extras" in navbar is existant and displays at drop-down, named "extras"

Any help would be much appreciated.

TIA

gael11 10-23-2005 08:25 AM

Hello, I have succesfull install this hack, but I have a small problem. I don't know how to tell it so look at the screen:
https://vborg.vbsupport.ru/
I'd want to align the drop menu below the menu title.
Thanks.

Gizmo5h1t3 10-23-2005 02:01 PM

just thought id add that the templates for this are showing as uncached....

apart from that, quality piece of kit m8!!

gael11 10-23-2005 02:10 PM

Quote:

Originally Posted by Gizmo5h1t3
just thought id add that the templates for this are showing as uncached....

apart from that, quality piece of kit m8!!

what do you mean ? I don't understand :speechless:

harmor19 10-23-2005 09:35 PM

Quote:

Originally Posted by gael11
Hello, I have succesfull install this hack, but I have a small problem. I don't know how to tell it so look at the screen:
http://www.image-dream.com/up/1130059865-screen.jpg
I'd want to align the drop menu below the menu title.
Thanks.

I'm sorry but I'm not good with html and tables to help you with your problem.

again I apologize.

aflax045 10-23-2005 09:55 PM

Error when importing the .xml:

Database error in vBulletin 3.5.0:

Invalid SQL:
Blah Blah Blah

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Messages = 'a:4:{s:17:\"custom_link_added\";s:44:\"The custom link has successfu' at line 1
Error Number : 1064

harmor19 10-23-2005 10:12 PM

Quote:

Originally Posted by aflax045
Error when importing the .xml:

Database error in vBulletin 3.5.0:

Invalid SQL:
Blah Blah Blah

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Messages = 'a:4:{s:17:\"custom_link_added\";s:44:\"The custom link has successfu' at line 1
Error Number : 1064

Looks like there's a problem with the phrases.
It's weird it doesn't work for some but works for others.
I'm new to coding vbulletin so I'll ask an advanced coder about it.

harmor19 10-23-2005 11:57 PM

I may have a solution

Open "product-custom_links.xml" in an editor
Find:
PHP Code:

<phrasetype name="Error Messages" fieldname="Error Messages"

Replace With:
PHP Code:

<phrasetype name="Front-End Error Messages" fieldname="Front-End Error Messages"

If this works I'll make another xml for people receiving that error.

aflax045 10-24-2005 12:02 AM

Quote:

Originally Posted by harmor19
I may have a solution

Open "product-custom_links.xml" in an editor
Find:
PHP Code:

<phrasetype name="Error Messages" fieldname="Error Messages"

Replace With:
PHP Code:

<phrasetype name="Front-End Error Messages" fieldname="Front-End Error Messages"

If this works I'll make another xml for people receiving that error.

Worked great. Thanks man.

aflax045 10-24-2005 12:06 AM

Another problem:
The "Open link in new window" option doesn't seem to work. Whatever I select, it always opens in a new window. Thoughts?

harmor19 10-24-2005 12:06 AM

I'm glad to hear it.

I'll make the xml and send out updates.

About the new window problem
I've been editing, re-editing so I probably messed it up.
I'll see what the problem is.


All times are GMT. The time now is 04:47 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.01628 seconds
  • Memory Usage 1,861KB
  • 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_html_printable
  • (9)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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