web analytics

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. Read more…

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.

Read more…