php - Joomla com_user extending similar to com_categories and com_content -


ok feel should ask not find reference in kind of documentation, , reading through actual code figure out best way accomplish take far longer hope spend.

when enter article manager have navigation link category manager , vice versa. similar component , default user manager.

i have profile plugin extend users suit needs, configuration of seamless adjusting com_user component integrate better component looking for.

so question com_content , com_categories use "extension" parameter. possible add similar functionality without full core override of com_users? if full override there chance of extensions not working due reliance on users.

i willing clarify if not make sense, question more see extent can "extend" joomla without overrides.

update:

i have found cool technique, not quite answer though. can override list controller/model/view in component, , if based off of current com_users component can make direct integration. edits need making sure routes users view instead pass component.

there 1 issue however, when add new user or edit one, once finish direct main user manager. system plugin may if there reliable way detect when user edited through component, rather users manager.

note: problem adding override user view has 5-6 other mvc components relies on, in interest of making easy update core com_users updates best avoid if @ possible.

another thing needed make sure find language file com_users , add entries component.

i feel there may still better answer out there, doing way not impact core much, , easy update updates com_users.

i opening bounty on this, feel of every question ever asked 1 have benefit community. here condensed version of question.

what easy way integrate core component custom component , have route through component seamlessly least edits core component.

i'm not clear on want if you're talking toolbar submenu's in com_content:

com_content submenu

the example give of categories (i.e. com_categories) specific support added can pass in link com_catgories extension identifier (the extension=com_mycomponent) , load sidebar menu extension. core categories can shared amongst various components [see add categories].

you may aware of following, but, if want know how add sidebar menu components manager view can call jhtmlsidebar::addentry($title, $link, $active);

typically put in extensions primary helper file in function called addsubmenu($vname) (which & com_categories display toolbar sub-menu). its called addsubmenu() because sidebar morphed being toolbar submenu in previous versions of joomla.

e.g. addsubmenu() method in contenthelper class defined in administrator/com_content/helpers/content.php

/**  * configure linkbar.  *  * @param   string  $vname  name of active view.  *  * @return  void  * @since   1.6  */ public static function addsubmenu($vname) {     jhtmlsidebar::addentry(         jtext::_('jglobal_articles'),         'index.php?option=com_content&view=articles',         $vname == 'articles'     );     jhtmlsidebar::addentry(         jtext::_('com_content_submenu_categories'),         'index.php?option=com_categories&extension=com_content',         $vname == 'categories');     jhtmlsidebar::addentry(         jtext::_('com_content_submenu_featured'),         'index.php?option=com_content&view=featured',         $vname == 'featured'     ); } 

by comparison com_categories helper class categorieshelper has different addsubmenu() method looks calling extensions core helper class (if 1 isn't found defaults com_content).

there isn't support in com_users have create system plugin fires onafterroute , adds submenu item based whether or not component has provided suitable parameter, extension=com_myextension. bit of swizzle should work — the thing adding submenu item before component dispatched new submenu item first item in com_users submenu. wouldn't complete replacement com_categories supports.

unfortunately there aren't triggers in com_users can find of in swizzling entire sidebar menu.

the next option use donald gilbert's gist create system plugin allows override core class creating substitute version of own — obviously have issues significant updates if you're careful limit override specific situation.

if thats not enough/overkill may want try system plugin responds onafterdispatch @ point have page before returned browser , hack html, thats ugly , prone breaking if users change admin template.

of course, wrong , theres better way in 3.x. maybe else chime in.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -