Members: 16,996
Threads: 38,845
Posts: 159,389
Online: 20

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Development > Module 'How Do I' Questions

Reply
 
LinkBack Thread Tools Display Modes
Old 19.04.2004, 19:22   #1 (permalink)
Baby Mamber
 
bela's Avatar
 
Join Date: Apr 2004
Posts: 2
bela is on a distinguished road
Question dTree Module -> getting it to properly work with Mambelfish?

Hi,

Does anyone know how to make the dTree menu module work with the Mambelfish multilanguage option?
For some reason the menu doesnt change the language with the site. The original menu offcourse works.
Any ideas?

Regards,

Bela
bela is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 21.04.2004, 00:08   #2 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 5
dajo is on a distinguished road
Default Re: dTree Module -> getting it to properly work with Mambelfish?

Hi Bela

It is the same with the JSCookMenu I assume it loads the menu once from the database and doesn't reload it again (performance reason..?).

But I do not have a solution.

Daniel
dajo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21.04.2004, 19:08   #3 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 1
lmitro2004 is on a distinguished road
Default Re: dTree Module -> getting it to properly work with Mambelfish?

Hi,
I'm not familiar with DTree, but for JSCook extensions, find the line in your template's index.php:

foreach ($subs[$row->id] as $sub) {

and insert the lines below:

if ($mosConfig_mbf_content) {
$sub = MambelFish::translate( $sub, 'menu', $mosConfig_lang);
}


Hope this helps.

Take care,
Laurel
lmitro2004 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06.05.2004, 00:33   #4 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 5
dajo is on a distinguished road
Default Re: dTree Module -> getting it to properly work with Mambelfish?

Hi Laurel

I tried that... but it doesn't work. It even gives me the message

"; defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>

on top of the page...

Is this correct: the mentioned code should be just after the line with comment "// third pass to insert sub-menu items"?

Thanks
Daniel
dajo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06.05.2004, 15:16   #5 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 5
dajo is on a distinguished road
Default Re: dTree Module -> getting it to properly work with Mambelfish?

I fixed the problem! Some wrong PHP code... ;-)

And I also fixed the problem with JSCook menu. The mentioned code needs to be adapted a bit but works now

Daniel

-----------------------------------------
<?php // Custom MainMenu extension...

global $database, $my;

$mymenu_content = <<<EOT
<SCRIPT LANGUAGE="JavaScript"><!--
var myMenu =
[
EOT;
$database->setQuery("SELECT * FROM #__menu WHERE menutype = 'mainmenu' AND published ='1' AND access <= $my->gid ORDER BY ordering");
$menus = $database->loadObjectList(); // mainmenu list
$subs = array(); // sub menus
// first pass to collect sub-menu items
foreach ($menus as $row) {

// MambelFish Extension to switch Language
if ($mosConfig_mbf_content) {
$row = MambelFish::translate( $row, 'menu', $mosConfig_lang);
}

if ($row->parent) {
if (!array_key_exists( $row->parent, $subs )) {
$subs[$row->parent] = array();
}
$subs[$row->parent][] = $row;
}
}
foreach ($menus as $row) { // second pass to insert main-menu items

// MambelFish Extension to switch Language
if ($mosConfig_mbf_content) {
$row = MambelFish::translate( $row, 'menu', $mosConfig_lang);
}

if ($row->parent == 0 && (trim( $row->link ) || array_key_exists( $row->id, $subs ))) {
$name = addslashes( $row->name );
$alt = addslashes( $row->name );
$link = $row->link ? "$row->link" : "null";
if ($row->type != "url") {
$link .= "&Itemid=$row->id";
}
$link_sef = "'".sefRelToAbs($link)."'";
$mymenu_content .= "\n ['<img src=\"$mosConfig_live_site/templates/controllingpoint/js/ThemeOffice/darrow.png\">','$name',$link_sef,null,'$alt'";
if (array_key_exists( $row->id, $subs )) {
$mymenu_content .= ',';
foreach ($subs[$row->id] as $sub) { // third pass to insert sub-menu items
$name = addslashes( $sub->name );
$alt = addslashes( $sub->name );
$link = $sub->link ? "$sub->link" : "null";
if ($sub->type != "url") {
$link .= "&Itemid=$sub->id";
}
$link_sef = "'".sefRelToAbs($link)."'";
$mymenu_content .= "\n ['<img src=\"$mosConfig_live_site/templates/controllingpoint/js/ThemeOffice/sections.png\">','$name',$link_sef,null,'$alt'";

if (array_key_exists( $sub->id, $subs )) {
$mymenu_content .= ',';
foreach ($subs[$sub->id] as $sub2) { // forth pass to insert subsub-menu items
$name = addslashes( $sub2->name );
$alt = addslashes( $sub2->name );
$link = $sub2->link ? "$sub2->link" : "null";
if ($sub2->type != "url") {
$link .= "&Itemid=$sub2->id";
}
$link_sef = "'".sefRelToAbs($link)."'";
$mymenu_content .= "\n ['<img src=\"$mosConfig_live_site/templates/controllingpoint/js/ThemeOffice/sections.png\">','$name',$link_sef,null,'$alt'],";
}
}
$mymenu_content .= "],";
}
}
$mymenu_content .= "],";
}
}

$mymenu_content .= "];\n";
$mymenu_content .= "--></SCRIPT>\n";

echo $mymenu_content;
?>
dajo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mambelfish Component -> how to use reactive Component 'How Do I' Questions 12 12.08.2004 20:48
sub menu under dtree menu dgs Mambo 4.5 'How Do I' Questions 5 10.04.2004 05:35
Mambelfish fperjuci Mambo 5.0 Wishlist 1 08.04.2004 01:42
upgrade 45. 105 Mambelfish to 45 106MBF malavision Mambo 4.5 'How Do I' Questions 2 07.04.2004 21:10


All times are GMT +2. The time now is 09:18.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.