Archive for August, 2010
How to show more tags in Wordpress tag cloud?
WP by default shows 45 tags in a tag cloud displayed in sidebar. If you want to change this value then open file wp-includes/category-template.php and look for function wp_tag_cloud.
If you have it then change value 45 to anything you want- for example 60. After you do it you should end with something like this:
function wp_tag_cloud( [...]
Virtual Hosts in Windows under WAMP
Do you want to call your localhost websites from a webbrowser using nice URLs like: mysite.dev or somethingelse.dev? Here’s a way how to do this under Windows.
First edit your Apache’s httpd.conf file. Look for “DocumentRoot” and then change into something like this (“e:/wamp/www” is the path to my sites):
DocumentRoot "e:/wamp/www/"
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
[...]
(Almost) All PHP functions with simple explanations in one place
AMQP
AMQPConnection::__construct – Create an instance of AMQPConnection
AMQPConnection::isConnected – Determine if the AMQPConnection object is still connected to the broker.
AMQPExchange::bind – The bind purpose
AMQPExchange::__construct – Create an instance of AMQPExchange
AMQPExchange::declare – Declare a new exchange on the broker.
AMQPExchange::delete – Delete the exchange from the broker.
AMQPExchange::publish – Publish a message to an exchange.
AMQPQueue::ack – Acknowledge the receipt [...]
Import Excel (XLS) document into MySQL database
The best way to read XLS files in PHP is using PHPExcelReader. It’s a great class becasue it does not use any COM objects, however the download package on SourceForge sometimes contains invalid XLS or example files, so I prepared a working package and you get get it here.
Read and write BMP in PHP: imagecreatefrombmp + imagebmp
This is an updated class to use BMP format in PHP. Previous version is
here. If all you need is loading and saving 24bit BMP files- you can use previous version. It has less code so works a bit faster.
This version saves 24bit BMP files and loads 1, 4, 8, 24 and 32 bit BMP files.