New Relic supports the following list of PHP frameworks.
- Drupal 6 and 7
- WordPress
- CakePHP 1.2, 1.3 and 2.*
- CodeIgniter 2
- QDrupal
- Joomla 1.5 and 1.6
- Symfony 1
- Yii
- Zend Framework 1
- Magento 1.5 and 1.6
- MediaWiki
- Kohana
If you are monitoring a Drupal website, you will find the module tab on the Application menu.
Continue reading New Relic – Enable Drupal module monitoring →
We can use the qtrans_getLanguage() to get the current language of a WordPress website.
if (qtrans_getLanguage() == 'en') {
// english
} elseif (qtrans_getLanguage() == 'zh') {
// traditional chinese
}
Done =)
Reference: How to Get Current Language Code by Using qTranslate Plugin of WordPress
I found a very good WordPress plugin which could replace the built-in WordPress comment box with Facebook comment. It is developed by Fat Panda. Search the term Fat Panda in the Add Plugin page.
Continue reading WordPress – Replace the built-in WordPress comment by Facebook comment →
I was working on a WordPress project which i need to clear the PHP session when the browser or browser tab is closed. Although Javascript provides the window.onbeforeunload event but it will be triggered even whenever you leave the website. Finally i got a simple solution from Daniel Melo in StackOverflow. The following code required jQuery and i have included the Google one in the HTML.
In your web root, create the js/check_browser_close.js. Continue reading jQuery & Javascript – Capture the Browser or Tab Closed Event →
I just realized that the <hr /> divider line is not longer working in wordpress.com. Luckily i find a very good post which has several pieces of HTML codes to add the divider in WordPress post.
Solid Line
–
<div class="aligncenter" style="width:400px;height:0;border-top:2px solid #FF7500;font-size:0;">-</div>
Continue reading HTML – Some Useful Divider Lines →
Add the following code under the top PHP opening tag of wp-config.php.
<?php
if (!session_id()) {
session_start();
}
...
We can now make use of the $_SESSION[] in WordPress. The reason of putting the session_start() in wp-config.php is because this configuration file will not be overwritten during a WordPress update.
Thanks Frank Verhoeven.
Done =)
Reference: Frank Verhoeven – Using Sessions in WordPress
Updated @ 2012-08-02: Please note that their maybe security issue of using the PHP session. For more information, please refer to the following link.
PHP $_SESSION variables
Dream BIG and go for it =)