Vincent Pang Photography

Freelance Photographer in Malaysia for Wedding, Portrait, Events, Products, Fine Art and any photography related services

A simple file randomer

The idea is to have a simple image random at minimum processing power of course (like the one on top of the header in my blog) 

The objectives

1) support multiple folders
2) randomly get an image in the specified folder
3) hide the source of the image (bonus) 

How to call the function is like this 

<img src="/blog/imgRandom.aspx?p=1">

in which p is the path and is defined in GetPath(). You can have as many directory as possible and it will randomly pick an image.

Known problem,

for some reason the searchPattern only take in 1 parameter. Meaning only search *.jpg but cannot support *.jpg or *.gif

Attachment: imgRandom.zip (950.00 bytes) (C#)

My new blog

Finally got the blog engine I am looking for with the below features

  1. runs on .Net (i suppose i can customise it if i want to)
  2. Date is editable (my previous blog at spaces.live.com doesn't allow me to do this)
  3. XML based db (no need of MySQL, Access or MSSQL)
  4. Friendly UI
  5. Photo and file Upload
  6. Theme (8 predefined themes)
  7. Easy to install and configure
  8. Comment moderation
  9. Rating
  10. Tagging
  11. full CSS
  12. search (although post only, but it's still better than nothing)

 

This blog engine is great ! you can get it here http://www.codeplex.com/blogengine