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 add a new column to vtiger existing table

When we add a new column to existing vtiger table, we need do more than just adding a column to selected vtiger table. If you do so, you may unable to do some DB operation like insert update and deleted. This is the way how we can do this. 1. Add a new column to selected table as normal 2. Add a new row to "vtiger_field" table as fallow "insert into vtiger_field values (tabid, fieldid, columnname, tablename, generatedtype, uitype, fieldname, fieldlabel, readonly, presence, selected,maximumlength, sequence, block, displaytype, typeofdata, quickcreate,quickcreatesequence, info_type)" When you set a value to "presence" field be make sure to select 0 or 2. Otherwise your selected field not populated with vtiger field list.

Updating Vtiger Email module for sending Fax and SMS

Most of the time vtiger users searching modules for sending Fax and some time SMS to their customers. Actually writing a separate module for sending Fax may be a time consuming work. So that here I am going to explain how extend possibility of vtiger Email module to send Fax. If you good enough to understand this process, you can update this module to send SMS also. For sending emails we are normally using our own SMTP server. But we have to use some commercial API to send FAX and SMS. In here lets we select two commonly use APIs like "Interfax" and "clickatell" to send Fax and SMS. These APIs are providing email supported APIs to send Fax and SMS. That is why we can use vtiger Email module to send Fax and SMS. From this post I am not going to explain step by step who to hack Email module to send Fax and SMS because it is not a stride forward process. Actually I want to explain that we can use Vtiger Email module to send Fax and SMS other than sending emails aft...

Understanding Joomla URLs and Itemids

One of the most? frequently asked questions on the Joomla forums is "What is the Itemid and what does it do?". Its something that frustrates even experienced developers ... witness the post called " Damn you, infernal item IDs!!! " on WhyJoomla.com . I thought a quick tutorial would be useful and along the way we can break down other aspects of Joomla URLs. An Example Joomla URL and Itemid Let's use a news item called "Joomla Weekly News Magazine Issue 10" written by Brian Teeman. If you navigate to this news item via Joomla.org, you can see this URL in the browser bar: http://www.joomla.org/content/view/2985/33/ You see this because inside the administrator section of Joomla.org, Search Engine Friendly URLs have been turned on (Site => Global Configuration => SEO => Search Engine Friendly URLs = Yes) . Its a shorter version of the real URL produced by Joomla: http://joomla.org/index.php?option=com_content&task=view&id=2985&Itemid...