web analytics

I had an interesting problem yesterday. We wanted to make a new frontpage for a WordPress site. The frontpage has need the same layout than the category listing page. We used the same code, what called the loop.php to show the posts, and everything was good, except one “small” thing. The WordPress worked differently if we called a category listing page, than on the frontpage. (more…)

My girlfriend made a small image for the site, what figured a fly, and I thought, It can useful to make small gadget. So the fly birth, and come to life.

The code has five main parts, the image, the CSS, the hover procedure, the procedure what moves the fly, and that one what turns off the gadget.

(more…)

One of my friends has a multi-site installation of the WordPress, and he had a problem with the additional sites.

When he wanted to upload images, they uploaded into the proper folder, but the uploader provide wrong URL for the images, and he was not able to use them. The wordpress created the URL for all sites based on the main settings, and provided the “/files/image.jpg” style URL for all of the uploaded files. This setting was worked fine in the case of the main site, because a rewrite rule in the .htaccess file, but not with the sub-sites, because the files of the subsite stored in another folder.

The uploader created the URL based on the main site settings, but uploaded the images into the subsite upload dir. (more…)

I needed to get a part of a website, and show that in a wordpress post, so I made a WP plugin, what use curl to get the data from the site, and cut the appropriate part, what I want to show in the post. (more…)

The not appropriately selected encoding of database tables can cause annoying problems on a website.

Usually the wrong encoding of the database tables or fields causes this kind of problems.
The best solution, to change the encoding of tables & fields to UTF8.

The easiest way to do this change on database tables, the following;

ALTER TABLE {table} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci

This SQL script changes the encoding of the table and all of that fields in the table to UTF8.

 

I made a new PlugIn for WordPress, and I had to upload swf files for the PlugIn. I used the WordPress built-in uploader for this task.The uploader is able to upload swf files, and with the “Insert to Post” button, I can get an anchor from the uploader, what contained the URL of the uploaded file.

Now I had to get the URL of the file, to store it in a database.

(more…)

I had to turn on the SEO mode of the AWPCP PlugIn, but I had some additional pages, what was not handled with the AWPCP SEO mode handlers. So somehow I needed to add the handling of this page to the system.

I’m lazy, and did not want to make too much work, so I picked the options-permalink.php (/wp-admin/)
to do the work for me.

(more…)

I had to change the AWPCP plugin to be able to search for partial words too. Originally the plugin gives two way to start search. These way are the search page, and the search plugin. But now, I had to make a new way, to search from another form, and had to change the dosearch function to be able to search partial words too, not only in the ad_title and ad_details fields, but in an additional field too, what added with the AWPCP Extra Fields module.

For this changes you need to alter the awpcp.php file. (wp-content/plugins/another-wordpress-classifieds-plugin/awpcp.php)

(more…)