Turn on Joomla error reporting to FULL in configuration.php
var $error_reporting = ‘-1’; // NONE var $error_reporting = ‘2048’; // FULL
var $error_reporting = ‘-1’; // NONE var $error_reporting = ‘2048’; // FULL
/libraries/joomla/html/parameter/element http://docs.joomla.org/Tutorial:Template_parameters
PHP mysql_connect for UPDATE example mysql_select_db(“database”, $con); $result = mysql_query(“ALTER TABLE jos_acajoom_subscribers ADD interested_in varchar(200); “); if (!$result) { die(‘Invalid query: ‘ . mysql_error()); } mysql_close($con) Joomla MYSQL loadResult example global $database; $sql = ‘SELECT title FROM #__categories’; $database->setQuery( $sql
Illegal characters in MYSQLdump solution: use php or command line to export mysql database as latin1 : <?php exec(“mysqldump –default-character-set=latin1 -uUSERNAME -pPASSWORD DATABASE > DATABASE.sql”); ?> open in editor and Find/Replace latin1 to utf8 then import using web interface or
Magento – display product attributes in category list page Say you’ve added ‘brand’ as an attribute and added it to the Default attribute set (make sure the attribute is visible in the frontend). Then add this: From http://www.magentocommerce.com/boards/viewthread/19215/ <?phpecho $this->htmlEscape($_product->getData(‘brand’));
Magento admin page xxx.com/index.php/admin gives 404 error. SET FOREIGN_KEY_CHECKS=0; UPDATE `core_store` SET store_id = 0 WHERE code=’admin’; UPDATE `core_store_group` SET group_id = 0 WHERE name=’Default’; UPDATE `core_website` SET website_id = 0 WHERE code=’admin’; UPDATE `customer_group` SET customer_group_id = 0 WHERE
Fix the Magento Database import error : Can’t create table ‘api_session.frm’ (errno: 150). the problem is caused by having ENGINE=InnoDB in lines for foreign keys. edit the file and do a find/replace for “ENGINE=InnoDB” to remove them. Make sure to
Joomla countModules function <?php if ($this->countModules( ‘user1’ )) : ?> <div id=”image_division”><jdoc:include type=”modules” name=”slider_image” style=”xhtml” /> </div> <?php endif; ?>
Joomla default menu (homepage), view, option variables in index.php // if a section set background body type for background image $menu = &JSite::getMenu(); // echo the menu item nameecho $menu->getActive()->name;echo $menu->getActive()->id; // id number if ( JRequest::getCmd(‘view’) === “section” )
Obtain Joomla Base URL in index.php template file Use : echo $this->baseurl; eg. <img src=”<?phpecho “$this->baseurl/images/some_special_file.jpg”;?>