Skip to main content

Hacking joomla core (categorize joomla modules under assigned menu)

Most of the time we have to face many difficulties search specific joomla modules that assigned to specific menu item. Currently (joomla 1.5x) joomla provide categorization of modules under fallowing four way
  1. According to template
  2. According to Position
  3. According to Type
  4. According to State
My new modification will add another categorization for module as According to assigned menu. This is simple add stride forward.

Step 01:
Go to administrator\components\com_modules\toolbar.modules.html.php and past as fallow
Existing one (line 49)
echo $lists['assigned'];
echo $lists['position'];
echo $lists['type'];
echo $lists['state'];
After modified
echo $lists['assigned'];
echo $lists['position'];
echo $lists['type'];
echo $lists['state'];
echo $lists['menu'];

Step 02:
Go to administrator\components\com_modules\toolbar.modules.html.php and add fallowing(After line: 64)
$filter_menu = $mainframe->getUserStateFromRequest( $option.'filter_menu','filter_menu','','cmd' );

Go to administrator\components\com_modules\toolbar.modules.html.php and add fallowing(After line: 95)

if ( $filter_menu ) {
$where[] = 'mm.menuid = '.$db->Quote($filter_menu);
}

Go to administrator\components\com_modules\toolbar.modules.html.php and add fallowing(After line: 174)

$query = 'SELECT id AS value, name AS text'
. ' FROM #__menu';
$db->setQuery( $query );
$menu[] = JHTML::_('select.option', '0', '- '. JText::_( 'Select Menu' ) .' -' );
$menu = array_merge( $types, $db->loadObjectList() );
$lists['menu'] = JHTML::_('select.genericlist', $menu, 'filter_menu', 'class="inputbox" size="1" onchange="this.form.submit()"', 'value', 'text', "$filter_menu" );

now that is enough.

Before modification:

After modification:




Comments

  1. I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.You can also visit our site.
    joomla extensions

    ReplyDelete

Post a Comment

Popular posts from this blog

How to extract vtiger DB data

Here is the code sample how extract data form vtiger DB with WHERE close. Sample:1 require_once('include/DatabaseUtil.php'); global $adb; $tabid = array('9','16'); $sql = "SELECT tabid, fieldname, fieldid, fieldlabel,columnname, tablename, uitype, typeofdata, presence FROM vtiger_field WHERE tabid in (" . generateQuestionMarks($tabid) . ")"; $result = $adb->pquery($sql, array($tabid)); // get result $noofrows = $adb->num_rows($result); // get number of rows $i=0; $data=array(); while($resultrow = $adb->fetch_array($result)) { $tabid=$resultrow['tabid']; $resultrow=['fieldlabel']; $data[$i]=array($tabid, $resultrow); } Sample:2 require_once('include/DatabaseUtil.php'); global $adb; $query = 'select idlists,from_email,to_email,cc_email,bcc_email from vtiger_emaildetails where emailid =?'; $result = $adb->pquery($query, array($focus->id)); $from_email = $adb->query_result($result,0,'from_...

Ananda

Current Software Engineer at LM Jinasena and Company (PVT) LTD Past Software Engineer at Archmage (PVT) LTD Trainee software Engineer at Respere ( Sahana Company ) Education Faculty of Information technology, University of Moratuwa ( http://www.mrt.ac.lk/ )- 2005/2006 batch Dammissara National school Naththandia (2004-Maths section) Websites My Blog Facebook Ananda’s Summary I am a graduate of Faculty of Information technology University Of Moratuwa and keen on web development field and specialized on IT management. Ananda’s Specialties: Technology: Pervasive computing, mobile backend solutions, mobile solutions, GIS, neo-geography, Location based services, Web 2.0, Social web,FOSS, Disaster Management Solutions Organizational: Strategic Planning, Project Management, Business Development, New Product strategy Ananda’s Experience Software Engineer, LM Jinasena and Company (PVT) LTD L M Jinasena and Company (PVT) LTD Aug 2010 — Present Software Engineer, Archmage (PVT) LTD Archmage (...

Terminal Hand Book (Ubuntu)

Introduction In traditional UNIX environment using CLI (Command Line Interface) is more interesting and powerful other than using GUI. Specially if some one have to work with UNIX server edition without GUI he has to face big difficulty if he is poor with CLI. With new versions of ubuntu it is providing GUI interface to replace CLI commands. Any way still there are some hidden terminal commands that forgot to GUI, so that having good knowledge of CLI is important. 1. Commands for configure softwares Description Command Install software sudo apt-get install [PackageName] Install ALL the required components using 1 single command sudo tasksel Run .sh (shell commands) files sudo sh filename.sh 2.Monitor Ubuntu software processes Description Command List all process currently running ps aux List selected packge's processes ps aux | grep [package name] many more 3.Common File Operations Description Command Rem...