Posts Categorized: Frameworks/CMS

Magento Admin Menus

Posted by & filed under Magento.

Add a menu item to the top level admin menu Take a look at the Magento core file for CMS item is defined in app/code/core/Mage/Cms/etc/adminhtml.xml. Add a menu item as a child under an existing top level menu Take a look at another core file for the Wigets item of the CMS menu is defined… Read more »

Magento translate renderTotals()

Posted by & filed under Magento, PHP.

I had an issue where Magento was not picking up translation of “Free Shipping – Free” on my Checkout page. I got round this by adding a function inside /app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php inside the collect() function:

Foreign key restraints

Posted by & filed under Magento, mySQL.

Trying to import a Magento table into a database (drop table if exists) I got an error: The way to get round this is to remove the foreign key constraint CHECK, delete the table, then add the check again:

Zend Framework Application.ini Cheat Sheets

Posted by & filed under Zend Framework.

DESPATCH Here’s a link to a PDF detailing despatch process, NOT ZF2.x. APPLICATION.INI STANDARD METHODS

Moving a WordPress database to another domain

Posted by & filed under Wordpress.

Here are the SQL queries to update a WordPress database from one domain to another: # define var for old site SET @old_path = ‘’ COLLATE utf8mb4_unicode_ci; # set var for new site SET @new_path = ‘’ COLLATE utf8mb4_unicode_ci; UPDATE wp_options SET option_value = replace( option_value, @old_path, @new_path ) WHERE option_name = ‘home’ OR option_name… Read more »

Parsing WordPress wp-config.php file

Posted by & filed under OOP, Wordpress.

I need a script to extract the database details from the wp-config.php file so I could keep the logon details in one location when I was coding something outside the WP framework. I came up with a class that does this, connects to mysql and selects the database. There are three connection options: PDO, mySQLi… Read more »

WordPress XML-RPC publishing

Posted by & filed under Wordpress.

Well I thought I would try XML-RPC publishing in a WordPress blog. The main advantage I see in using RPC vs. email publishing is the use of font–styles. It also works with my SyntaxHighlighter plugin… I’m using the ScribeFire plugin for Firefox to write this blog, but Microsoft Live Writer looks like a good desktop… Read more »

Making a feed from Joomla Category

Posted by & filed under Joomla.

Use the following link and just change the category id: index.php?option=com_content&view=category&id=1&format=feed&type=rss See this link… there might be a better way in Joomla 1.5.22+ but this works fine. Link

WordPress permissions or ownership

Posted by & filed under Linux, Wordpress.

I was recently trying to upload a plugin to WordPress and found that the plugin could not create a directory. The problem was not directory permissions – it was user/group ownership. PHP running as fastCGI is running as user nobody on my VPS. I tried changing directory perms to 777 for wp-content/uploads and wp-content/plugins but… Read more »

Editing Joomla Modules

Posted by & filed under Joomla.

It’s useful to know that you can easily hack a Joomla module by opening the relevant module in the /modules directory. Edit the XML file for admin panel entries. Edit the mod_xxx.php file and the helper.php files for the PHP, or edit the file in the tmlp directory for the page HTML. Realy simple!