Wordpress Plugin: The Attached Image

What’s This Then?

The Attached Image is a simple plugin that packs quite a punch. It shows the first image attached to the current post. For example. If you have your home page set to 5 posts and you use this plugin it will show the first image attached to each of those posts. For a working example see celeborama.net which uses it to grab the picture you see floated to the left of each post.

It was inspired by a plugin wrote by Kaf Oseo, but when support & updates were no longer available & a recent upgrade of WordPress meant it didn’t work exactly like it used to, I decided to take on the challenge of remaking it using the newest WordPress functions available. Continue reading “Wordpress Plugin: The Attached Image”

Zstore Plugin Update

My little Zstore plugin has just been updated with an important fix for those having problems with the images not showing up (turns out it was a incompatibility on some servers), and a new keyword search that was suggested to me by email.

The search works via the widgets panel, but it is only compatible with WordPress 2.8 or higher, it will not appear if you have a lower version. If you have a lower version & you wish to have a search all you need to do is make a standard HTML form in your template with a input text field with the name of ‘keywords’ pointing to the page/post with your Zstore enabled. That should also work, the widget is much easier though. ;)

If anyone has any problems with the plugin or notices any bugs please let me know via comment or email. Thanks. Go here for the update.

PHP Tip #6: str_replace Is Faster

This is probably a very well known tip, but for those new to PHP it’s handy. When needing to replace something try & use str_replace instead of preg_replace. Always remember that REGEX is costly & should only be used when it is really needed. If you need to do a case insensitive replace then use str_ireplace.

Again I’m sorry there hasn’t been many new posts, or tutorials. I’ve been having coders mental block, it’s really annoying. :( I’ll try & get another tutorial in soon.

What’s Going On?

Just a little post to let you all know that I haven’t fell off the face of the earth (as you can tell). I’ve just been really busy with different stuff. I’m also having a massive lapse in imagination when it comes to coding, for some reason I just can’t think of anything unique or new to do. Hopefully I’ll have something for you soon. I do however have a small tip for you. :)

VSfilter.dll & Wrong File Version Errors

So you get this error, what do you do. Well the main solution is to go find an up-to-date version of vsfilter.dll. It is normally installed when you install directvobsub (google it). Sometimes it doesn’t work though & there is only one solution, get rid of vsfilter. How? Well like this.

Click Start, type ‘cmd’ (without the quotes) & press enter. Then type ‘regsvr32 -u vsfilter.dll‘ if you get a unregister successful message, your golden. :)

Anyway as I said I’m hoping to be back with more soon. :D

How to Combine Zazzle Gallery XML Files for Easier Uploading to Google Base

Those of you familiar with uploading XML files for your Zazzle galleries to Google Base, will know that Zazzle limit you to the amount of products you can have per XML file. 100 products is the most you’re allowed, and if you have a Zazzle gallery with 1000 products in it, that’s 10 files waiting to be uploaded to Google Base. Continue reading “How to Combine Zazzle Gallery XML Files for Easier Uploading to Google Base”

PHP Tip #5: header

Another useful command that all PHP coders should know is the header() function. You can use it to send a HTTP header to the server. As an example you could use it to redirect to a certain webpage if a certain string of conditions are true, just like this:

if($error == true) {
  header('Location: /path/to/error/page');
}

You can also use it to send a 404 header. This is useful when using an index.php file as a URL router, similar to PHP frameworks like Codeigniter, if a file isn’t found you could get the index.php file to send a 404 header & then include a pre-made 404 page. Something like this always works for me:

header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");

There is one massively important thing to remember. You can only use the header() function before you have output anything to the browser. For example the following will work:

header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
echo '404';

Where as this will not work:

echo '404';
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");

I hope that helps those who are unfamiliar with the header() function. :)

Using HTML to Liven Up Your Zazzle Gallery Home Page

You’ve just opened an account with Zazzle. You’ve created a few products, uploaded a spiffy header, added a few product lines and wrote a nice little paragraph welcoming people to your gallery… but you yearn for something more, something different!

This tutorial gives a few little hints and tips on how you can jazz up your Zazzle gallery home page using nothing more than a few HTML tags, a few images and your imagination!
Continue reading “Using HTML to Liven Up Your Zazzle Gallery Home Page”

 Page 1 of 11  1  2  3  4  5 » ...  Last » 

Sponsers

My Twitters

Twitter Updates

    follow me on Twitter

    Friends

    Roguedeals.com