Tuesday, November 24, 2009

htacess to redirect url to www

Below is the .htacess code for redirecting the url request to www.
RewriteEngine On


RewriteCond %{HTTP_HOST} ^abdulbasitnawab.com [NC]
RewriteRule ^(.*)$ http://www.abdulbasitnawab.com/$1 [L,R=301]

Thursday, October 29, 2009

Changing charater set in mysql

If we have stored the values in the tables in other languages than english then while selecting use this mysql query to convert the charset
"SET CHARACTER SET 'utf8'"

Saturday, October 10, 2009

Zen Cart -linking a static page created with EZ pages

use the following function to link the page created with ez pages
PHp code echo zen_ez_pages_link(page ID, chapter number, page is SSL [true/false], open new window [true/false], return full url [true/false]); EO PHPCODE

i found this link usfull

http://tutorials.zen-cart.com/index.php?article=251

http://tutorials.zen-cart.com/index.php?article=234

http://tutorials.zen-cart.com/index.php?article=117

Friday, October 9, 2009

Word Wrap in css breakwords using css divs and using truncate function of zencart

Hi
if there is long word (with no space) it will cause the layout of the site look ockward use the css style mentioned below to solve this issue
position:relative;margin-top:10px; width:600px; overflow:hidden; word-wrap:break-word;

Zencart truncate function zen_trunc_string($stores->fields['pages_html_text'],400)

Monday, September 7, 2009

authorization of new component in Joomla

If u have created a new administrator component in joomla it will not be authorized till u add it in the libraries/joomla/user/authorization.php
add the code like
$this->addACL( 'com_newcomponent', 'manage', 'users', 'administrator' );
$this->addACL( 'com_newcomponent', 'manage', 'users', 'super administrator' );

Saturday, August 8, 2009

joomla path to base directory

The variable that contains the path to the root directory of the joomla is
$mosConfig_absolute_path.

Sunday, August 2, 2009

show tags with posts in wordpress

use this code in the template file where the tags r to be displayed

echo get_the_tag_list('

Tags: ',', ','

');

http://codex.wordpress.org/Function_Reference/get_the_tag_list