Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Custom Navbar Links Details »»
Custom Navbar Links
Version: 1.20, by harmor19 harmor19 is offline
Developer Last Online: May 2023 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 10-20-2005 Last Update: 07-06-2006 Installs: 219
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

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

Please click



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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 10-26-2005, 05:13 PM
NxTek NxTek is offline
 
Join Date: Jun 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by harmor19
Open the product xml

PHP Code:
Find Remove:
$vbulletin->templatecache['custom_droplinks'] = str_replace('$custom_droplinks''$custom_droplinks Testing'$vbulletin->templatecache['custom_droplinks']); 
Re-import the xml using overwrite.
This doesn't exist. Here is my product xml
PHP Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="custom_links-Harmor19" active="1">
    <title>Custom Links</title>
    <description>Add custom links in a drop down box on the navbar</description>
    <version>1.0.0</version>
    <codes>
        <code version="1.0.0">
            <installcode><![CDATA[
$db->query_write("CREATE TABLE `" . TABLE_PREFIX . "custom_droplinks` (
  `linkid` mediumint(10) unsigned NOT NULL auto_increment,
  `url` varchar(120) NOT NULL default '',
  `name` varchar(20) NOT NULL default '',
  `new_window` tinyint(2) NOT NULL default '',
  `alt` varchar(60) NOT NULL default '',
  `number` int(20) NOT NULL default '',
  PRIMARY KEY  (`linkid`)
);");

$db->query_write("CREATE TABLE `" . TABLE_PREFIX . "custom_singlelinks` (
  `linkid` mediumint(10) unsigned NOT NULL auto_increment,
  `url` varchar(120) NOT NULL default '',
  `name` varchar(20) NOT NULL default '',
  `new_window` tinyint(2) NOT NULL default '',
  `alt` varchar(60) NOT NULL default '',
  PRIMARY KEY  (`linkid`)
);");

$db->show_errors();]]></installcode>
            <uninstallcode><![CDATA[$db->hide_errors();
$db->query_write("DROP TABLE `" . TABLE_PREFIX . "custom_droplinks`;");
$db->query_write("DROP TABLE `" . TABLE_PREFIX . "custom_singlelinks`;");
$db->show_errors();]]></uninstallcode>
        </code>
    </codes>
    <templates>
        <template name="custom_droplinks" templatetype="template" date="1128881080" username="harmor19" version="3.5.0"><![CDATA[$custom_droplinks
]]></template>
<template name="custom_singlelinks" templatetype="template" date="1128881080" username="harmor19" version="3.5.0"><![CDATA[$custom_singlelinks
]]></template>
    </templates>
    <plugins>
        <plugin active="1">
            <title>Custom Links</title>
            <hookname>global_start</hookname>
            <phpcode><![CDATA[
                    
    $getdroplinks = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "custom_droplinks WHERE linkid ORDER BY number ASC");

    while($dlink = $db->fetch_array($getdroplinks))
    {    
       if($dlink['new_window'] == 1)
       {
         $new = "_blank";
        }
        else
        {
         $new = "";
        }
    
        $custom_droplinks .= "<tr><td class='vbmenu_option'><a href='".$dlink['url']."' target='$new' title='".$dlink['alt']."'>".$dlink['name']."</a></td></tr>";
                  
        eval('$custom_droplinks = "' . fetch_template('custom_droplinks') . '";');
    }
    
        
    $getsinglelinks = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "custom_singlelinks WHERE linkid");
    
        while($slink = $db->fetch_array($getsinglelinks))
    {    
        if($slink['new_window'] == 1)
       {
         $new = "_blank";
        }
        else
        {
         $new = "";
        }
    
    
        $custom_singlelinks .= "<td class='vbmenu_control'><a href='".$slink['url']."' target='$new' title='".$slink['alt']."'>".$slink['name']."</a></td>";
                  
        eval('$custom_singlelinks = "' . fetch_template('custom_singlelinks') . '";');
    }
    
    ]]></phpcode>
        </plugin>
    </plugins>
