View Single Post
  #272  
Old 04-09-2013, 05:07 PM
ezak ezak is offline
 
Join Date: Nov 2004
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Links and Download Modification is stoped supported because the author is died

I have problem in vb 4.2.0 can't register the variables

1- plugins
Name: Links and Downloads Manager - Add LDM to main vBulletin menu
Hooks: Prosses_templates_complete
code:
PHP Code:
    require_once(DIR '/includes/local_links_defns.php');

    if (
LDM_NAVBAR_LOCATION) {

        if (
defined('THIS_SCRIPT') and
                (
               
THIS_SCRIPT == LDM_LINKS_SCRIPT    or THIS_SCRIPT == 'local_links'
            
or THIS_SCRIPT == LDM_ACTION_SCRIPT    or THIS_SCRIPT == 'local_links_actions'
            
or THIS_SCRIPT == LDM_ADMIN_SCRIPT    or THIS_SCRIPT == 'local_links_admin'
            
or THIS_SCRIPT == LDM_SEARCH_SCRIPT    or THIS_SCRIPT == 'local_links_search'
                
)
            ) {
// Highlight ldm tab when in LDM - LDM code will create the actual tab and navbar
            
$vbulletin->options['selectednavtab'] = 'ldm';
        }
        else {
// Create the tab, no navbar needed
            
$templater vB_Template::create('links_navbar');
            
$templater->quickRegister(array(
                
'ldm_links_script'=>LDM_LINKS_SCRIPT,
                ));
            
$template_hook[LDM_NAVBAR_LOCATION] .= $templater->render();
        }

    } 

2- /includes/local_links_defns.php
PHP Code:
<?php

/* ===========================================================================*/
//
// This code is provided free on the basis that you do not claim that
// it is your own, sell it or use it as the basis for other products that you
// sell. But by all means extend it, modify it, upgrade it, correct it,
// suggest improvements, call me an idiot, etc.
//
// (c) 2004/10
// Andrew Dearing
// European Industrial Research Management Association
// www.eirma.org
//
// v3.0.2, 05.02.2010
// For VB4.0.x
// see changes.txt for history
// v1.00, 1.3.2004
//
/* ===========================================================================*/

// These definitions should correspond to the names of the main LDM scripts
// (held in the forums directory

define('LDM_LINKS_SCRIPT',        'local_links');
define('LDM_ACTION_SCRIPT',        'local_links_actions');
define('LDM_ADMIN_SCRIPT',        'local_links_admin');
define('LDM_RESIZE_SCRIPT',        'local_resize');
define('LDM_SEARCH_SCRIPT',        'local_links_search');
define('LDM_STREAM_SCRIPT',        'local_stream');

// This definition should be set to one of
//        'navtab_start', 'navtab_middle' or 'navtab_end'
// according to the location you want the entry to LDM to appear on the main vB navbar.
// Set the definition to the null strong '' if you do not want the entry to appear at all.

define('LDM_NAVBAR_LOCATION',    'navtab_middle');

?>
3- "links_navbar" template
PHP Code:
<vb:if condition="$vbulletin->options['selectednavtab'] == 'ldm'">

<
li class="selected">
    <
class="navtab" href="{vb:raw LDM_scripts.LDM_LINKS_SCRIPT}.php{vb:raw session.sessionurl_q}">{vb:rawphrase ldm_vbmenu_ldm}</a>
    <
ul class="floatcontainer">
    <
li class="popupmenu">
    <
a href="javascript://" class="popupctrl">{vb:rawphrase ll_menu_cat}</a>
    <
ul class="popupbody popuphover">
    <
li>
    <
a href="{vb:raw LDM_scripts.LDM_LINKS_SCRIPT}.php?{vb:raw session.sessionurl_q}">{vb:rawphrase ll_menu_home}</a>
    </
li>
<
vb:if condition="$show['ldm_add_category'] and $viewcatid>-2">
    <
li>
    <
a href="{vb:raw LDM_scripts.LDM_LINKS_SCRIPT}.php?{vb:raw session.sessionurl_q}action=addcat&amp;catid={vb:raw  viewcatid}">{vb:rawphrase ll_menu_addcat}</a>
    </
li>
</
vb:if>
<
vb:if condition="$show['ldm_edit_category'] and $viewcatid>0">
    <
li>
    <
a href="{vb:raw LDM_scripts.LDM_LINKS_SCRIPT}.php?{vb:raw session.sessionurl_q}action=editcat&amp;catid={vb:raw  viewcatid}">{vb:rawphrase ll_menu_editcat}</a></li>
</
vb:if>
    </
ul>
    </
li>

<
vb:if condition="$show['ldm_add_multi']">
    <
li class="popupmenu">
    <
a href="javascript://" class="popupctrl">{vb:rawphrase ll_entries}</a>
    <
ul class="popupbody popuphover">
    <
li id="ldm_navbar_addmulti">
    <
form action="{vb:raw LDM_scripts.LDM_LINKS_SCRIPT}.php" method="get">
    {
vb:rawphrase ll_menu_addmulti}
    <
input type="text" name="numadd" size="3" value="{vb:raw links_defaults.allow_add_multi}" />
    <
input type="hidden" name="action" value="addmultilink" />
    <
input type="hidden" name="catid" value="{vb:raw viewcatid}" />
    <
input type="submit" value="{vb:rawphrase ll_go}" name="submit" />
    </
form>
    </
li>
    </
ul>
    </
li>
<
vb:elseif condition="$show['ldm_add_link']" />
    <
