Adding Thumbnails To WordPress Posts

Now this may not work for all wordpress skins, but it will for the majority of the magazine/blog types like arthemia and convergence.

First, add a file to the “Media” section of your WordPress admin tools  by selecting Add File (or some sort of variation of that depending on the theme you have used) , select Upload file and find the picture you want to use as a thumbnail on your computer.  Once The file is uploaded it should look like this:

addpicture to wordpress

Note the highlighted area, this will be your picture’s path. Copy that line starting from wp-content for later use.

Next, go to the post we would like to attach the thumbnail to in the posts section of the dashboard. If you scroll further down the edit page of your post there should be a section for a custom field. Create a new custom field by clicking on the text box below name. For name input “Image” and for Value input our path for the image, in this case wp-content/uploads/2010/01/arthemia-screenshot10.jpg.

NOTE: The ‘I’ in Image, must be capitalized!

Adding A Custom Field
Adding A Custom Field

Now click Add custom field and we’re done, you should see your thumbnail on the blogroll.

Check Your Mail Server Security

This guide will teach you how to make sure that your SMTP mail server is not a relay server.

An open relay server allows people to use your mail server to deliver spam.

If you have an email server on Ubuntu or other Debian based operating system and you are setting it up using postfix and courier then by default they are not going to be open relay servers. There is a very simple way of testing. The offers an automated test suite. The way you run this is by logging into your server, this can be done through ssh.

From your mail server run:


This will attempt to connect back to your machine and run a series of mail relaying tests against it.

Upon completion you should recieve the following message:

System appeared to reject relay attempts

If you are inadvertently running as a relay consult your mail server documentation for tips on how to prevent it.

Adding Ads to arthemia theme

This guide explains how to put your ads into the arthemia wordpress theme. By default, arthemia has 2 places for ads, the 468×60 pixel ad in the top right, and the 300×250 pixel ad a bit further down on the right side. Both of these sizes are common to Google AdSense.

Adding the 468×60 ad:

  • Head into your WordPress admin Dashboard
  • Click Appearance
  • Select Header (header.php) from the list on the right
  • Find the line of code (about half way down) that reads:
    • <img src=”<?php echo get_option(‘home’); ?>/wp-content/themes/arthemia/images/banners/wide.jpg” alt=”” width=”468px” height=”60px”  />
  • Just replace the entire thing with your ad code (make sure that your code is for a 468×60 pixel ad)
  • Scroll to the bottom of the page and click Update File

Adding the 300×250 ad:

  • Head into your WordPress admin Dashboard
  • Click Appearance
  • Select Sidebar (sidebar.php) from the list on the right
  • Find the line of code (right near the top) that reads:
    • <img src=”<?php echo get_option(‘home’); ?>/wp-content/themes/arthemia/images/banners/square.jpg” alt=”” width=”300px” height=”250px” />
  • Just replace the entire line with your ad code (make sure that your code is for a 300×250 pixel ad)
  • Scroll to the bottom of the page and click Update File

Categories in Arthemia Theme – Get them working

This guide explains how to get categories working properly in your arthemia themed WordPress site. By default the theme doesn’t really support your categories, this guide fixes that problem.

  • Find the ID’s of the categories you want to show
    • In the admin section of your site, go to Posts, and select Categories
    • Click on the one of the category titles on the right (Note, if you don’t have any categories yet, add some now)
    • One you click on a category title, the ID of the category will show up in your browser’s address bar. Remember which ID is for which category (You can have 5 categories listed on your Arthemia site)
  • Now that you know which categories (and their ID’s) that you want on your homepage, we’ll add them
    • Go to the Appearance section.
    • Select Editor, and click Main Index Template from the list on the right.
      • Find the section in the code that says: php $display_categories = array
      • Just use Edit->Find in your browser
    • Change the numbers in the brackets to the categories that you want listed on your page.
    • For example if, I want the categories with ID’s 5,3,9,7 and 1 on my site, I will change the line of code to read: <?php $display_categories = array(5,3,9,7,1); $i = 1;
    • NOTE: Only change the digits in the brackets, do not modify the rest of the line, just leave it as is.
    • Hit Update File at the bottom of the page.

You’re finished!

Change Browser Icon

Ever wonder how to change the little browser icon of your webpage?

