GithubHelp home page GithubHelp logo

mt-plugin-photocontest's Introduction

mt-plugin-photocontest

This plugin allows you to run a photo contest on an MT blog with public photo submissions enabled.

Installation & setup:

  • Install the plugin by copying the PhotoContest folder into the /plugins folder of the MT installation

  • Log in to MT and let the installer run

  • Create two new custom fields (see the images in the documentation folder). Make sure the basename is exactly as shown.

  • In the 'Create Entry' template module, add following line just before the 'Kopf' include:

    <mt:include module="Photo Contest Form Javascript">

  • Republish the 'Create Entry' template

Optional step to give each author a starting amount of photos to submit before the 1st of the month:

  • Copy the taskmaster script from the 'tools' folder into the 'tools' folder of the MT installation

  • Edit Plugin.pm and temporarily comment out the line

    if (($dayOfMonth == "1") && ($hour < 2)){

    and the } that closes the block.

  • Run following command from inside the MT home directory (it takes a while to complete):

tools/task-master forcerun reset_available_contestphotos

  • Don't forget to uncomment the line again after that.

Usage:

  • The photo upload form should now show an extra checkbox allowing the user to submit the uploaded photo for the contest
  • A message appears next to this checkbox indicating how many photos they can still submit
  • If this number is zero, the checkbox is disabled
  • When submitting a photo, the number of remaining photos is decremented
  • To show the contest photos for a month, create a Monthly archive, and instead of plain <mt:entries> use <mt:entries field:add_to_contest="1">. Note: a system template module named "Photo Contest Photos" is available with an example.

mt-plugin-photocontest's People

Contributors

mschenk avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.