more on portfolio









August 2008
M T W T F S S
« May «-»  
 123
45678910
11121314151617
18192021222324
25262728293031






 


How to: Create HemingwayEx custom blocks

Log entry of September 8th 2007 09:04:55 pm
Filed under: How To, Theme Hacks, Wordpress, Wordpress Related
« Theme: HemingwayEx
How to: Make combos with different results »

By now, if you have installed Nalin awesome template for your WordPress, you would notice the 3 block which does not include in version HemingwayEx 0.95 beta, and possibly not even in it future version. Reason is because, it is customized by yours truely.

In HemingwayEx theme which we use before it was replace by Trendy, I’ve a Portfolio and a Plugoo box in the template.
Now, to whom that still uses Nalin theme, this tutorial is for you.

Before we begin:
Here’s the manuals on how to add random photos to it, but always remember that this is just a sample. What I want you to understand is not the method, but instead the logic on how to use the method (erm… hope you understood what I meant).

*Please backup your database first.

Tutorial Mode
  • Open your notepad or any plain text editor and insert the javascript below….
<h2>Random Image</h2>

<script language="JavaScript">
<!--
/*Random Image Script- By JavaScript Kit (http://www.javascriptkit.com) */

function random_imglink(){
var myimages=new Array()

//specify random images below. You can have as many as you wish
myimages[1]=”image1.gif”
myimages[2]=”image2.gif”
myimages[3]=”image3.gif”

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write(’<a href=”‘+myimages[ry]+’”><img width=”180px” src=”‘+myimages[ry]+’” border=”0″></a>’)
}

random_imglink()
//–>
</script>
Note: Remember to change image1.gif, image2.gif and image3.gif to your image link.
  • When all the above is pasted, save as… your document to randompics.php
    In order to do this, change Save a file type to ‘ALL FILES’.

  • Access to your file server using ftp software (best recommended is CuteFTP)
  • Locate HemingwayEx folder inside themes. There should be a folder called blocks.
  • Upload randompics.php to blocks folder.

  • Okay… you can close your FTP now.

  • Logged into your WordPress admin panel. Head over to Presentation > HemingwayEx Options.

    You should see this option.



  • Just keyed into the box Random Pictures and Viola!
    You have a new kid on the block!






Leave a Reply