Support » Plugins and Hacks » Hacks » Create a Page like FaceMash using WordPress

  • Hi,

    I want to create a page which is similar to the site FaceMash set up by Mark Zuckerberg. There are plugins for it, but I want to do this without any plugin.

    The idea is showing random images on a page, and whenever any user clicks on any photo, the photo gets a +1 point and reloads the page to show more random pics.

    I have got a Random pic plugin, which shows random pics, but I am not able to add points whenever a user clicks on any photo.

    Help is appreciated. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator bcworkz

    (@bcworkz)

    One approach would involve hacking then random pic plugin. Besides outputting an img tag, the img tag would be wrapped in an anchor tag that not only requests the page again, but also includes url parameters identifying the pic clicked on, as well as a nonce to prevent people from sending multiple requests to skew the voting.

    The requested page would need to be modified to first check for a valid nonce. If invalid, do nothing but send another page of random pics. If a valid nonce is received, take the pic ID from the url parameter and use it to increment the metadata for that particular image attachment. Then go ahead and send the random pics as usual.

    Hi Rahul,

    Why do you want to do this without any plugin?

    I’m the developer of the pics mash plugin

    free version: http://wordpress.org/extend/plugins/pics-mash/

    premium version: http://www.picsmashplugin.com/

    You could do it as bcworkz says, but when there’s already free + premium solutions, why bother 😛

    Thanks bcworkz for the suggestion, but I am finding it too hard to implement as I am not an expert with WordPress or PHP coding.

    Thanks mikemayhem3030 for the suggestion, but I would like to ask you that is the free version customizable? I knew about the premium version, that’s why I was opting for a plugin free solution as I am little tight on the budget now.

    I want to implement your plugin on a single WordPress page, with custom styling. Is that possible with the free version?

    Yeah it’s possible with the free version, give it a try.

    Hi mikemayhem3030, I had a look at the plugin, but I think I will not be able to use it, as it needs each picture to be uploaded, and since I have over 1000 images on my site, it’s not feasible to upload 1000 photos over again and add it to the plugin.

    Can you suggest a better way of adding pictures to this plugin for rating? Like choosing random images from the wp-uploads folder?

    If you’ve already added the photos it can grab them from your Media Library or NextGen galleries and it auto imports them at the push of a button.

    Cheers

    Mike

    Hi,
    I would like to start RateMyFace-like site. Does your plugin works with photos uploaded not by admin but by users?
    Rahul wrote:
    “The idea is showing random images on a page, and whenever any user clicks on any photo, the photo gets a +1 point and reloads the page to show more random pics.”

    I’m looking for something a bit different.
    The idea is showing random images on a page, and any user can rate any photo, the photo gets 1-10 rank and reloads the page to show more random pics.”
    I would be grateful for any sugestions 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Create a Page like FaceMash using WordPress’ is closed to new replies.