/[drupal]/contributions/modules/voting/INSTALL.txt
ViewVC logotype

Diff of /contributions/modules/voting/INSTALL.txt

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

revision 1.4, Sat Mar 18 08:36:49 2006 UTC revision 1.5, Tue Jul 11 00:23:32 2006 UTC
# Line 1  Line 1 
1  Installation  Installation
2  ------------  ------------
3    
4  1. Create the SQL tables.  1. Copy all the voting files to modules/voting (you will
      mysql -u username -ppassword drupal < voting.mysql  
   
 2. Copy all the voting files to modules/voting (you will  
5     have to create this directory). Files in the source     have to create this directory). Files in the source
6     directory are not necessary. Drupal should     directory are not necessary. Drupal should
7     automatically detect the new module.     automatically detect the new module.
8    
9  3. Enable the voting module.  2. Enable the voting module.
10    
11  4. Set permissions for users to 'vote on content' and  3. Set permissions for users to 'vote on content' and
12     'show average without voting'.  The later is useful     'show average without voting'.  The later is useful
13     if anonymous users are not allowed to vote, but you     if anonymous users are not allowed to vote, but you
14     want them to see how others have voted.     want them to see how others have voted.
15    
16  5. Set default workflow settings for nodes. This  4. Set default workflow settings for nodes. This
17     allows you to set whether voting should be on or off by     allows you to set whether voting should be on or off by
18     default for specific types of nodes.  This option is     default for specific types of nodes.  This option is
19     set for each type of node by going to:     set for each type of node by going to:
    'administer/content/configure/content types'  
   
 6. [OPTIONAL] Enable the voting filter for any input formats  
    that should be allowed to have inline voting controls.  
   
 7. [OPTIONAL] If you use the TinyMCE WYSIWYG editor, install  
    the drupalvoting plugin to make it easy to add/edit voting  
    controls to posts.  To do this, move or copy the drupalvoting  
    folder to your TinyMCE plugins directory.  This location is  
    \modules\tinymce\tinymce\jscripts\tiny_mce\plugins.  Next,  
    you have to either edit the tinymce.module file or copy the  
    theme_tinymce_theme() function to your theme (and change the  
    word theme to your theme name).  Within this function, you  
    need to add drupalvoting to the initialization strings of  
    your TinyMCE theme (not the same as your Drupal theme  
    mentioned earlier).  
   
    There is section in this function (currently starting on  
    line 282 of tinymce.module) that says:  
   
    switch ($theme_name) {  
      case 'advanced':  
        $init['extended_valid_elements'] = 'a[href|target|name|title|onclick]';  
        $init['theme_advanced_buttons3_add_before'] = 'tablecontrols,separator';  
        $init['plugins'] = file_exists(drupal_get_path('module', 'tinymce'). '/tinymce/jscripts/tiny_mce/plugins/drupalimage') ? 'drupalimage,table,emotions,fullscreen,drupalvoting' : 'table,emotions,fullscreen,drupalvoting';  
        $init['theme_advanced_buttons3_add'] = 'drupalimage,drupalvoting,emotions,separator,fullscreen';  
        break;  
   
    In this example I have added 'drupalvoting' to the 'plugins'  
    'theme_advanced_buttons3_add' strings.  The later puts the  
    button on the third row of buttons within TinyMCE, so you  
    could change that to read _buttons1_add or buttons2_add.  
   
    You could also add the voting control button to a different  
    TinyMCE theme by another another case within this switch  
    statement.  You could even create your own TinyMCE theme and  
    create a new case for it here. See the TinyMCE documentation  
    for details on how to create a new theme.  
   
   
   
 Author  
 ------  
   
 Benjamin Shell <drupal@benjaminshell.com>  
   
   
 Demo Sites  
 ----------  
   
 http://www.benjaminshell.com/jokes  
 http://www.saccf.com/photos  
   
   
 TODO  
 ----  
   
 - Add personalized "recommendations" block dependant on  
   how a user rates content  
 - Add a popular content block based on highly rated content  
 - Add alternate voting forms besides Macromedia Flash.  
   HTML radio button or dropdowns would be an easy first step.  
   AJAX (Asynchronous JavaScript and XML) would be better.  
20       'administer/setting/content types'

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.2