li>
    <
a href="{vb:raw LDM_scripts.LDM_LINKS_SCRIPT}.php?{vb:raw session.sessionurl}action=addlink&amp;catid={vb:raw viewcatid}">
    {
vb:rawphrase ll_menu_addlink}
    </
a>
    </
li>
</
vb:if>

    <
li class="popupmenu">
    <
a href="javascript://" class="popupctrl">{vb:rawphrase ll_menu_show}</a>
    <
ul class="popupbody popuphover">
<
vb:if condition="$show['ldm_mark_link']">
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.FAVS_CAT}">{vb:rawphrase ll_menu_showfav}</a></li>
</
vb:if>

<
vb:if condition="$show['ldm_add_link']">
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.MY_CAT}">{vb:rawphrase ll_menu_showmyl}</a></li>
</
vb:if>

<
vb:if condition="$show['ldm_star_links']">
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.NOM_CAT}">{vb:rawphrase ll_menu_shownominate}</a></li>
<
vb:if condition="$show['ldm_view_nominations']">
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.CNOM_CAT}">{vb:rawphrase ll_menu_showcnominate}</a></li>
</
vb:if>
</
vb:if>

    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.HOT_CAT}">{vb:rawphrase ll_menu_showhot}</a></li>
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.NEW_CAT}">{vb:rawphrase ll_menu_shownew}</a></li>
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.NEW_RATE}">{vb:rawphrase ll_menu_shownewrating}</a></li>

    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.RND_CAT}">{vb:rawphrase ll_menu_showrnd}</a></li>

<
vb:if condition="$show['ldm_admin_links']">
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.AVL_CAT}">{vb:rawphrase ll_menu_showavl}</a></li>
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.HIDE_CAT}">{vb:rawphrase ll_menu_showhid}</a></li>
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.BRKN_CAT}">{vb:rawphrase ll_menu_showbrk}</a></li>
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.INVD_CAT}">{vb:rawphrase ll_menu_showinv}</a></li>
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.UPLD_CAT}">{vb:rawphrase ll_menu_showupl}</a></li>
<
vb:if condition="$links_defaults['featured_user_favs']">
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=find&amp;catid={vb:raw LDM_cats.FEAT_CAT}">{vb:rawphrase ll_menu_showfeat}</a></li>
</
vb:if>
</
vb:if>

    </
ul>
    </
li>

<
vb:if condition="$show['ldm_search_quick']">
    <
li class="popupmenu">
    <
a href="javascript://" class="popupctrl">{vb:rawphrase ll_menu_search}</a>
    <
ul class="popupbody popuphover">
    <
li id="ldm_navbar_search">
        <
form action="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php" method="get" id="ldm_search">
        {
vb:rawphrase ll_menu_search}
        <
input type="text" name="search" size="15" value="" />
        <
input type="submit" value="{vb:rawphrase ll_go}" name="submit" />
        <
input type="hidden" name="action" value="show" />
        <
input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
        <
input type="hidden" name="literal" value="{vb:raw links_defaults.default_search_all}" />
        <
input type="hidden" name="desc"  value="<vb:if condition="$links_defaults['default_search_desc']">1<vb:else />0</vb:if>" />
        <
input type="hidden" name="keys"  value="<vb:if condition="$links_defaults['default_search_keys']">1<vb:else />0</vb:if>" />
        <
input type="hidden" name="ents"  value="<vb:if condition="$links_defaults['default_search_ents']">1<vb:else />0</vb:if>" />
        </
form>
        </
li>
        <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=search">{vb:rawphrase ll_advanced_search}</a></li>

        {
vb:raw ldm_mysavedsearch.menu}

        {
vb:raw ldm_myprofilesearch.menu}

    </
ul>
    </
li>
<
vb:elseif condition="$show['ldm_search_link']" />
    <
li><a href="{vb:raw LDM_scripts.LDM_SEARCH_SCRIPT}.php?{vb:raw session.sessionurl}action=search">{vb:rawphrase ll_menu_search}</a></li>
</
vb:if>

<
vb:if condition="$show['ldm_moderate_links']">
    <
li><a href="{vb:raw LDM_scripts.LDM_LINKS_SCRIPT}.php?{vb:raw session.sessionurl}action=mod">{vb:rawphrase ll_menu_mod}</a></li>
</
vb:if>

<
vb:if condition="$show['ldm_admin_links']">
    <
li><a href="{vb:raw LDM_scripts.LDM_ADMIN_SCRIPT}.php?{vb:raw session.sessionurl}action=admin">{vb:rawphrase ll_menu_admin} {vb:raw LDM_Version}</a></li>
</
vb:if>

    </
ul>
</
li>
<
vb:else />
<
li><class="navtab" href="{vb:raw ldm_links_script}.php{vb:raw session.sessionurl_q}">{vb:rawphrase ldm_vbmenu_ldm}</a></li>
</
vb:if> 

the problem Now , the variable is not registered like {vb:raw ldm_links_script} >> doesn't get the file name > thats make all links on the script ""when use the template" is invalid like this
http://localhost/vb/.php // Links and Download Main links
http://localhost/vb/.php?action=mod
http://localhost/vb/.php?action=admin



Please don't delete this post, the programer for this script will not help anymore, I searched alot to fix this problem but I can't fix it
BTW: this problem only available in vb4.2.0 , and not present in 4.1.x , don't know what is the reason
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01968 seconds
  • Memory Usage 1,939KB
  • 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
  • (3)bbcode_php
  • (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