Skip to main content

Posts

Creating Joomla Component Submenus

Simply we can add joomla component sub menu using component installation xml file. For that you need to include fallowing xml elements in your xml file inside com installation zip file. Main Menu Name/Component Name Menu Item 1 Menu Item 2 Menu Item 3 Menu Item 4 Menu Item 5 if some one need to add additional sub menus when already installed component you can add those using simple direct DB insert operation. Steps: 1. Go to the joomla database. 2. Select "DBfrefix_components" table. 3. Get component id by doing some search for "name" column and select its "id". 4. Now add your desired sub menu as fallow. INSERT INTO `jos_components` (`id`, `name`, `link`, `menuid`, `parent`, `admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`, `iscore`, `params`, `enabled`) VALUES (1, 'Main Menu Name/Component Name', 'option=com_componentname' , 0, 0,'option= com_componentname', 'Main Menu Name/Component Name', ...

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...

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.

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_...

Today is Asala poyaday for Sri lankans

King Dutumanu sang this song day like today. Obe Namin Saya Badimi Vimanayen Basinu Manawi Swarnamaliye Roobara Swarnamaliye Una Neela Varna Varala Dale Mal Gavisi Liye Naga Indrachapa Debama Asin Viduli Mawana Liye Mana Lamada Kinihiri Pethi Rathna Thilaka Paladi Liye Sinasisi Vimanayen Basinna Swarnamaliye Athe Gigiri Nada Salaba Nura Hadin Hadana Liye Kare Padma Kakulu Mala Hansa Thudin Thalena Liye Kane Thodu Mini Gana Ran Muna Opaya Karana Liye Pama Novi Vimanayen Basinna Swarnamaliye Balachandra Patu Nalalatha Kalka Adun Adina Liye Aaala Vadan Dantha Kakulu W.D Amaradewa

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...

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 According to template According to Position According to Type 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: 6...