DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:doodle2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:doodle2 [2012-04-13 23:37] – [Comments / Discussion / Feature Requests] 84.57.15.2plugin:doodle2 [2022-07-29 23:57] (current) Klap-in
Line 1: Line 1:
-====== doodle2 plugin ======+====== doodle2 Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 7: Line 7:
 type       : syntax type       : syntax
 lastupdate : 2011-01-20 lastupdate : 2011-01-20
-compatible : latest version of dokuwikirincewindangua+compatible : RincewindAnguaAdora belle, Binky
 depends    :  depends    : 
 conflicts  : doodle conflicts  : doodle
 similar    : doodle, vote, userpoll similar    : doodle, vote, userpoll
-tags       : vote, doodle, schedule, poll, doodle2+tags       : vote, doodle, schedule, poll
  
 downloadurl: http://public.doogie.de/projects/dokuwiki/doodle-latest.tar.gz downloadurl: http://public.doogie.de/projects/dokuwiki/doodle-latest.tar.gz
 bugtracker : http://getsatisfaction.com/doogie/products/doogie_doodle_dokuwiki_plugin bugtracker : http://getsatisfaction.com/doogie/products/doogie_doodle_dokuwiki_plugin
-sourcerepo : http://svn.doogie.de/dokuwiki/doodle/+sourcerepo : https://github.com/Doogiemuc/Dokuwiki-Plugin-Doodle2
 ---- ----
  
Line 29: Line 29:
    * well documented code    * well documented code
  
