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-25-2005 08:43 AM

what do you mean by "formatting"?

Neutral Singh 10-25-2005 08:48 AM

Adding user permissions to the buttons would make it even more powerful.

harmor19 10-25-2005 08:52 AM

Quote:

Originally Posted by Neutral Singh
I think adding user permissions to buttons would it even more powerful.

That would be great.
I'll see what I can do.

Neutral Singh 10-25-2005 09:36 AM

by formatting i meant changing the look and feel of the link generated as the link presently generated is good for default skin only.

SnowBot 10-25-2005 10:12 AM

Quote:

Originally Posted by Neutral Singh
by formatting i meant changing the look and feel of the link generated as the link presently generated is good for default skin only.

On custom skins the button does not look right, see screenshot

Also when editing a link the button says "Edit" Shouldnt that button say "Save"? One last thing maybe useful, when editing a link their is no option to change it from a stand alone to a dropdown link.

harmor19 10-25-2005 02:52 PM

Quote:

Originally Posted by SnowBot
On custom skins the button does not look right, see screenshot

Also when editing a link the button says "Edit" Shouldnt that button say "Save"? One last thing maybe useful, when editing a link their is no option to change it from a stand alone to a dropdown link.

Edit the navbar template
Find:
PHP Code:

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

Replace with
PHP Code:

<td id="custom_links" class="element_control_nav"


Open the xml in an editor.

Find:
PHP Code:

<td class='vbmenu_control'

Replace with
PHP Code:

<td class='element_control_nav'


Parture 10-25-2005 07:54 PM

How do you know if you have front end error messages?

harmor19 10-25-2005 07:59 PM

Quote:

Originally Posted by Parture
How do you know if you have front end error messages?

Go into the phrase manager
In the Drop Down Menu Look For "Front-End Error Messages" if you see it then you have it.

SnowBot 10-25-2005 08:18 PM

Quote:

Originally Posted by harmor19
Edit the navbar template
Find:
PHP Code:

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

Replace with
PHP Code:

<td id="custom_links" class="element_control_nav"


Open the xml in an editor.

Find:
PHP Code:

<td class='vbmenu_control'

Replace with
PHP Code:

<td class='element_control_nav'


Worked like a charm Sir :) appreciated mate!

harmor19 10-26-2005 04:53 PM

I'm glad to hear it.

I want to add more to this so I'll take the suggestion and have the admin choose a 16x16 image to place by the image.

NxTek 10-26-2005 05:13 PM

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>


hendri 10-27-2005 12:04 AM

installed thanks !

twitch 10-27-2005 10:56 PM

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!

harmor19 10-28-2005 12:11 AM

@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).

harmor19 10-28-2005 12:19 AM

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.

twitch 10-28-2005 01:07 AM

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.

harmor19 10-28-2005 01:17 AM

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.

b6gm6n 10-28-2005 02:32 PM

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

-b6

TygerTyger 10-28-2005 02:52 PM

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:

harmor19 10-28-2005 07:36 PM

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.

twitch 10-28-2005 08:23 PM

Quote:

Originally Posted by harmor19
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.


Thanks, that fixed it

harmor19 10-28-2005 08:28 PM

Quote:

Originally Posted by twitch
Thanks, that fixed it

I'm glad to hear it.


Come one people I want to get HOTM award.

Andyrew 10-28-2005 08:45 PM

Ive installed this but don't see anything in my admin cp to add links.????

TygerTyger 10-28-2005 08:48 PM

It's underneath Announcements and Forums and Moderators in the main menu frame.

Andyrew 10-28-2005 09:01 PM

Quote:

Originally Posted by TygerTyger
It's underneath Announcements and Forums and Moderators in the main menu frame.

Working now, stupid me uploaded into the includes folder and should have been includes/xml :o

b6gm6n 10-28-2005 10:50 PM

Quote:

Originally Posted by harmor19
Come one people I want to get HOTM award.

For this hack? well adding icons, user perms & seperators may ensure you of that! - seems like you quite busy though.

