How to control WordPress 9.2 tag cloud font size?

We all know that WP has added widget_tag_cloud_args filter, you can use this function to override the default arguments that are passed to the wp_tag_cloud function to change the tag cloud font size you like. This filter provides a keyed array, where the smallest, largest, and unit keys represent the smallest font size, the largest font size, and the unit (‘pt’, ‘em’, ‘px’, etc) used by the default tag cloud widget.
Continue reading “How to control WordPress 9.2 tag cloud font size?”

Easy way do delete files from cpanel

Sometimes we need to empty all files under a web hosting, how to do then?

 Very simple, just login your cpanel, click “File Manager” and choose “public_html”, del  “public_html” and rebuild a new one. That’s it! Very easy, right!

 Somebody may ask how to del part of the files, also very easy. Go to  “public_html”, and choose the files you want to delete, and del them.  Simple?

Custom content to a specific category page of X-cart

When we go to a specific x-cart category, we can put there some custom content above the category thumbnails. We need to modify skin1/customer/main/subcategories.tpl and just after the h1 tag (or any other place we want it to show)

{if $current_category.category eq “100″}show cusotm contents, prescription glasses{/if}
{if $current_category.category eq “200″}show cusotm contents, men’s glasses{/if}
{if $current_category.category eq “300″}show cusotm contents, women’s glasses{/if}

replace “100,200,300″ with the category id

Add WordPress Category Description

Usually wordpress category description does not show even we add each wordpress category description at WP Administration Panel. Any method to show category description? Yes! Follow me:

Go to Appearance –> Editor, and click Category Template (category.php) .

 Add <div><strong><?php single_cat_title(‘Currently browsing’); ?>
</strong>: <?php echo category_description(); ?></div> 

at proper place. Continue reading “Add WordPress Category Description”

Install WordPress on IIS of dailyrazor.com

Edit web.config, the file is under the hosting of dailyrazor.com.  Add the following code to web.config:

<?xml version=”1.0″?>
<configuration>
<system.web>
<customErrors mode=”Off”/>
</system.web>
<system.webServer>
<httpErrors errorMode=”Detailed” />
<rewrite>
    <rules>
        <rule name=”Main Rule” stopProcessing=”true”>
            <match url=”.*” />
            <conditions logicalGrouping=”MatchAll”>
                <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
                <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
            </conditions>
            <action type=”Rewrite” url=”index.php” />
        </rule>
    </rules>
</rewrite>
</system.webServer>
</configuration>

Please note that max password length for database user is 12 characters. And FastCGI Extension for IIS 6.0 and IIS 5.1 should be installed also.

Posted in Other. No Comments »

How to use PHP to add text for Zen Cart?

I want to add some text at the footer of Zen Cart, how to do? In fact, it is very simple. Just modify some code as the following.

How to ask somebody else to write PHP articles?

We often need PHP related articles, if we do not have enough time, we can ask other PHPer for help. Here is an example on how to find good PHPer to write for you:

I am looking for someone to write me 10×500 word articles for the PHP Study niche (keywords to be given when we reach an agreement).

I will pay $20 for the 10 articles but please only contact me if:

1- You are a native english speaker or someone that can write near-perfect English. I want the articles to really make sense.

2- I want the articles to be relevant and not just some fluff to fill the 500 words. Make it informative and appealing.
3- All articles should have quality unique content, not just rewrite others articles. If you have PHP knowledge, you will have more chances to get the job.

Please send me a short sample of your work.

If you think you can write me the 10 articles the way I want them then please contact me asap. If we can cooperate well, I will need more PHP articles every month.

Posted in Other. No Comments »

Using PHP to Transfer Chinese Character Into Pinyin?

If you want to transfer Chinese Character into pinyin, you can creat a php file, say hanzi2pinyin.php, and copy the following PHP code: Continue reading “Using PHP to Transfer Chinese Character Into Pinyin?”

Redirect by PC or mobile phone access

Just the same domain, using the following code, you can let your computer and mobile phone show different contents. We have to design 2 pages, all named index.php, the first one will be put at your host root, and the other one will be put under wap.
Page 1.
$iswap = isset($_SERVER['HTTP_ACCEPT'])? $_SERVER['HTTP_ACCEPT']:'';
if(strpos($iswap,"wap")>0)
{
@header(“Location: /wap/”);
}

?>




Cheap Prescription Glasses, and Non-Prescription Glasses.


Page 2.





Cheap Prescription Glasses Mobile

Cheap Non-Prescription Glasses Mobile



Live Demo: www.cheapglasses.mobi

How to remove “New Products …, All Products” in Zen Cart main page?

Open tpl_categories.php under include/templates/template_default/siteboxes/

 1. Remove New Products…,

At line 80,

if ($show_this->RecordCount() > 0) {
        $content .= ‘<a class=”category-links” href=”‘ . zen_href_link(FILENAME_PRODUCTS_NEW) . ‘”>’ . CATEGORIES_BOX_HEADING_WHATS_NEW . ‘</a>’ . ‘<br />’ . “\n”;

Change the code to: Continue reading “How to remove “New Products …, All Products” in Zen Cart main page?”