View Single Post
  #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
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01218 seconds
  • Memory Usage 1,824KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete