Allow access from multiple IPs

Sometimes you’re working in a network that has multiple external IP’s that are multiplexed. So for Typo3 your IP seems to change with nearly every click. With the default configuration you’ll be kicked out every now and then. To get rid of this problem, you can add the following snipped to your /typo3conf/lLocalConfiguration.php or /typo3conf/AdditionalConfiguration.php: […]

Create a SSH key with 1024 Bit encryption

To generate a 1024 Bit encrypted SSH key you can use the following command: $> ssh-keygen -b 1024 -t rsa Normally the key is saved in ~/.ssh/id_rsa together with the corresponding public key (~/.ssh/id_rsa.pub). Attention: Make sure you can remember the paraphrase later on if you entered one.

Run PHP script with parameters within another PHP script

Recently I had to call a PHP script within another script with some arguments. Normally you pass these parameters by GET or POST. But how to do it within another script? Here is how to run PHP script with parameters within another PHP script: //set arguments $_SERVER[‘argv’][1] = ‘-action’; $_SERVER[‘argv’][2] = ‘unsetMaintenanceMode’; $_SERVER[‘argv’][3] = ‘-initRedis’; $_SERVER[‘argv’][4] […]

Magento – Put Category-IDs into category tree in backend

To show the category IDs in the category tree under Catalog->Categories->Manage Categories you can rewrite Mage_Adminhtml_Block_Catalog_Category_Tree in an own module. You have to rewrite the method buildNodeName like this: /** * Get category name * * @param Varien_Object $node * @return string */ public function buildNodeName($node) { $result = $this->escapeHtml($node->getName()); if ($this->_withProductCount) { $result .= ‘ (‘ . $node->getProductCount() […]

Magento – Define default values in config.xml

You can define system config value defaults in your modules config.xml like that. <?xml version=”1.0″?> <default> <myconfig_group> <settings> <test>1</test> <cronjobs>0</cronjobs> <client>0813</client> <serviceprovider>117</serviceprovider> <pricelist></pricelist> </settings> <productexport> <lux_kategorie>21</lux_kategorie> <store_view_german>1</store_view_german> <store_view_english>12</store_view_english> </productexport> </myconfig_group> </default> This sets the default value for all stores. If you want to set default values for a special store (scope), you can do it […]

Own Router or Controller

To get an own ActionController that can be called like this: http://www.mysexydomain.de/nicefrontname/nicecontrollerprefix/niceactionprefix/ … you have to add the following snippet into the FE or BE section of your config.xml: <frontend> <routers> <sns_documentmaster> <use>standard</use> <args> <module>SNS_Documentmaster</module> <frontName>nicefrontname</frontName> </args> </sns_documentmaster> </routers> </frontend>