/Vote-Up-Down

Google Summer of Code 2009 project for Drupal

Primary LanguageJavaScript

[[ THIS FILE NEEDS TO BE UPDATED OR REMOVED ]]
**********************************************

Vote Up/Down Package:
---------------------------
Author - Fredrik Jonsson fredrik at combonet dot se
Maintainer - Pratul Kalia (lut4rp)
Requires - Drupal 5
License - GPL (see LICENSE)


Overview:
--------
This project is an attempt to build a digg.com/reddit.com clone.
There are voting widgets that mimic both, i.e. +1/-1 and +1 voting.
It builds upon a number of other module, se below.

AJAX functionality is used for voting if the browser supports it
(using drupal.js included in Druapl 4.7). Bookmarklets are supported
for quickly submitting new story links. A number of RSS feeds are
available.

This is not a point and click solution. This project provide the missing
pieces but you need to put them all together. Please try it out and
report back with bugs you find and suggestions you have.


Features and files:
------------------
List of the files and there function:
* vote_up_down.module - Provides voting widgets for nodes and comments.
* vote_storylink.module - Provides a node type suitable for links to storys.
* node-storylink.tpl.php - PHPTemplate theming of story links
* alternative/node-storylink.tpl.php - PHPTemplate theming of story links
* template.php - PHPTemplate theming of story links
* vote_up_down.css - Adds some css style to the above files.
* ajax_vote_up_down.js - JavaScript for AJAX functionality

The "vote_up_down.module" can be used on any node type to allow
users to vote +1/-1 on them.

The "vote_storylink.module" give a new node type that is well suited
for a digg.com/reddit.com style site. It provides two blocks.
* A user navigation block with links to, "submit new story", "my account", 
  "my posts" and "log out".
* A "Top story links" block with links to "this day", "this week", 
  "this month", "this year" and "all time".

Pages that are generated by "vote_up_down.module":
* admin/vote_up_down
* admin/vote_up_down/user_votes
* node/[nid]/votes

Pages that are generated by "vote_storylink.module":
* storylink (same as storylink/new)
* storylink/new
* storylink/queue
* storylink/top
* storylink/top/day
* storylink/top/week
* storylink/top/month
* storylink/top/year
* storylink/[uid] (all posts for a user)

Feed that are generated by "vote_storylink.module":
* storylink/new/feed
* storylink/queue/feed
* storylink/top/feed
* storylink/top/week/feed
* storylink/top/month/feed
* storylink/top/year/feed
* storylink/[uid]/feed


Installation and configuration:
------------------------------
See INSTALL.txt contributed by Ron Williams.


Theme story links:
-----------------
If you use a PHPTemplate theme you can theme story links nodes with a
"node-storylink.tpl.php" file.

An example "node-storylink.tpl.php" and "template.php" is included.
Place them in the folder of your theme. The examples are styled with the
css file "vote_up_down.css" in the vote_up_down module folder.

In "alternative" there are a "node-storylink.tpl.php" for use with the 
"Alternative +1 vote style" (digg style) voting widget.

The example include these functions:
* Make the title an external link to the submitted story.
* Inserts the voting widget directly for greater control.
* Inserts the domain of the submitted story url like "(via example.com)".
* Displays a small user picture above the voting widget.

OBS! When using "node-storylink.tpl.php" you must turn off
"Vote widget display..." in "admin/settings/vote_up_down" to avoid
getting double voting widgets.


Bookmarklet to submit story links:
---------------------------------
javascript:location.href='http://www.example.com/node/add/storylink?edit[url]='+encodeURIComponent(location.href)+'&edit[title]='+encodeURIComponent(document.title)

Replace "www.example.com" with your domain.


Contributions:
-------------
* INSTALL.txt contributed by Ron Williams.
  This has cut down on the support requst considerbly and
  has made the package much more accessible for users.

* jQuery verision of ajax_vote_up_down.js by Nedjo Rogers.
  The Drupal 5 version whould have taken a *lot* longer
  if I have had to do this myself.


Last updated:
------------
$Id: README.txt,v 1.14.2.2 2009/01/29 18:37:27 lut4rp Exp $