Changeset 6413


Ignore:
Timestamp:
May 28, 2010, 10:41:14 PM (10 years ago)
Author:
patdenice
Message:

Themes can define their own rv_menutree_categories.tpl

Location:
extensions/rv_menutree/trunk
Files:
5 added
2 deleted
2 edited
3 moved

Legend:

Unmodified
Added
Removed
  • extensions/rv_menutree/trunk/changelog.txt

    r6389 r6413  
    552.1.a
    66        - compatibility with piwigo 2.1
     7
     82.1.b
     9        - themes can define their own rv_menutree_categories.tpl
  • extensions/rv_menutree/trunk/main.inc.php

    r6408 r6413  
    11<?php /*
    22Plugin Name: RV Menu Tree
    3 Version: 2.1.a
     3Version: 2.1.b
    44Plugin URI: http://piwigo.org/ext/extension_view.php?eid=238
    55Description: Replaces the categories in the menu bar with a nicer one (javascript).
     
    5353                global $template, $page;
    5454
    55                 $dirname = dirname(__FILE__);
    56 
    57                 $block->template = $dirname.'/menubar_categories.tpl';
    58 
    59                 $template->assign('rvmt', array(
    60                         'PATH' => get_root_url().'plugins/'. basename($dirname).'/',
    61                         'CSS' => str_replace( 'url(', 'url('.get_root_url().'plugins/'.basename($dirname).'/',file_get_contents($dirname.'/rvtree-min.css')),
    62                         'UPPER_IDS' => isset($page['category']['uppercats']) ? array_flip( explode(',', $page['category']['uppercats'])) : null,
     55                $rvmt_path = get_root_url().'plugins/'. basename(dirname(__FILE__)).'/';
     56                $template->set_template_dir($rvmt_path.'template/');
     57                $template->assign(array(
     58                        'RVMT_PATH' => $rvmt_path,
     59                        'RVMT_UPPER_IDS' => isset($page['category']['uppercats']) ? array_flip( explode(',', $page['category']['uppercats'])) : null,
    6360                        )
    6461                );
     62                $block->template = 'rv_menutree_categories.tpl';
    6563        }
    6664}
  • extensions/rv_menutree/trunk/template/rv_menutree_categories.tpl

    r6408 r6413  
    1 {known_script id="rvtree" src=$rvmt.PATH|@cat:"rvtree-min.js" }
     1{known_script id="rvtree" src=$RVMT_PATH|@cat:"js/rvtree-min.js" }
    22{html_head}
    33<style type="text/css">
    4 {$rvmt.CSS}
     4ul.rvTree li .bullet {ldelim}padding-left:14px;margin-left:0;background:url({$RVMT_PATH}img/bpm.gif) no-repeat scroll;}
     5ul.rvTree li.liOpen .bullet {ldelim}cursor:pointer;background-position:-38px center;}
     6ul.rvTree li.liClosed .bullet {ldelim}cursor:pointer;background-position:-19px center;}
     7ul.rvTree li.liBullet .bullet {ldelim}cursor:default;background-position:0 center;}
     8ul.rvTree li.liClosed ul {ldelim}display:none;}
    59</style>
    610{/html_head}
     
    3337        {/if}
    3438        {if $cat.count_categories > 0}
    35                 {if isset($U_STOP_FILTER) or isset($rvmt.UPPER_IDS[$cat.id])}
     39                {if isset($U_STOP_FILTER) or isset($RVMT_UPPER_IDS[$cat.id])}
    3640                        {assign var=liclass value=$liclass|@cat:'liOpen'}
    3741                {else}
Note: See TracChangeset for help on using the changeset viewer.