<phrases>
        <phrasetype name="Error Messages" fieldname="Error Messages">
        <phrase name="custom_link_added"><![CDATA[The custom link has successfully been added.]]></phrase>
            <phrase name="custom_link_edited"><![CDATA[The custom link has successfully been added.]]></phrase>
            <phrase name="ruleshack_add_rule_text"><![CDATA[The custom link has successfully been edited]]></phrase>
            <phrase name="custom_link_deleted"><![CDATA[The custom link has successfully been deleted]]></phrase>
       </phrasetype>
       <phrasetype name="GLOBAL" fieldname="global">
        <phrase name="custom_links_link"><![CDATA[Extras]]></phrase>
       </phrasetype>
       <phrasetype name="Control Panel Global" fieldname="Control Panel Global">
            <phrase name="cl_add_link"><![CDATA[Add Drop Link]]></phrase>
            <phrase name="cl_single_link"><![CDATA[Add Stand Alone Link]]></phrase>
            <phrase name="stand_alone"><![CDATA[Stand Alone]]></phrase>
            <phrase name="drop"><![CDATA[Drop]]></phrase>
            <phrase name="cl_add_custom_link"><![CDATA[Add Custom Link]]></phrase>
            <phrase name="cl_hover_text"><![CDATA[Hover Text]]></phrase>
            <phrase name="cl_name"><![CDATA[Name]]></phrase>
            <phrase name="cl_url"><![CDATA[URL]]></phrase>
            <phrase name="display_number"><![CDATA[Display No.]]></phrase>
            <phrase name="display_number_message"><![CDATA[(Only applies in drop down menu)]]></phrase>
            <phrase name="cl_new_window"><![CDATA[Open In New Window]]></phrase>
            <phrase name="cl_add_button"><![CDATA[Add]]></phrase>
            <phrase name="cl_edit_link"><![CDATA[Edit Link]]></phrase>    
            <phrase name="cl_edit_link"><![CDATA[Edit Link]]></phrase>
            <phrase name="cl_edit_custom_link"><![CDATA[Edit Custom Link]]></phrase>
            <phrase name="cl_edit_button"><![CDATA[Edit]]></phrase>
            <phrase name="cl_delete_confirm"><![CDATA[Are You Sure You Want to Delete This Link?]]></phrase>
            <phrase name="cl_delete_button"><![CDATA[Delete]]></phrase>
            <phrase name="cl_edit_delete_message"><![CDATA[Edit / Delete a Custom Link]]></phrase>
       </phrasetype>
</phrases>
    <options>
    </options>
</product>
Reply With Quote
  #93  
Old 10-27-2005, 12:04 AM
hendri's Avatar
hendri hendri is offline
 
Join Date: Dec 2004
Location: Jakarta, Indonesia
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed thanks !
Reply With Quote
  #94  
Old 10-27-2005, 10:56 PM
twitch's Avatar
twitch twitch is offline
 
Join Date: Apr 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not seeing any menu to change the order of the links and I don't understand what difference its supposed to make for setting the link as a standalone or drop down only. I tried setting them both ways and didn't notice anything different. Also, how would I go about changing the title of the drop down box from "extras" to "links"

Thanks for this extension, very cool idea!
Reply With Quote
  #95  
Old 10-28-2005, 12:11 AM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@NxTek
It's not there because I removed it and re-uploaded te file.
Just upload the xml as is.

@twitch
If you have recently downloaded my hack search for "Extras" in the phrase manager.

If it's not there open the "navbar" template and look for "Extras" (it's in there twice).
Reply With Quote
  #96  
Old 10-28-2005, 12:19 AM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by twitch
I am not seeing any menu to change the order of the links and I don't understand what difference its supposed to make for setting the link as a standalone or drop down only. I tried setting them both ways and didn't notice anything different. Also, how would I go about changing the title of the drop down box from "extras" to "links"

Thanks for this extension, very cool idea!
Setting it as a stand alone will put a link on the navbar, the other will put the link in the drop down box.
Reply With Quote
  #97  
Old 10-28-2005, 01:07 AM
twitch's Avatar
twitch twitch is offline
 
Join Date: Apr 2005
Posts: 260
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Setting it as a stand alone will put a link on the navbar, the other will put the link in the drop down box.
doesn't matter what I set it, its always in the drop down box. And I can't find the place to sort the order the links are in.
Reply With Quote
  #98  
Old 10-28-2005, 01:17 AM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by twitch
doesn't matter what I set it, its always in the drop down box. And I can't find the place to sort the order the links are in.
Does your the "Custom Links" page in the ACP look like this?
https://vborg.vbsupport.ru/attachmen...chmentid=36414

If not then redownload the zip and just overwrite the product and replace the file that goes in the admincp directory.
Reply With Quote
  #99  
Old 10-28-2005, 02:32 PM
b6gm6n's Avatar
b6gm6n b6gm6n is offline
 
Join Date: Aug 2002
Location: UK
Posts: 691
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey harmor19, could i be a pain and give you a reminder about those features missing from this great mod....icons, seperators etc

-b6
Reply With Quote
  #100  
Old 10-28-2005, 02:52 PM
TygerTyger TygerTyger is offline
 
Join Date: Aug 2005
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by b6gm6n
Hey harmor19, could i be a pain and give you a reminder about those features missing from this great mod....icons, seperators etc

-b6
Patience Padwan it's only just been released. I'd say the lack of caching the templates was more important than icons, personally. I'm itching to get rid of the bright red message microstats is giving me :nervous:
Reply With Quote
  #101  
Old 10-28-2005, 07:36 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by b6gm6n
Hey harmor19, could i be a pain and give you a reminder about those features missing from this great mod....icons, seperators etc

-b6
Sorry, I am currently working on ecards for my site.
The ecards use php. Iuse a form where you type some stuff and it appears on the image.

I am also working on my testimonial mod and some ajax thingy.


@TygerTyger
I fix it sometime today.
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:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07745 seconds
  • Memory Usage 2,355KB
  • Queries Executed 25 (?)
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)bbcode_code
  • (6)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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