Categories
PHP Programming Wordpress

Change WooCommerce Items Per Page

To change displayed WooCommerce Items Per Page, add this code to any PHP file (end of “woocommerce.php” / your theme functions.php, etc)

// Woo commerce 9 items per page
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 9;' ), 20 );
Categories
SEO

Transferring Scrapebox License

I bought a new notebook few weeks ago. Now i have just remembered that i have to use scrapebox on my new notebook. So i went to google for a while and i found this link http://www.scrapebox.com/scrapebox-license-transfer.
That page describes everything clearly. And it is free.
All i have to do is redownload the scrapebox, i opened the scrapebox application, clicked “Activate”, i entered my license details there, and i waited for 10-15 minutes, and finally i got e-mail notification that my new license is ready. Thanks Scrapebox for making license transfer simple 🙂

Categories
PHP Programming

vBulletin Reputation Per Usergroup Plugin

I actually coded this vbulletin plugin long time ago, and have published it on VB.org long time ago. But now i want to write on my blog 🙂

This plugin will allow each usergroup to have reputation setting (including reputation power, daily reputation limit, reputation spread limit).

To download it, you can open this link :
http://www.vbulletin.org/forum/showthread.php?t=266604

Categories
Personal

Best Free iPad Games

I will give review of best free iPad games. All are installed on my iPad.

  1. Angry Birds collection. Phenomenal games. You should try at least once 🙂
  2. Angry Gran. It is a scrolling game, you will control a grandma and you should hit pedestrians to get money. You can use your money to buy stats upgrade / new weapons.
  3. AoD HD. Scrolling game. Very fun game. You control a character that fight against darkness army. You can buy and upgrade your soldiers. There are lot of soldiers here including peasant, swordsman, spearman, archer, horseman, etc.
  4. 4. Creeps HD. Free, fun, and challenging tower defense game. There are lot of levels available. If i remember correctly there are more than 30 levels.
  5. Critter Quitter. Use your finger to crush insects. Fun initially, but could be boring later.
  6. Cut the Rope. Use your finger to slide the rope. A kind of puzzle game.
  7. Jetpack. Scrolling game. You control a man using jetpack on a corridor. Avoid laser and missiles. Touch the screen to move him up. You can buy jetpack upgrades with gold.
  8. Pet Shop. Addicting game. You can build pet shop, breeding your pet, combining 2 species (only available on some species), etc. Internet connection is required.
  9. Zombie. Another addicting game. Build your zombie army. I always play it regularly. Internet connection is required.
  10. Water? Free. Addicting game initially.
Categories
PHP Programming

PHP HtmlEntities for UTF-8 Characters

If you just use simple PHP htmlentities function with one argument, you will notice that when you pass string that contains UTF-8 characters, the result is incorrect leaving you with some incorrect characters on the result.

To use it correctly, use this code 🙂

htmlentities($your_string, ENT_COMPAT, 'UTF-8');
Categories
JavaScript Programming

jQuery Not Class Selector to Exclude

For example we want to hide all hyperlinks that do not have “banana” class. How to do that with jQuery?
You can use the javascript code below.

$('a').not('.banana').hide();

Easy right? 😀

Categories
PHP Programming

My Proxy List Script and ProxyNoid

I made a free proxy list script about 1-2 years ago which is called “proxycoder script”.
I haven’t continued to develop it for a long time. Recently Oxuro, owner of ProxyNoid.com contacted me at DigitalPoint and told me that he has done some modification to my script. He kindly asked if i can include his modification on the next proxycoder script or if i can give him permission to distribute his modified script. I chose the second choice, i will be happy to see my script to become a well developed proxy list script.
From now, i give permission to ProxyNoid.com to distribute the modified version of my script.

Good luck, Oxuro 🙂

Categories
vBulletin

Sphinx Search Engine for vBulletin 4

Sphinx search engine is a free search engine software that supports MySQL, PostgreSQL etc. Sphinx can work on normal script, and vBulletin too.
Why sphinx? With fully configured sphinx search engine, your script can search on large amount of data very very quickly, like a speed of light compared with normal way.

On vBulletin 4, rebuilding search index takes very long time especially if you have lot of posts (more than one million) on your forum. My forum has about 1,5 million of posts. And to rebuild search index of about 10,000 posts, it can take hours. So to rebuild search index of 1,5 million posts, it takes days.
Because rebuilding search index was a painful process for my forum, i was thinking to use sphinx search engine for my vBulletin forum.

So first important point is : if your forum has lot of posts, you’d better to use Sphinx. But if your forum has small amount of posts, you do not need Sphinx search engine.

Categories
Programming

Premium Member on DigitalPoint

Hurray, i am a premium member on DigitalPoint now 😀
I want to buy sphinx search plugin for vbulletin from DigitalPoint so i have to be registered as premium member 🙂

Categories
Database Server

MySQL Table “In Use” Repair

Recently when i optimized some mysql tables from phpmyadmin, some of the tables were “locked” and showed as “in use” on phpmyadmin. The tables could not be used, read, etc. So the script was stopped working.
I have tried to repair / check / analyze from phpmyadmin but i couldn’t repair it.
So i tried to repair the mysql tables from SSH.

Go to your database directory. Usually it is located on
/etc/var/lib/mysql/YOUR_DATABASE_NAME/

So use this command first
cd /etc/var/lib/mysql/YOUR_DATABASE_NAME/

Next, use this command
myisamchk --safe-recover --force YOUR_TABLE_NAME

And the MySQL table should be repaired now.