Welcome, Guest
Username: Password: Remember me

TOPIC: Menu item component

Menu item component 22 Dec 2011 05:27 #752

  • Maujb
  • Maujb's Avatar
  • Offline
  • Junior Member
  • Posts: 27
  • Thank you received: 2
  • Karma: 2
Hi Guys,

With this wonderful software (Cook) I might be able to find a solution to menu editing.

I am thinking on design a table that has the same menu structure of the Joomla Menus and then create a front end view to allow me edit/manage menus from the front end.

I think as the table menus already exists in the database it won't get installed from my component but will use the one installed already. Is it correct?

Could anyone with more experience using Cook, tell me if you think it is going to work? Is there any security risk?

I actually don't intent to change anything on Joomla's default menus, just want to use the same table. If I can do this, any change I do in the front end using my Cook component, will be reflected in the backend standard menu administration and any change done in the back will reflect in the front en in my Cook component.

Is it a good idea? Do you think it is going to work?

Thanks

(So sorry, I accidentally posted in the wrong category)
Last Edit: 22 Dec 2011 05:29 by Maujb.
The administrator has disabled public write access.

Re: Menu item component 23 Dec 2011 00:30 #753

  • Maujb
  • Maujb's Avatar
  • Offline
  • Junior Member
  • Posts: 27
  • Thank you received: 2
  • Karma: 2
Hi all,
Any Comments?
The administrator has disabled public write access.

Re: Menu item component 23 Dec 2011 11:06 #756

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Do you mean a menu only for your component ?
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Menu item component 23 Dec 2011 12:03 #757

  • Maujb
  • Maujb's Avatar
  • Offline
  • Junior Member
  • Posts: 27
  • Thank you received: 2
  • Karma: 2
Hi Admin,
No I mean the component that I am planing to create with cook to affect my menu items.

I mean, joomla does not allow to edit/delete/create menu items from the front end so I am planning create a component with cook that uses same menus table as joomla. Then I will create a front end view for the my component to allow me to edit my joomla's menus in tb front end.

With your experience, do you think it is going to work? Is it a good idea?
Thanks
The administrator has disabled public write access.

Re: Menu item component 23 Dec 2011 12:28 #758

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Ok,

This is a database hack.

If you look carefully the menu table structure, you can see 'level', 'lft' and 'rgt' fields.
When you see theses names, you are sure you cannot HACK the table easily.
Left, Right and Level are system fields for hierarchical system (Nested system)


If you add an entry in this table, you destroy everything. Did you tried ?

In future version of Cook, the Nested table will be handled, and maybe such hacks possible.
BUT BE VERY CARFULL !!


I think you can realize your component using derectly the MVC of the menu component.


Add some includes to load the model, and the table files related to com_menu.
Try to understand how com_menu works, and copy the essential actions, functions... in your component.
The most important is to use com_menu data access functions (should be in model, and table files. I didn't have a look yet)

A review of your experience will be very appreciated.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.087 seconds

Get Started