-There is a DEMO online on my [[http://doogie.de/playground/playground|private homepage]]. +There is a DEMO online on my [[http://wiki.doogie.de/playground/playground|private homepage]]. FIXME
  
 It's unbelievable how active this plugin got. I get feedback posts nearly daily. I am only developing this plugin in my spare time. So please understand that I will not be able to implement all requested features. Of course you are free to upload an improved version to github. This is open source after all. It's unbelievable how active this plugin got. I get feedback posts nearly daily. I am only developing this plugin in my spare time. So please understand that I will not be able to implement all requested features. Of course you are free to upload an improved version to github. This is open source after all.
  
 ===== Download and Installation ===== ===== Download and Installation =====
- +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
-You can install the plugin with the [[plugin:plugin|Plugin Manager]] and this URL: +
-   * http://public.doogie.de/projects/dokuwiki/doodle-latest.tar.gz +
-Refer to [[:Plugins]] on how to install plugins manually. +
- +
-If your Doodle2 does not work, copy the lib/plugins/doodle2 folder also in the not existing folder lib/plugins/doodle. +
  
 ===== Syntax and Usage ===== ===== Syntax and Usage =====
Line 69: Line 63:
 ===== Authentication ===== ===== Authentication =====
  
-By default anyone can vote, even multiple times under different name. In this mode users cannot change their vote, once they submitted it. \\ +By default anyone can vote, even multiple times under different name. In this mode users cannot change their vote, once they submitted it. 
-You can prevent multiple votes, by setting ''auth="IP"''. Then users will be authenticated by their IP address((which is **not** a very good way of authenticating users. But at least it requires no registration.)) \\ + 
-If you set ''auth="user"'' then only registered and logged in users are allowed to vote. This has the advantage, that users later on can edit their vote, i.e. change their mind. In this mode, the users fullname and login name are automatically set for the vote. ((You have no idea how complicated this can get. But don't worry, the plugin takes care of all that. For example, let's assume someone starts an open vote, and after some votes changes this to ''auth="user"''. Now user "Peter" logs in. But someone (maybe anyone) may already have voted with the name "Peter". In this case, this becomes Peters vote, and he might change it.))+You can prevent multiple votes, by setting ''%%auth="IP"%%''. Then users will be authenticated by their IP address((which is **not** a very good way of authenticating users. But at least it requires no registration.))
 + 
 +If you set ''%%auth="user"%%'' then only registered and logged in users are allowed to vote. This has the advantage, that users later on can edit their vote, i.e. change their mind. In this mode, the users fullname and login name are automatically set for the vote.((You have no idea how complicated this can get. But don't worry, the plugin takes care of all that. For example, let's assume someone starts an open vote, and after some votes changes this to ''%%auth="user"%%''. Now user "Peter" logs in. But someone (maybe anyone) may already have voted with the name "Peter". In this case, this becomes Peters vote, and he might change it.))
  
 ===== GitHub ===== ===== GitHub =====
Line 87: Line 83:
 A word about the name of this plugin. This plugin is simply named "Doodle". There is a older [[plugin:doodle|Plugin Doodle]]. Its author and me both consider this plugin as the successor of the older plugin doodle version one.  I only created this page with the name "doodle2", cause I didn't want to overwrite the old one. A word about the name of this plugin. This plugin is simply named "Doodle". There is a older [[plugin:doodle|Plugin Doodle]]. Its author and me both consider this plugin as the successor of the older plugin doodle version one.  I only created this page with the name "doodle2", cause I didn't want to overwrite the old one.
  
 +   * 4.0: new parameter closeon. Bugfixes and new deployment file structure.
    * 3.0: Multiple Plugins in one page now works, moved all JavaScript to script.js    * 3.0: Multiple Plugins in one page now works, moved all JavaScript to script.js
    * 2.3: old stuff    * 2.3: old stuff
Line 92: Line 89:
  
  
 +===== FAQ =====
  
- +> I am having trouble to add more than one doodle on a page. Having two and more doodles, the edit and delete function for the admin is not working (tested on different browsers using the latest dokuwiki). 
-===== Comments / Discussion / Feature Requests ===== +
- +
-I've setup a [[http://getsatisfaction.com/doogie/products/doogie_doodle_dokuwiki_plugin|GetSatisfaction page for this plugin]]. Please post FeatureRequests there. I am coding this little plugin in my spare time. So it might be that I can't fix bugs immediately. Feel free to port this plugin to github (I am not git expert) and happy coding. +
- +
-[[http://getsatisfaction.com/doogie/products/doogie_doodle_dokuwiki_plugin|{{http://getsatisfaction.com/images/badges/badge_logo_small.png}}]] +
-\\ +
-See also my other plugin [[plugin:iCalEvents]] +
----- +
-\\ +
->>Please provide a plugin.info.txt in your plugin archive to have a proper install after using the plugin manager. See [[:devel:plugin_info]]  --- [[user>lupo49]] //2010/12/27 20:15// +
-> Ok I added that file. --- Robert (plugin author) //2010-12-28 12:10// +
- +
----- +
- +
-> By the way. I am having trouble to add more than one doodle on a page. Having two and more doodles, the edit and delete function for the admin is not working (tested on different browsers using the latest dokuwiki). +
 This is now **fixed in version 3.0**. -- Doogie (plugin author) This is now **fixed in version 3.0**. -- Doogie (plugin author)
  
 ---- ----
  
-**Cannot Install using Plugin Manager** //2011-01-16 18:58// 
-  * I could not install automatically using Plugin Manager 
-    * Info button could not show information 
-    * Manually extract the TAR.gz in the  lib/plugins solved the problem 
-    * Manual extract creates __doodle__ as plugin dir, instead of __doodle2__ using the plugin manager 
- 
-This should now also be solved, since I provided a plugin.info.txt file. -- Doogie 
-  * No, it still does not seem to work (Info button still shows an error, and the whole plugin does not work until one renames the folder from doodle2 to doodle) //2011-07-10 15:31// 
- 
----- 
 **How to clear the Poll??** **How to clear the Poll??**
   * e.g. to restart the same poll again next time.   * e.g. to restart the same poll again next time.
  
 => you can chose another title for your new poll, or delete the data file under ''<dokuwiki>/data/meta/title_of_vote.doodle'' => you can chose another title for your new poll, or delete the data file under ''<dokuwiki>/data/meta/title_of_vote.doodle''
- 
----- 
-Please rename your plugin. Doodle is a Trademark. So everyone using this nice plugin has to fear trouble with the law. 
-Please replace all "doodle" in the code too. 
- 
-http://doodle.com/about/tos.html 
-  Doodle behält sämtliche Urheber- und sonstigen Rechte an den Diensten. Sie sind nicht berechtigt,  
-  rechtliche Hinweise (z. B. Urheberrechts- oder Markenhinweise) zu entfernen, zu verdecken oder zu verändern.  
-  Sie dürfen die Marken von Doodle (insb. DOODLE) nicht für eigene Zwecke – egal welcher Art – nutzen. 
- 
-js 
- 
-> This is not necessarily true. See the [[http://www.freelists.org/post/dokuwiki/doodle-is-a-trademark-and-shouldnt-be-used-in-plugins|discussion about this issue]] on the mailinglist. --- [[user>ach|Anika Henke]] //2011/03/31 23:14// 
- 
  
 ---- ----
Line 157: Line 116:
 > Yes, I'm aware of that. But your code doesn't reflect that name and therefore doesn't work in a doodle2 directory (and therefore is incompatible with the doodle plugin). The better solution to this is to rename "syntax_plugin_doodle" to "syntax_plugin_doodle2", then it would work in a "doodle2" directory (and you would get more than 0 [[:popularity]] points). You should read more on [[devel:plugins#plugin_name|plugin names]] and [[devel:plugin_file_structure|plugin file structure]]. --- [[user>ach|Anika Henke]] //2011/12/28 12:55// > Yes, I'm aware of that. But your code doesn't reflect that name and therefore doesn't work in a doodle2 directory (and therefore is incompatible with the doodle plugin). The better solution to this is to rename "syntax_plugin_doodle" to "syntax_plugin_doodle2", then it would work in a "doodle2" directory (and you would get more than 0 [[:popularity]] points). You should read more on [[devel:plugins#plugin_name|plugin names]] and [[devel:plugin_file_structure|plugin file structure]]. --- [[user>ach|Anika Henke]] //2011/12/28 12:55//
  
- +Version 4.0 has now "doodle" everywhere: in the class name and in info.txt. I've testes the installation with the plugin manager and it worked. Ok I know, now I am still "incompatible" with the original "doodle" plugin. But I see this differently: My plugin is the sucessor, just like a new version. Version numbers are not reflected in plugin directory names, arn't they.
  
 ---- ----
Line 166: Line 124:
  
 ---- ----
-**How to actually use the plugin?**+\\ 
 +Some a11y would be nice. All options are empty cells (no label, id or title). If you have multiple options it is very difficult or even impossible for a blind person to use this. //2013-01-27 kvr//
  
-I have not succeeded in using this plugin+---- 
- +==== Icons missing in "Binky" ==== 
-I enabled inline HTML and PHP from the settings, and tried to paste the sample code into the pageWhen savedit just shows me the code but no "poll"Is there something I should know about PHP or something else? +Installing the PlugIn works ok, but on reviewing a doodle, the icons for 'edit' and 'delete' are missing
- +> It appears that these were supposed to be in the dokuwiki image folder but aren't anymore: 
-//2012-03-22 15:00// Marko+> src="/dokuwiki/lib/images/pencil.png" and src="/dokuwiki/lib/images/del.png" 
 +>> Solution: Have a look at the WRAP-PlugInwhich uses the famfamfam icon set from: http://www.famfamfam.com/lab/icons/silk/, I downloaded the set and put the pencil.png and the cancel.png into /dokuwiki/lib/images/renamed //cancel// to //del//. 
 +>> A proper fix would be to relocate the icons into the doodle internal folder.  
 +>>  --- [[user>Arthor|Arthor]] //2014/03/16 17:43//
  
 ---- ----
-I fixed some settings and it seems to work now:+==== Feature: Prefer auth=none ==== 
 +//Problem:// In my DokuWiki-installation, all users are logged in with a general 'guest' login. Every guest should be able to vote - but isn't allowed to because the login-information takes precedence over the doodle-auth='none' configuration. 
 +> //Solution:// This can be improved without affecting any other functionality, (Using //Binky// and Version 4.0 of the PlugIn) by changing two locations inside '//syntax.php//':  --- [[user>Arthor|Arthor]] //2014/03/16 18:20// 
 +<code> 
 +@lines 373ff: 
 +-        //do not vote twice, unless change__vote is set 
 +-        if (isset($this->doodle["$fullname"]) && !isset($_REQUEST['change__vote']) ) { 
 +-            $this->template['msg'] = $this->getLang('you_voted_already'); 
 +-            return; 
 +-        } 
 ++        //do not vote twice, unless change__vote is set or no authentication required 
 ++        if (isset($this->doodle["$fullname"]) && ($this->params['auth'] > self::AUTH_NONE) && (!isset($_REQUEST['change__vote']))) { 
 ++            $this->template['msg'] = $this->getLang('you_voted_already'); 
 ++            return; 
 ++        } 
 +@lines 488ff: 
 +-            if (isset($this->template['editEntry'])) { 
 +-                $fullname = $this->template['editEntry']['fullname']; 
 +-                $editMode = true; 
 +-            } else { 
 +-                if (isset($this->doodle["$fullname"]) ) return ''; 
 +-            } 
 ++            if (isset($this->template['editEntry'])) { 
 ++                $fullname = $this->template['editEntry']['fullname']; 
 ++                $editMode = true; 
 ++            } else { 
 ++                if ($this->params['auth'] == self::AUTH_NONE) { 
 ++                    $fullname = ''; 
 ++                } else { 
 ++                    if (isset($this->doodle["$fullname"]) ) return ''; 
 ++                } 
 ++            } 
 +</code>
  
-plugin directory name: **doodle2**\\  +==== Icons in Ponder Stibbons ====
-renaming some lines:\\  +
-line 52 in syntax.php:\\  +
-''class syntax_plugin_doodle2 extends DokuWiki_Syntax_Plugin''\\  +
-line 80 in syntax.php:\\  +
-''$this->Lexer->addSpecialPattern('<doodle\b.*?>.+?</doodle>', $mode, 'plugin_doodle2');''\\  +
-\\  +
-//2012-04-04 10:03// Martin+
  
-This solution didn´t work for me, so I just changed+If you want to show the icons you have to get it from an old version of dokuwiki\\ 
-  * foldername: "doodle" +the files ''delete.png'' and ''pencil.png'' have to be contained in the folder ''lib>>images''
-  * plugin.info: "base doodle"+
plugin/doodle2.1334353078.txt.gz · Last modified: 2012-04-13 23:37 by 84.57.15.2

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki