/[drupal]/contributions/modules/drigg_external/README.txt
ViewVC logotype

Contents of /contributions/modules/drigg_external/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Nov 19 21:14:15 2008 UTC (12 months, 1 week ago) by pgiro
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, DRUPAL-6--1-1, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/plain
initial pre-release
1 ABOUT
2 -----
3 This modules provides a single javascript button to include in a page that will display either a
4 vote button or an "add" button. This module builds upon the Drigg set of modules.
5 It is meant to work as an external vote button for scoops availble inside a Drigg system.
6
7 The script to call to display the button is optimized not to hit the server too hard when a button is
8 displayed multiple times on a site: each call to get the button is delayed by 1 second. So if you
9 have 10 buttons to display, the last one will be displayed after 10 seconds.
10
11 INSTALLATION
12 ------------
13 Unzip in sites/all/modules as usual & enable the module
14
15 Extra pre-release steps:
16 - go to js/button.js and change the base_url string. Don't forget the trailing slash
17 I will have this file generated from the admin page in the final release.
18
19 INSTALLING THE VOTE BUTTON ON example.com
20 -----------------------------------------
21 To display the button, simply add the following to the pages of the sites/blogs/etc you want the vote button
22 to appear on:
23 <script type="text/javascript">
24 url_site = 'http://www.example.com/THE_URL_OF_THE_PAGE_ON_THE_SITE';
25 </script>
26 <script src="http://YOUR_DRIGG_SITE/sites/all/modules/drigg_external/js/button.js" type="text/javascript"></script>
27
28 The url_script is mandatory if you display the vote button on pages that can display multiple nodes (archives, etc),
29 it's the only way the server can know which URL to serve. If you are displaying the vote button only on pages
30 whose URL is the one in the DRIGG SITE then you can omit it.
31
32 FEEDBURNER ISSUE : feedburner changes the URL of the pages, you need to hack the aggregator module to get
33 the correct URLs in your drupal system. See http://www.drigg-code.org/node/158#comment-1434 and
34 http://www.drigg-code.org/node/158#comment-1513
35
36 THEMING
37 -------
38 In both cases, output is done via a template which means that you can override the one
39 provided in the module which works well for extra_voting_forms.
40
41 The current implementation simply displays
42 the button but your implementation could:
43 - add images
44 - add backgrounds
45 - add text & links
46 - etc
47
48 You can do it all by writing your own themes.
49
50 HOW TO DO IT:
51 - copy the files files named *.tpl.php into your theme directory
52 - change them to whatever you need.
53
54 The magic variables are
55 - for the vote button : $widget_html which contains the themed vote button according to drigg_ui configuration
56 - for the add button : $link which contains the link with the 'Add this' text and to the "add drigg node" page. The
57 form should have its URL filled out already. It does not fill out the title because these buttons can be
58 displayed multiple times on the same page.
59
60 All texts are processed through the t() function so you can localize them and change them to whatever you want
61 in english.
62
63 Cheers
64 Philippe

  ViewVC Help
Powered by ViewVC 1.1.2