Useful Drupal Skills

How to show a block only at front page or homepage?
1. Go to Administration » Structure;
2. Click ‘Add block’, and fill in “Add block”, and your code at “Add block”;
3. Under “Show block on specific pages”, Click “Pages on which this PHP code returns TRUE (experts only)”, and copy the folling code in the blank box:


Posted in Drupal. Comments Off on Useful Drupal Skills »

Change mangeto domain name

4 steps:
first, upload all files to your new web hosting;
second, restore your mysql database to your new one;
third, edit /app/etc/local.xml, and update to your new mysql database information, take care the following code:
(more…)

Posted in Magento. Comments Off on Change mangeto domain name »

How do I quickly delete all “Url Rewrite Management” urls in the magento database?

If your store is not live yet. Follow this:
1) Empty/Truncate core_url_rewrite table from Database.
2) Disable Permanent Redirects from Magento Backend.
3) Reindex Catalog URL Rewrites and all your URL’s will be corrected. (more…)

Posted in Magento. Comments Off on How do I quickly delete all “Url Rewrite Management” urls in the magento database? »

How to remove magento parent category path from sub category url

How to remove parent category path from sub category url?
Instance: http://www.eye4eyeglasses.com/eyeglasses/cheap-eyeglasses
I just want the category c url is http://www.eye4eyeglasses.com/cheap-eyeglasses

Edit /app/code/core/Mage/Catalog/Model/Url.php
Find around line 632 and change:

//if (null === $parentPath) {
//$parentPath = $this->getResource()->getCategoryParentPath($category);
//}
//elseif ($parentPath == '/') {
$parentPath = '';
//}
(more…)

Posted in Magento. Comments Off on How to remove magento parent category path from sub category url »

Zen-Cart Can not Run Admin

When visit zen-cart (V1.3.8a) amdin log in page, it shows:

Fatal error: Class ‘notifier’ not found in /home/myhost/public_html/myshop/includes/autoload_func.php on line 79

modify configure.php under admin/includes

define(‘DIR_FS_CATALOG’, ‘/home/myhost/myshop);  to   define(‘DIR_FS_CATALOG’, ‘/home/myhost/myshop/’);

Always best to run zc_install to build the configure.php files on a new site. Saves all kinds of wasted time troubleshooting needlessly.

 

 

Posted in Zen Cart. Comments Off on Zen-Cart Can not Run Admin »

Hostgator Web Hosting Questions & Answers

How to let Hostgator web hosting support PHP 5.3?

Shared and Reseller

We currently have 5.3.5 installed on all servers. A handler for PHP 5.3 is added to our shared and reseller servers for those who wish to utilize it. In order to utilize this handler, you will need to add the following code to your .htaccess file:

Action application/x-hg-php53 /cgi-sys/php53
AddHandler application/x-hg-php53 .php

(more…)

Posted in Web Hosting. Comments Off on Hostgator Web Hosting Questions & Answers »

Vbulletin 4 display different text for different visitor’s computer language

If the visitor is from USA, the visitor’s computer language is en-us, or en; if the visitor is from France, the language is fr; if this visitor is from China, the language is zh-cn…

Sometimes we do not want our vbulletin forum show certain content to some visitors from certain counries, say if the visitor is from China, we do not show adsense, otherwise, adsense is displayed. How  to do then?
(more…)

Posted in Vbulletin. Comments Off on Vbulletin 4 display different text for different visitor’s computer language »

X-cart v4.4.0 shows Customer Feedback at header

How to show Customer Feedback at header of detailed product page?
1. Go to skin/common_files/modules/Customer_Reviews/, creat a filed called vote_reviews_header.tpl, and open it.
2. Add the following code in vote_reviews_header.tpl: (more…)

Posted in X-Cart. Comments Off on X-cart v4.4.0 shows Customer Feedback at header »

How to add sub domains at another web hosting?

I want www.glassespeople.com to  run at a vps from hostgator, and http://forums.glassespeople.com to run at aother shared web hosting from hostgator also, and do not use redirect to achieve this. We all know if we deal redirect not well, it  is very bad for our sub domain seo. (more…)

Posted in Web Hosting. Comments Off on How to add sub domains at another web hosting? »

WordPress Twenty Twelve change Continue reading to post title

The default template of Twenty Twelve shows “Continue reading” at homepage, or category page. How to change “Continue reading” to post title?

Edit content.php, this file is just under the template of “Twenty Twelve”, find the following code:

<?php the_content( __( 'Continue reading <span>&rarr;</span>', 'twentytwelve' ) ); ?>

and change it to:

  <?php the_content( __( 'Continue reading [' . get_the_title($post->ID) . '] <span>?</span>', 'twentytwelve' ) ); ?>

Posted in WordPress. Comments Off on WordPress Twenty Twelve change Continue reading to post title »
King Php Science Designed by:KingPhp.com Welcome, you are from: 54.146.11.8