-b6

harmor19 10-29-2005 08:50 AM

I don't know to go about making user permissions and the icon will be easy but that's second on my list after I get my new hack working properly.

Andyrew 10-29-2005 12:43 PM

It cannot use more than 20 caracters when adding a name. ?? try putting the alphabet in. :ermm:

harmor19 10-29-2005 04:20 PM

Quote:

Originally Posted by Andyrew
It cannot use more than 20 caracters when adding a name. ?? try putting the alphabet in. :ermm:

I'll fix that now

Andyrew 10-29-2005 05:43 PM

Quote:

Originally Posted by harmor19
I'll fix that now

Thanks worked great :banana:

Cyricx 11-02-2005 08:37 PM

Man this would be so awesome if you could use it to build multiple dropdown windows. :)

SilentNoise 11-02-2005 09:24 PM

I modded the Navbar link to say Member Sites instead of Extras just to specify it more to my needs.

Thanks for the add-on.

harmor19 11-03-2005 08:48 PM

Quote:

Originally Posted by Cyricx
Man this would be so awesome if you could use it to build multiple dropdown windows. :)

I want to do that and I want to give the user the ability to add categories per drop down.

b6gm6n 11-07-2005 10:28 PM

I cant wait for these new options, any update on progress? :)

-b6

KrisJacobs 11-18-2005 10:09 PM

OK this is darn near exactly what I'm trying to do - BUT! :)

I want to make my navbar "Calendar" link a custom drop down / pop up menu, populated exactly how the Calendar Jump menu is populated.

Calendar Jump code from the calendarjump template:
Code:

<form action="calendar.php" method="get">
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap">
        <input type="hidden" name="s" value="$session[sessionhash]" />
        <input type="hidden" name="month" value="$month" />
        <input type="hidden" name="year" value="$year" />
        <input type="hidden" name="do" value="$docalendar" />
        <strong>$vbphrase[calendar_jump]</strong><br />
        <select name="c" onchange="this.form.submit();">
                <optgroup label="$vbphrase[please_select_one]">
                $jumpcalendarbits
                </optgroup>
        </select>$gobutton
</div>
</form>

and here is the code from the calendarjumpbit template:
Code:

<form action="calendar.php" method="get">
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap">
        <input type="hidden" name="s" value="$session[sessionhash]" />
        <input type="hidden" name="month" value="$month" />
        <input type="hidden" name="year" value="$year" />
        <input type="hidden" name="do" value="$docalendar" />
        <strong>$vbphrase[calendar_jump]</strong><br />
        <select name="c" onchange="this.form.submit();">
                <optgroup label="$vbphrase[please_select_one]">
                $jumpcalendarbits
                </optgroup>
        </select>$gobutton
</div>
</form>

Thanks!

TygerTyger 11-19-2005 07:59 AM

And don't forget the template needs caching still :P

Chadi 11-21-2005 09:05 PM

Any way to add sorting capability? I wish to sort everything alphabetically but unfortunately no option for that :)

johon 11-22-2005 07:09 AM

Too bad, installation always causes SQL-Errors

Quote:

Invalid SQL:
UPDATE vb3_language SET title = title, phrasegroup_global = 'a:529:{s:9:\"1_day_ago\"........
Product works, but no text in descriptions and buttons in ACP and after this installation, no other installation of a product works any more.

It's a german vBulletin 3.5.1, but also the translated version doesn't work.

I'm so sorry I have to uninstall because it was just the thing i have looked for :disappointed:

Greetz

Jo

Chadi 12-01-2005 10:34 PM

any way to add this to forumhome instead? I'm trying to implement in a vertical navbar on my right side column in forumhome

https://vborg.vbsupport.ru/showthrea...threadid=99318

Ramsesx 12-09-2005 02:21 AM

I love it, thank you harmor19


All times are GMT. The time now is 04:17 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.01494 seconds
  • Memory Usage 1,876KB
  • 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
  • (10)bbcode_php_printable
  • (19)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
  • (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