This guide will explain it in just a few steps (for both a traditional webpage and for a WordPress theme)

  1. Go find the image that you would like to use for your logo
  2. Scale the image down so that it is exactly 24×24 pixels
  3. Save the image as an Icon file: On windows, this is just a BMP file, on MAC you can save as Windows Icon File
  4. The filename must be: favicon.ico

For WordPress:

Save the file in your wp-content/themes/YOUR-THEME-NAME/images (overwrite the existing one)

For a Traditional HTML Page

Save the file in your website root directory

Better WordPress Rich Text Editor

  • Download this zip file and extract it to view the contents on your computer
  • Copy the advanced-wysiwyg.php file to your WordPress Plugins Directory located here: /wp-content/plugins
  • Copy all the files from the plugs folder (from the file you downloaded) to the TinyMCE Plugins folder located here: wp-includes\js\tinymce\plugins
  • Activate the new editor by opening up the administrator view of your WordPress page
    • Select Plugins (on the left)
    • Activate the Advanced WYSIWYG Editor plugin
  • That’s it! Next time you go to make a post you will have significantly more formatting options.


Extending TinyMCE, the WordPress Rich Text Editor

Change WordPress Logo

Changing the WordPress logo really just consists of overwriting the logo.gif in the theme you are using with file with your own logo.gif file – Here are the steps:

  1. Open up the image that you would like to use for your new WordPress logo
  2. Save your file as logo.gif (File->Save As)
  3. Open up your ftp client (or however it is you view the files on your WordPress site)
  4. Navigate to the themes directory (
  5. Navigate into the images directory of the theme you are using
  6. Delete the logo.gif  or logo.png file that is currently in there (the old logo you want to get rid of)
  7. Copy/upload your file (in place of the old one you just deleted) NOTE: you must have the same file extension as the file you are replacing, (png or gif)

Better WordPress URLs

The URLs that WordPress Generates by default are no good (for humans or search engines.) This guide will explain how to fix that giving you more legible URLs as well as Search Engine Friendly WordPress URLs

  1. Head into the admin section of you WordPress site
  2. Select Settings (bottom right)
  3. Select Permalinks
  4. Choose the custom option and paste this into the text field: /%postname%
  5. That’s it! from now on when you create a new post, it will be given a URL in accordance with the name of the post. For example, check out the URL you are at right now. Before I changed my settings it would have read something like “” (useless…) but now! “firstsearchblue/better-wordlpress-urls” (beautiful)

Query Database with Drupal Form

The Problem

  • By default, there is no way to allow your users to query one of your databases (either internal or external) in Drupal. Additionally, there are no modules that really allow you to do this either.

The Solution

  • With a little pasting and editing, this guide will enable you to let users do a simple search of one of your databases. This information can easily be extended to allow for all kinds of user-database interaction in Drupal.
  • Use Ajax! This is by far the easiest way to get the job done.


  • Make sure that you have the PHP code Input Format enabled. To do this simply go to Administer->Site Building->Modules. Scroll Down to PHP Filter, make sure it’s enabled, click ‘Save Configuration’
  • If you have a rich text editor enabled (such as YUI) you should disable it temporarily while we create the form

The Drupal Page/Form

  • Go to Create Content and create a new page (it doesn’t have to be a page, but we’ll use a page for the sake of this guide.)
  • Call the page Database Query
  • Select PHP code from the Input Format dropdown.
  • Paste the following code into your page:


<script language=”javascript” type=”text/javascript”>
//Browser Support Code
function ajaxFunction(){
var ajaxRequest; // The variable that makes Ajax possible!

// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
ajaxRequest = new ActiveXObject(“Msxml2.XMLHTTP”);
} catch (e) {
ajaxRequest = new ActiveXObject(“Microsoft.XMLHTTP”);
} catch (e){
// Something went wrong
alert(“Your browser broke!”);
return false;
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
var ajaxDisplay = document.getElementById(‘ajaxDiv’);
ajaxDisplay.innerHTML = ajaxRequest.responseText;
var lastphp = document.getElementById(‘lastphp’).value;
var queryString = “?lastphp=” + lastphp;“GET”, “/php/check.php” + queryString, true);

<form name=’myForm’>
<table border=”0″>
<td width = 100>Last Name: <br /></td>
<td><input type=’text’ id=’lastphp’> </td>
<br />
<input type=’button’ onclick=’ajaxFunction()’ value=’Search’ />
<div id=’ajaxDiv’></div>

  • There is only one thing we eventually will have to change, but we’ll leave it for now: “/ajax-example.php” (just before the tag. You’ll probably want to keep your php file somewhere else, and will have to update the file location accordingly.
  • For now, just hit the save button to save your page and move onto the next step.

The PHP File

  • We now have to create the PHP file that the above ajax script refers to.
  • Open up your favorite text editor and paste in the following code:

//Connect to MySQL Server
//connect to your database ** EDIT REQUIRED HERE **
mysql_connect("localhost","MySQLUser","password") or die('Cannot connect to the database because: ' . mysql_error());

//specify database ** EDIT REQUIRED HERE **
mysql_select_db(“databaseName”) or die(“Unable to select database”); //select which database we’re using

// Retrieve data from Query String
$last = $_GET[‘lastphp’];

// Escape User Input to help prevent SQL Injection
$last = mysql_real_escape_string($last);

//Build and run a SQL Query on our MySQL tutorial
$query = “SELECT * from dataTableName”; //just grab every row from our table
$results = mysql_query($query)or die(mysql_error());

//print what the user entered (eventually I’m sure you’ll want to use this data in your query)
echo “You Entered: ” . $last . “<br><br>”;

//print the results
echo “Database Results: <br>”;
while($row = mysql_fetch_array($results)){
echo “$row[lastname]<br>”; //NOTE: Here we are printing all the data from the ‘lastname’ column of our database, either change this name, or make sure you have a lastname column with some data in it

  • You will have to make some modifications to this file! These include
    • Server: I used localhost, you might have to change this
    • MySQL User: Change this to your user
    • password: This is the user’s password
    • databaseName: This is the name of your database
    • lastname NOTE: This needs to be changed to the name of a column/field in your database (it is located at the bottom of the code)
  • Save this file as check.php
  • Upload this file to your server/hosting space in a php folder within your Drupal Installation.
    • For example, if Drupal is installed in the root of you web page (like on just create a folder called php and upload your check.php file to it.
  • That’s it! Navigate back to the form you created (we called it Database Query) and try hitting the search button.
  • I’m sure this guide is a little tough to work through PLEASE post any questions or issues below – they will be answered quickly!

drupal mysql query

Watch Unlimited Megavideo | How-To


Check out our new guide on The Best Way to Watch Movies and TV Shows Online


Illimitux 3.5: Unbridle videos from streaming platforms

Illimitux extension is a FireFox tool that removes limitations imposed by streaming plateforms as Veoh, MegaUpload or MegaVideo. Its purpose is watching without restriction vidoes from those platforms. When your are in one of these websites. Illimitux identifies the video and show a little icon in the sidebar of the browser telling you to remove the limitation. Once you click on it, you’ll be redirected to our website to view the Full video.

For Example, if you are in Veoh, you will be able to watch a video without there 5 minutes limit. That’s the same with MegaUpload and MegaVideo. In the case of MegaUpload (file sharing platform), you can stream a file (watch it in live) or download it without waiting 45 seconds.

Here are other solutions that people have found successful with respect to Megavideo:

Firstly clear your browsers cookies, next block all cookies coming from

Go to: Tools > Options (in firefox)

Then click “Exceptions” and block “” & “” (without quotes)

Method 1
All you do is start the video playing then pause it and let it buffer all the way to the end. Then press standby on your modem (or unplug it if you don’t have a standby button) and watch the movie off/line, then hit play.

(Instead of turning off/unplugging your modem, you can also try clicking File > Work Offline in your browser. But remember to change it back when you want to load another video.)

The obvious drawback is that you are offline but, you can do this all-day if you want to have a marathon Megavideo session without that annoying video limit.


Method 2
Unplug your modem from its power supply. The mailing address you have leased from your carrier will expire, as it will see that you are no longer online, and you therefore do not need an IP Address. Your IP Address currently being used will return to the pool of IPs available to use to your IP.
Clear your cookies. This takes care of the client side monitoring being done on your machine.
Wait 60 Seconds, then plug your modem back in. During the reinitialization of your modem, it will query your IP carrier for another IP Address from the pool of available ones, giving you a new IP Address.
Reconnect to Megavideo by closing your browser and accessing the material again. Your cookies will be cleared, and Megavideo will have no record of your new IP Address on their server log. Enjoy another hour of uninterrupted content.

(Method 2 won’t work if you have a static IP)