• Hi

    I’m posting here because i have a problem with wp-dtree and WPML.
    All things work withe the main language of the site (French) but when we change the language, the tree won’t open when we clic on it.

    In the main language there is this :

    <!--
    try{
    /*WP-dTree: cat1 request was 'category/ramasseuse'. I found: '-3'*/
    
    cat1.openTo('-3', true);
    }catch(e){} //-->

    but in english this is the result :

    <!--
    try{
    /*WP-dTree: cat1 request was '/category/gatherers' */
    }catch(e){} //-->

    He didn’t find the requested category wich is
    cat1.a(-32,0,'Gatherers','','category/gatherers','','');

    I think this is maybe because of the ‘/’ before the name, but i don’t know how to fix it…

    http://ww.wp.xz.cn/extend/plugins/wp-dtree-30/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Lethys

    (@lethys)

    no one?

    Thread Starter Lethys

    (@lethys)

    Just a simple hack, it’s dirty but it works :

    if($args['opentoselection'] && isset($_SERVER['REQUEST_URI'])){
    
    			// si les premiers caracteres sont  '/es/' ou '/en/' (pour es et en)
    			if ( substr($_SERVER['REQUEST_URI'], 0, 4) == "/es/" or substr($_SERVER['REQUEST_URI'], 0, 4) == "/en/" )
    		{
    			$url =	substr($_SERVER['REQUEST_URI'], 3);
    		}
    			else
    		{
    			$url = $_SERVER['REQUEST_URI'];
    		}
    			$tree .= $opt['openscript'] . wpdt_open_tree_to($url,'', $tree) . $opt['closescript'];
    		}

    My website change with /es/ and /en/ that’s why it’s in the if.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WP-dTree] wp-dtree wpml don't work’ is closed to new replies.