menuList: change output

16 years 9 months ago #41407 by ndee
menuList: change output was created by ndee
Hi,

for usabiltity reasons we decided to get rid of all redundant menu entries. I changed the display type from menuBar to menuList. The default output looks like:

[code:1]
MENUNAME Link Submenu1
Link Submenu2
MENUNAME2 Link Submenu1
...[/code:1]

I don't want to display the MENUNAMES. Which worked when I removed the placeholders for translation. Now I have just the Submenus BUT just vertical ... I need horizontal output :)

I found the class cbMenuTabList extends cbMenu which formats the output. I modified it to do a horizontal output. The menu looks like I want BUT also statistics got modified and are messed up now.

So, please any idea how I can print the statistics with normal menuList and the Edit, Connections, Moderation menus with my modded cbMenuTabList?

###################
SPEED UP HELP, read first: Help us help you
###################

Please Log in to join the conversation.

16 years 9 months ago #41412 by Deinticker
Replied by Deinticker on topic Re:menuList: change output
I have a question too. How to get the links from cbmenu for send massege, add friend etc. I want this links out off the menu...Please tell my how

Please Log in to join the conversation.

16 years 9 months ago #41415 by ndee
Replied by ndee on topic Re:menuList: change output
Hello Deinticker,

what I did is a little bit ugly but it works more or less (see above).

1. Go to Components / Community Builder / Plugin Management
2. Edit CB Menu Plugin switch to menuList
2.1 refresh page to see results

3. Make a backup of cb.menu.php in com_comprofiler/plugin directory
3. Open cb.menu.php
4. find comments //
EDIT MENU
etc.
5. search for var $mi and remove the language placeholder for the Menu Name

e.g.
[code:1]
// Manage My Connections
$mi = array(); $mi["_UE_MENU_CONNECTIONS"]["_UE_MENU_MANAGEMYCONNECTIONS"]=null;
$this->menuBar->addObjectItem($mi, _UE_MENU_MANAGEMYCONNECTIONS,sefRelToAbs($ue_manageConnection_url), "",
"","", _UE_MENU_MANAGEMYCONNECTIONS_DESC,""«»);

// TO

// Manage My Connections
// MYMOD removed manage connections placeholder _UE_MENU_CONNECTIONS
$mi = array(); $mi[""]["_UE_MENU_MANAGEMYCONNECTIONS"]=null;
$this->menuBar->addObjectItem($mi, _UE_MENU_MANAGEMYCONNECTIONS,sefRelToAbs($ue_manageConnection_url), "",
"","", _UE_MENU_MANAGEMYCONNECTIONS_DESC,""«»);[/code:1]

Not a very nice solution but maybe some developer can light me the right way :)

greets
andy

###################
SPEED UP HELP, read first: Help us help you
###################

Please Log in to join the conversation.

16 years 8 months ago #41960 by carlaf
Replied by carlaf on topic Re:menuList: change output
I was looking for some way to disappear with the title, but you forgot something...
after removing all this info you still have the table creating double <td> one for the title and one for the link.
so is just go up to line 614.
/****** CSS/JS Best Menu classes: *******/

and delete:
[code:1]
$ret .= "ttt<tr>ntttttt";
$ret .= "<td class="sectiontableentry".($idCounter&1 ? 1 : 2)."" width="35%" style="font-weight:bold;">";
if (!isset($cbMenuTabListLastTopName) or ($this->topName != $cbMenuTabListLastTopName)) {
$cbMenuTabListLastTopName = $this->topName;
$ret .= getLangDefinition($this->topName);
} else $ret .= " ";
[/code:1]

Post edited by: carlaf, at: 2007/08/01 20:10

Please Log in to join the conversation.

16 years 8 months ago #42057 by ndee
Replied by ndee on topic Re:menuList: change output
Hi carlaf,

that's exactly the problem i mentioned above. If you do this also your Statistics (Last login, views, ...) will be cut off.

The function displayMenuItem($level, $idCounter) handles statistics and menu display. If you modify something here also your statistics will get modified.

Therefore I hope somebody can give me a hint how to modify the menu without messing up other parts.

Greets,
andy

###################
SPEED UP HELP, read first: Help us help you
###################

Please Log in to join the conversation.

16 years 7 months ago #44366 by carlaf
Replied by carlaf on topic Re:menuList: change output
hey andy, sorry i didn't see you replay....
yes it's true about the userstatus (i didn't see it before because I'm not using this tab)
well, I found another way to delete the menu title...

after using your step by step is just go to (line 615) right below function displayMenuItem($level, $idCounter) {
where says:
[code:1]
$ret .= "<td class=\"sectiontableentry".($idCounter&1 ? 1 : 2)."\" width=\"35%\" style=\"font-weight:bold;\">";[/code:1]

1- and delete:
" width=\"35%\



2- go to line 619 where says:
} else $ret .= "&nbsp;";

and delete:
&nbsp;

so line 615 will be:
[code:1]
$ret .= "<td class=\"sectiontableentry".($idCounter&1 ? 1 : 2)."\" style=\"font-weight:bold;\">";[/code:1]

and line 619 will be:
} else $ret .= "";

Post edited by: carlaf, at: 2007/08/29 16:07

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.335 seconds

Facebook Twitter LinkedIn