Extension talk:Tasks Extension
Add topicAny user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
Difficulty
[edit]Great extension, lots of possibilities...Unfortunately, the parser removes the namespace when creating links on the task list. Is there a way to fix this so that the links work for pages in namespaces other than (main)? 154.20.86.196 05:01, 10 November 2005 (UTC)
- Seconded.
- 71.67.100.211 04:32, 13 December 2005 (UTC)
- This is now fixed Iubito 16:03, 10 February 2006 (UTC)
- 71.67.100.211 04:32, 13 December 2005 (UTC)
--132.183.202.242 19:11, 14 February 2006 (UTC) : Great Extension, but the script doesn't extract the owner correctly, if you edit a dot (.) at the end of a task line. Can you please fix this, or provide a corrected example.
A Couple of Things
[edit]Great extension. Very handy, I especially like the special page. I have two comments / requests:
- Call me the ugly American, but a way to change the date format to American month-day-year would be nice.
- Expand it a bit with due date, and then connect it with your - equally good - Events extension
Thanks
- Aran Deltac no longer maintain/support his extensions :( I upgraded this one to version 0.4 for my needs. Not sure I'll need events extension... Iubito 16:03, 10 February 2006 (UTC)
How to get this working with MediaWiki 1.5.6?
[edit]Is there a small Tutorial or something like that? Thanks in advance
Carsten
- Thanks to google cache, I found the instructions written by Aran Deltac before he changed his website. I've just written them to Tasks Extension with some fixes. Hope this help ! Iubito 16:05, 10 February 2006 (UTC)
How assigned a task ?
[edit]How to assign a task to a given user ? I've understand it's possible, but haven't understand how to do it.
It's probably basic, but i can't find the way....
(french) Comment faire pour assigner une tâche à un utilisateur. J'ai cru comprendre que cela était possible, mais je ne trouve pas la bonne façon de saisir....
Paul FABING
- Add "(User)" at the end of a task line
- Ajoute « (Utilisateur) » à la fin d'une ligne
- --82.255.247.96 06:11, 27 February 2006 (UTC)
Mais bon sang mais c'est bien sûr !! Merci 82.227.68.218 21:51, 2 March 2006 (UTC)
Kudos
[edit]--Metasim 14:09, 3 March 2006 (UTC)
Thanks a bunch for bringing this to MediaWiki!! Great work!
How do I put a <tasks> tag in a template?
[edit]I'd like to create a template that creates tasks but it does not work. <tasks> [{{{4}}}] {{{5}}} ({{{6}}}) </tasks> Thanks! -David
Nice extension, Iubito! I added a little code to savetasks(), specifically:
... # Rebuild the $tasks_buffer array (in case we're on a <calendar> page) clearTasks(); $content = array(); $tags = array(); $params = array(); Parser::extractTagsAndParams( 'tasks', $text, $content, $tags, $params ); foreach($tags as $marker => $markerVal) tasksHook( $content[$marker], $params[$marker] ); ...
and added the $user and $text incoming parameters to saveTasks(). This was to solve a problem where the "Calendar" extension is rendering (and parsing) text from other pages (which may contain tasks). saveTasks() was then saving repeats of the tasks in the 'tasks' table, attributing them to the page that contained the "calendar" call. This modification maintains attribution to just the page being edited. martin - at - ac6rm.net
Error
[edit]--68.186.119.215 08:51, 3 April 2006 (UTC)
I am getting the following error thrown at me once for each task listed on a page:
Notice: Undefined index: hidden in /var/www/vhosts/forgestudios.com/httpdocs/dev/extensions/Tasks.php on line 44
So for example, if I have
<tasks> [ ] Regular task (Owner User) [1] High priority task. [2] Medium priority task. [3] Low priority task (Owner User) [!] Urgent task. [x] Closed task. </tasks>
I will have the following php errors:
Notice: Undefined index: hidden in /var/www/vhosts/forgestudios.com/httpdocs/dev/extensions/Tasks.php on line 44 Notice: Undefined index: hidden in /var/www/vhosts/forgestudios.com/httpdocs/dev/extensions/Tasks.php on line 44 Notice: Undefined index: hidden in /var/www/vhosts/forgestudios.com/httpdocs/dev/extensions/Tasks.php on line 44 Notice: Undefined index: hidden in /var/www/vhosts/forgestudios.com/httpdocs/dev/extensions/Tasks.php on line 44 Notice: Undefined index: hidden in /var/www/vhosts/forgestudios.com/httpdocs/dev/extensions/Tasks.php on line 44 Notice: Undefined index: hidden in /var/www/vhosts/forgestudios.com/httpdocs/dev/extensions/Tasks.php on line 44
I am using the tabbed menu mod, but it is not in a template, nor am I using it on any page with the tasks. Other than that, it is a completely clean install. Any help would be appreciated. Thank you.
I've fixed that - I added an isset() to the Tasks.php. 88.108.59.121
Fixed with isset()
[edit]Could you show me an example of how you were able to fix that?
Error
[edit]When i include Tasks i got an error message
UNIQ63....
All my <anything></anything> are replaced by this error
I am suffering from the same thing - using this extension would 'scrap' all other extensions relying on <tags></tags> which is a shame because it is such a valuable extension 82.31.216.212 02:07, 5 July 2006 (UTC)
MediaWiki 1.6.7 support
[edit]I replaced some functions with this code to make the extension work with MediaWiki 1.6.7 :
extensions/Tasks.php
-----------------------------------------------# # Purpose : HTML format a task. function formatTask( $status, $summary, $owner='', $page='' ) { global $wgOut, $wgScriptPath; $imgTitle = 'Regular task'; $alt = '[ ]'; $output = '<img src="'.$wgScriptPath.'/images/task'; switch ($status) { case 'x': $output .= '_done'; $alt = '[x]'; $imgTitle = 'Closed task'; break; case '!': $output .= '_alert'; $alt = '[!]'; $imgTitle = 'Urgent task'; break; case '1': $output .= '_1'; $alt = '[1]'; $imgTitle = 'High priority task'; break; case '2': $output .= '_2'; $alt = '[2]'; $imgTitle = 'Medium priority task'; break; case '3': $output .= '_3'; $alt = '[3]'; $imgTitle = 'Low priority task'; break; } $output .= '.png" width="13" height="13" alt="'.$alt.'" title="'.$imgTitle.'" /> '; if ($owner) { $summary .= ' ([[User:'.$owner.'|'.$owner.']])'; } if ($page) { $summary = "[[:$page]]: ".$summary; } // parse() cannot be called recursively, so we need to create a new Parser global $wgTitle; $localParser = new Parser(); $options = ParserOptions::newFromUser( $wgUser ); $out = $localParser->parse($summary, $wgTitle, $options, false); $output .= $out->getText().'<br />'; return $output; } #-----------------------------------------------# # Purpose : Used after a page is saved to first delete # all tasks and then save the new ones created # in the tasks buffer. # Parameters: article, The article object. # rev: 2006-03-12: <calendar> extension will cause double-logging of # tasks rendered on a sub-page. "Rebuild" section prevents this. function saveTasks( $article, $user, $text ) { global $tasks_buffer; global $wgOut; $page_id = $article->getID(); $dbr =& wfGetDB( DB_MASTER ); # Delete all tasks for this page. $dbr->delete( 'tasks', array( 'page_id' => $page_id ) ); # Rebuild the $tasks_buffer array (in case we're on a <calendar> page) clearTasks(); $matches = array(); $elements[] = 'tasks'; $text = Parser::extractTagsAndParams( $elements, $text, $matches ); foreach( $matches as $marker => $data ) { list( $element, $content, $params, $tag ) = $data; tasksHook( $content, $params ); } # Re-insert all tasks that were created when parsing this page. foreach ($tasks_buffer as $task) { $task['page_id'] = $page_id; $dbr->insert( 'tasks', $task ); } return 1; }
It doesn't work for me
[edit]I don't remember the error message, 'cause I've tried a lot of things, but this didn't work for me.
As it's a parser extension, there is a 3rd parameter &$parser I add to tasksHook (and then to formatTask). It work in the articles. But the special page doesn't work anymore, 'cause it doesn't know this $parser. It only knows $wgParser which doesn't have mOptions and then fails... :'(
--Iubito 21:20, 6 July 2006 (UTC)
A local parser
[edit]It's not a good idea the local parser, because it has not the other extension registered (my summary contain <anotherextensiontag></anotherextensiontag> and it costs some ms each time to create it.
After a big headache and a lot of help from TimStarling on IRC, I've the solution. I update the article.
--Iubito 07:03, 7 July 2006 (UTC)
Multiple tasks in one page
[edit]I got a problem when putting <tasks></tasks> in more than one place on my page. i.e:
<tasks>[x] foo</tasks> == foo == * <tasks>[1] bar</tasks> * <tasks>[2] foo</tasks> === bar === <tasks> [x] foo [1] foo [2] foo [3] foo </tasks>
Someone could please help me?
- Ponsfrilus 13:49, 10 July 2006 (UTC)
- What output do you get? I get the same tasks repeating below, which is not the desired output.
- Same problem here. Add clearTasks(); after the global $tasks_buffer; statement in the tasksHook function.
- Hackerssidekick 08:11, 19 July 2006 (UTC)
- I'm getting the same behavior, every time I enter a new tasks block it displays all the tasks up to that point from the whole page.--TheChin! 18:11, 4 August 2006 (UTC)
where to find older versions
[edit]where can i find older versions of the script, so i can use it with older mediawiki versions?
- Look at the history of the page --82.248.126.211 19:04, 16 July 2006 (UTC)
screenshot request
[edit]This is better before spending time to install .... mailto:sancelot@free.fr
Yes, please post a screenshot or running demo on a wiki.
A few comments
[edit]The version numbers should be the same for Tasks.php and Special:Tasks.php, since an overall version # is listed at the top of the page.
In MW 1.6.7 the parameters don't seem to have any effect because arg_string passed to execute is empty. Try using wgRequest instead of this parameter, it's more inline with what MW does.
--Tderouin 20:51, 21 August 2006 (UTC)
Works for MediaWiki 1.7.1 - with a couple mods
[edit]A few things I needed to do a few things to get it working in MediaWiki 1.7.1.
First, I followed the comments above in MediaWiki 1.6.7 support comment above. Copying and pasteing the revised functions.
Second, in extensions/Tasks.php I modified the function as below:
#-----------------------------------------------# function saveTasks( $article, $user, $text ) { global $tasks_buffer; global $wgOut; $page_id = $article->getID(); $dbr =& wfGetDB( DB_MASTER ); # Delete all tasks for this page. $dbr->delete( 'tasks', array( 'page_id' => $page_id ) ); # Rebuild the $tasks_buffer array (in case we're on a <calendar> page) # Updated parameter values and return values for extractTagsAndParams function. # The lines below work with Wiki 1.7.1 clearTasks(); $matches = array(); $tags = array(); $params = array(); $element = 'tasks'; $text = Parser::extractTagsAndParams( $element, $text, $matches, $tags, $params ); foreach( $matches as $marker => $data ) { $content = $data; addToTaskBuffer($content); } # Re-insert all tasks that were created when parsing this page. foreach ($tasks_buffer as $task) { $task['page_id'] = $page_id; $dbr->insert( 'tasks', $task ); } return 1; }
As mentioned in my code comments, I am not sure at what version MediaWiki cahnged the extractTagsAndParams function. I do know that I need to update this section to get the information for saving to the database in MediaWiki 1.7.1.
Now it seems to work fine. Please comment if anyone finds a better solution. I suppose one should do a little error checking here for MediaWiki version number and return the correct value no matter what version, but who has the time. :)
Robin
Use of Special:Tasks as a template
[edit]I would like to use lists of tasks as a template:
{{Special:Task}}
But it do not work. It work for me on Newpages:
{{Special:Newpages/10}}
Could not make it work with version 1.67
[edit]I have used the latest Tasks.php and SpecialTasks.php and the versions 0.51 with MediaWiki. I cannot save the tasks. I just get usual text and no formatted out put when I try to save anything with the tasks tag. The database is not getting populated either. The special page comes out empty as a result. Any ideas?
In addition following the modifications through the history and discussions is kind of confusing. Please post separately working versions for various versions of MediaWiki.
Duplicated tasks
[edit]I ran into an small bug where a page with multiple tasks would have task duplication.
The following code
<tasks> [ ] a [ ] b </tasks> <tasks> [ ] c [ ] d [ ] e </tasks>
would produce the output
[ ] a [ ] b [ ] a [ ] b [ ] c [ ] d [ ] e
To fix it I clear the task buffer by inserting
$tasks_buffer = array();
to line 30 which is just before the call to addToTaskBuffer($content) in the tasksHook function.
--Superjodash 19:15, 11 January 2007 (UTC)
Hidden Attribute ignored
[edit]working with MW 1.6.9, the extesnsion works except for the hidden parameter which seems to be ingnored (Aran originally put it at my request), the system doesn't seem to update the the hidden field in the database correctly, it is always 'n', if you set the value in the database to 'y' then it is ignored and the tasks still appear on the article page. (The idea was that hidden tasks don't appear on the article page but do in the special:tsks page), any help ?
Notice: Undefined offset
[edit]At the Special:Tasks page the following error is thrown in the header of the page:
Notice: Undefined offset: 1 in /home/httpd/vhosts/lalal.nl/httpsdocs/wiki/includes/SpecialTasks.php on line 48
Notice: Undefined index: limit in /home/httpd/vhosts/lalal.nl/httpsdocs/wiki/includes/SpecialTasks.php on line 53
Notice: Undefined index: owner in /home/httpd/vhosts/lalal.nl/httpsdocs/wiki/includes/SpecialTasks.php on line 56
Notice: Undefined index: status in /home/httpd/vhosts/lalal.nl/httpsdocs/wiki/includes/SpecialTasks.php on line 62
Notice: Undefined index: owner in /home/httpd/vhosts/lalal.nl/httpsdocs/wiki/includes/SpecialTasks.php on line 65
Notice: Undefined index: hidden in /home/httpd/vhosts/lalal.nl/httpsdocs/wiki/includes/SpecialTasks.php on line 68
Notice: Undefined index: owner in /home/httpd/vhosts/lalal.nl/httpsdocs/wiki/includes/SpecialTasks.php on line 82
I followed the instructions carefully, so I have no idea of what went wrong. Any ideas? Thnx in advance!
--83.85.174.37 13:18, 11 February 2007 (UTC)
- I discovered I've the problem too. I think it's due to a recent version of MW. I'll check what happen.
- --Iubito 07:17, 13 February 2007 (UTC)
- Solved !
- In SpecialTasks.php, when there is
if ($args['...'])
, replace byif (isset($args['...']))
- and also, line 44 :
# Parse arguments. $args = array(); if ($args_string != '') { foreach (explode('&',$args_string) as $pair) { $pair = explode('=',$pair); $args[$pair[0]] = $pair[1]; } }
- (I encapsulate the foreach in the if)
- --Iubito 04:17, 22 February 2007 (UTC)
"My Tasks"-link in personal toolbar
[edit]Just wanted to throw in that we have edited ./includes/SkinTemplate.php ~ line 523 on our wiki, like this:
# "My Tasks" $href = self::makeSpecialUrl( 'Tasks' ); $personal_urls['mytasks'] = array( 'text' => wfMsg( 'mytasks' ), 'href' => $href."/owner=".$this->username, 'active' => ( $href == $pageurl ) );
in order to get a "My Tasks" link for every user in their personal toolbar, which links to Special:Tasks/owner=Username. I thought some of you might like that too. Mutante 10:21, 20 May 2007 (UTC)
Oh, and you need to put something like "my tasks" into MediaWiki:mytasks, too.
Can't sign tasks
[edit]As we work on Customer-related pages, we'd like to sign & date each task with ~~~~ to keep track of WHO/WHEN a task was assigned... But we just get plain signature signs.
<tasks> [ ] Do something ~~~~(fredt34) </tasks>
will do nothing.
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.
Don't work with MediaWiki v1.11.0
[edit]The instructions don't parse in article... --201.52.31.55 00:27, 30 September 2007 (UTC)
Should work. Made a few changes : http://www.mediawiki.org/w/index.php?title=Extension%3ATasks_Extension&diff=173913&oldid=147662
--210.212.194.165 23:10, 13 March 2008 (UTC)
Hidden Attribute not effective
[edit]The 'hidden' attribute doesn't seem to hide the tasks on the article page.
Tarlachmoorhouse 12:49, 20 December 2007 (UTC)
MW1.12 Saving page with task causes Fatal error in Parser.php
[edit]Hello, On my mediawiki 1.12, when I save a page with a tasks, I get this error : Fatal error: Using $this when not in object context in /home/.../includes/Parser.php on line 563
The page is saved. I didn't tried to modify the task to see if it is changed or not.
The line 563 in Parser.php :
$marker = "$uniq_prefix-$element-" . sprintf('%08X', $n++) . $this->mMarkerSuffix;
--Iubito 16:38, 26 March 2008 (UTC)
- Bug opened :bugzilla:13522:--Iubito 16:58, 26 March 2008 (UTC)
- I get this for the PageProtectionPlus extension. I changed the class definition of the extensions' Parser to extend MW's Parser class. It didn't work, but at least the error went away.
require_once('Parser.php'); class XXXXxxxParser extends Parser {
where XXXXxxxx is the name of the Extension's parser definition. --Otheus 15:44, 10 July 2008 (UTC)
Using the extension on templates don't work correct
[edit]if you use <tasks> on a template, the link to the article is wrong (Namespace is ignored). --87.174.143.147 20:55, 3 May 2008 (UTC)
referring a deleted article crashes the special page
[edit]If you delete an article and run rebuild all, the specialpage:tasks crashes with the following error: Call to a member function getText() on a non-object in extensions\ToDo\SpecialTasks.php on line 100 Check against tab. page. Sorry i can't fix it, but a different sql solve the problem.
select p.* from page p, tasks t where p.page_id=t.Page_id .....
--87.174.143.147 20:55, 3 May 2008 (UTC)
image location / rewrite rules
[edit]hi, As my wiki uses short/nice urls, I use rewrite rules which only dont rewrite for urls starting with "/skins/". As i dont want to modifiy them I put the images in /skins/tasks/... I think this is generally a better place for system images. The images folder is only for wiki user uploaded stuff IMO. florian groovehunter 05:12, 1 July 2008 (UTC)
MW 1.12 Error
[edit]I am using MediaWiki 1.12 and after following the install instructions I am seeing the following error: 'Cannot modify header information - headers already sent by (output started at /var/www/mediawiki-1.12.0/extensions/Tasks.php:154) in /var/www/mediawiki-1.12.0/includes/WebResponse.php on line 10'. I am also using the following extensions: BreadCrumbs,ParserFunctions (Version 1.1.1), DiscussionThreading, New User Email Notification (Version 1.5.1) and NewUserMessage (Version 1.0.1, 2008-02-10). Any help would be greatly appreciated. --Timvaverchak 13:00, 22 July 2008 (UTC)
- The problem is probably that you have an empty line at the end of Tasks.php ans SpecialTasks.php.
- --Sébastien Grenier 16:20, 23 December 2008 (UTC)
In MW 1.13.3 some tasks not show
[edit]I have a list of 15 tasks like this:
<tasks> [ ] 1 [ ] 2 [x] 3 [x] 4 [ ] 5 ... [ ] 14 [ ] 15 </tasks>
and I have only 12 tasks that show. Any ideas?
- When I move some tasks, change the order, they appear.
- I use a old version of Task.php (version 0.41.2), I've updated, but I got the Warning : cannot modify header information - headers already sent by (output started at /var/www/wiki/extensions/Tasks.php:154) in /var/www/wiki/includes/WebResponse.php on line 10
- Everything is fine! I have empty line at the end of Tasks.php and SpecialTasks.php that cause the warning.
- --Sébastien Grenier 16:21, 23 December 2008 (UTC)
- I use a old version of Task.php (version 0.41.2), I've updated, but I got the Warning : cannot modify header information - headers already sent by (output started at /var/www/wiki/extensions/Tasks.php:154) in /var/www/wiki/includes/WebResponse.php on line 10
To come back with my first problem, when someone type a NO-BREAK SPACE between [], like this [ ], Tasks extension will hide the line just like when you put a X like this [X]. Is there any way to avoid that? --Sébastien Grenier 18:07, 23 December 2008 (UTC)
Tidy + Tasks = too many paragraph tags!
[edit]I am using Tidy to to fix a different problem but not the Tasks Exctension os acting up. I get a bunch of extra paragraph tags around the task images. Anyone else have this issue? Can I get Tidy to ignore the Tasks? Can I turn off the tidy parsing inside the Tasks extension?
MW 1.11.0 Tasks 0.5.4
Thanks, Pete. --Mulciber 13:36, 19 February 2009 (UTC)
Is it possible to have the tasks show on the page you're creating them on?
[edit]The extension is working perfectly - however I would like to know if it's possible to have the tasks show up on the actual page I'm putting them on in addition to the Special:Tasks page. What I'm doing now is putting a To Do section at the bottom on multiple pages, and having to duplicate my tasks like this:
Task 1
Task 2
<tasks>
[ ]Task 1
[ ]Task 2
</tasks>
so I can see them on the regular page as well as the Special:Tasks page. Any way to avoid unnecessary duplication?
Thanks! 69.113.219.231 07:20, 1 November 2009 (UTC)
- I am also having this issue on 1.15. (to the original poster, the extension would appear not to be working if you have to manually duplicate your tasks). Tasks are created and entered into the database fine and show on the Special page. But there is no output on the original article page. Any suggestions? I prefer this lightweight extension to the cumbersome Todo_Tasks, and would like to get it working! Seems like it might be a quick fix for someone who knows the code... 216.158.20.138 21:54, 9 December 2009 (UTC)
- Bump --SomaticJourney 16:03, 8 March 2010 (UTC)
- I have 2 MediaWiki installations. The one on Win2K3 with IIS 6, PHP 5.2.9-2, and MySQL 5.1 works fine with this extension. The install on Ubuntu 10.04LTS with MySQL 5.1.41-3ubuntu12.1 and PHP 5.3.2-lubuntu4.2 and Apache 2.2.14-5ubuntu8, installed with this guide, does not work with this extension. Tasks do not show on the page with the <tasks></tasks> tags but do show on the special tasks page. I have since upgraded both sites from MediaWiki 1.15 to 1.17alpha and get the same results. --64.102.254.33 16:41, 7 June 2010 (UTC)
- Bump --SomaticJourney 16:03, 8 March 2010 (UTC)
SQL statement is not postgres compatible
[edit]the sql statment that has to be executed does not work on a postgres based installation. it doesn't like at least the unsigned and the enum part.
Special page doesn't create link to correct wikipage
[edit]Extension seem to work nicely except that special page doesn't create links to correct wikipages. Instead of link to wikipage there is a broken link containing something like: Object #432 (page does not exist)
I checked that correct page_id is stored in database. It just doesn't seem to generate link properly.
I am using MediaWiki 1.15.3, PHP 5.1.6 (apache2handler) and MySQL 5.0.22
Any ideas?
--JuhaV 10:42, 25 May 2010 (UTC)
All-in-One-Directory and a Few Tips
[edit]First thing I saw is that this extension needs many files spread all over your wiki's root directory. And also, it suggest to run a query on your database to create the table it need.
With all these things in my mind, I decided to install it in my work's wiki, but, to follow my work's standarts, I touched a few things and moved it's files to one directory called Tasks
inside $IP/extensions/
.
These are the steps I walked:
- Create a directory called
$IP/extensions/Tasks
. - Create a new file called
$IP/extensions/Tasks/include.me.php
using this content:<?php /* * Allowing to include files from $IP/includes. */ set_include_path("$IP".DIRECTORY_SEPARATOR."includes".PATH_SEPARATOR.get_include_path()); require_once 'GlobalFunctions.php'; /* * Creating database table (only if it doesn't exist). * @{ */ global $wgDBtype; if($wgDBtype == 'mysql') { global $wgDBprefix; global $wgPieceOfCodeConfig; $dbr = &wfGetDB(DB_SLAVE); if(!$dbr->tableExists('tasks')) { $sql = "CREATE TABLE `{$wgDBprefix}tasks` (\n". " page_id INT UNSIGNED NOT NULL DEFAULT 0,\n". " STATUS ENUM('!','1','2','3',' ','x') NOT NULL DEFAULT ' ',\n". " owner CHAR(255) NOT NULL,\n". " summary MEDIUMTEXT NOT NULL,\n". " hidden ENUM('y','n') NOT NULL DEFAULT 'n',\n". " KEY owner_idx (owner)\n". ");"; $error = $dbr->query($sql); if($error !== true) { die(__FILE__.":".__LINE__); } } } else { die(__FILE__.":".__LINE__); } /* @} */ /* * Including extension files. */ require_once 'Tasks.php'; require_once 'SpecialTasks.php'; ?>
- Create a new file called
$IP/extensions/Tasks/Tasks.php
using the content specified for the extensioncode. Here we have to touch some lines:- Find a line with this:
function tasksHook( $content, $args = null, &$parser) {
And replace it by:
Note: Maybe this is not necessary, but I had to do it in order to make work on MediaWiki 1.17function tasksHook( $content, $args = null, $parser) {
- Find a line with this:
$img = '<img src="'.$wgScriptPath.'/images/task';
And replace it by:
This will point every image request to a directory inside$img = '<img src="'.$wgScriptPath.'/extensions/Tasks/images/task';
$IP/extensions/Tasks/Tasks.php
.
- Find a line with this:
- Create a new file called
$IP/extensions/Tasks/SpecialTasks.php
using the content specified for the extensioncode. Here we have to touch some lines too:- Find a line with this:
SpecialPage::SpecialPage('Tasks', $restriction ) ;
And replace it by:
parent::__construct('Tasks', $restriction ) ;
On some versions of PHP, in order to call a super constructor, you need to do something like the second piece of code.
Note: I hope I'm not sending fruit saying this about PHP, but it worked out for me.
- Find a line with this:
- Create a directory called
$IP/extensions/Tasks/images
and download all images suggested for the extension into itimages. - Last step is just add this line at the end of your LocalSettings.php:
require_once "$IP/extensions/Tasks/include.me.php";
All this stuff may be a little bit strange, but now, I have this extension isolated in it's own directory, and if I need to remove it, I just remove it from LocalSettings.php and delete it from $IP/extensions
.
I hope this will help any of you, and thanks for loosing your time reading this section.
--Daemonraco 01:43, 25 September 2010 (UTC)
- --Daemonraco 01:49, 25 September 2010 (UTC): I'm sorry if I repeated a tip already told, It wasn't my intension
Working in 1.18
[edit]I've only been working with this extension for a couple of months, but I like it's simplicity. Does what I need and easy to use. When I updated to 1.18 it stopped working. After a fair bit of fiddling I was able to make it work. Instead of posting the changes to the code, I'm just going to post the code that worked for me. Fair warning; I'm an amateur developer at best, so no guarantees.
2012-02-14 Update: Added code to automatically create table if doesn't exist (credit to Daemonraco), so the last step is no longer necessary. Only limited testing has been done, so feed back is always appreciated. Should be noted this is only for MySQL.
- Create folder extensions/Tasks
- Create folder extensions/Tasks/images
- Copy the images from Tasks_Extension#Images to extensions/Tasks/image folder (image file names should all start with 'task_')
- Copy and paste the code below to their respective files to extensions/Tasks folder.
- Add
include("extensions/Tasks/Tasks.php");
to LocalSettings.php. Create tasks Table inside your database by running the mySQL code on the Extension Page
extensions/Tasks/Tasks.php |
---|
<?php
# MediaWiki Tasks version 0.5.5
# Copyright (c) 2005 Aran Clary Deltac
# http://arandeltac.com/MediaWiki_Tasks
# Copyright (c) 2006 Sylvain Machefert, mods by mhc, Filo, James,
# Guillaume Pratte, Dangerville, Daemonraco, Deplicator
# http://www.mediawiki.org/wiki/Extension:Tasks_Extension
# Distributed under that same terms as MediaWiki itself.
$wgExtensionCredits['specialpage'][] = array(
'name'=>'Tasks',
'author'=>'Aran Clary Deltac',
'url'=>'http://www.mediawiki.org/wiki/Extension:Tasks_Extension',
'description'=>'Provides the ability to create tasks on any page of your MediaWiki',
'version'=>'0.5.5'
);
$dir = dirname(__FILE__) . '/';
$wgAutoloadClasses['SpecialTasks'] = $dir . 'SpecialTasks.php'; # Location of the SpecialMyExtension class (Tell MediaWiki to load this file)
$wgSpecialPages['Tasks'] = 'SpecialTasks'; # Tell MediaWiki about the new special page and its class name
$wgExtensionFunctions[] = "wfTasksExtension";
$wgHooks['ArticleSave'][] = 'clearTasks';
$wgHooks['ArticleSaveComplete'][] = 'saveTasks';
global $tasks_buffer;
#-----------------------------------------------#
# Purpose: Create table in database if one does not exist.
set_include_path("$IP".DIRECTORY_SEPARATOR."includes".PATH_SEPARATOR.get_include_path());
require_once 'GlobalFunctions.php';
global $wgDBtype;
if($wgDBtype == 'mysql') {
global $wgDBprefix;
global $wgPieceOfCodeConfig;
$dbr = &wfGetDB(DB_SLAVE);
if(!$dbr->tableExists('tasks')) {
$sql = "CREATE TABLE `{$wgDBprefix}tasks` (\n".
" page_id INT UNSIGNED NOT NULL DEFAULT 0,\n".
" STATUS ENUM('!','1','2','3',' ','x') NOT NULL DEFAULT ' ',\n".
" owner CHAR(255) NOT NULL,\n".
" summary MEDIUMTEXT NOT NULL,\n".
" hidden ENUM('y','n') NOT NULL DEFAULT 'n',\n".
" KEY owner_idx (owner)\n".
");";
$error = $dbr->query($sql);
if($error !== true) {
die(__FILE__.":".__LINE__);
}
}
} else {
die(__FILE__.":".__LINE__);
}
#-----------------------------------------------#
#-----------------------------------------------#
# Purpose : Declare parser extensions.
function wfTasksExtension() {
global $wgParser;
$wgParser->setHook( "tasks", "tasksHook" );
}
#-----------------------------------------------#
# Purpose : Display a list of tasks.
# Parameters: content, A list of tasks, one per line.
# args, An array of arguments.
# Arguments : hidden, All tasks will be hidden in the HTML.
# Returns : Tasks HTML.
function tasksHook( $content, $args = null, $parser) {
global $tasks_buffer;
clearTasks();
addToTaskBuffer($content);
$hidden = '';
if (isset($args['hidden'])) {
$hidden = 'y';
}
else {
$hidden = 'n';
}
$output = '';
#if you want tasks create a new section...
# $parserOutput = $parser->parse('== [[Special:Tasks|Tasks]] ==', $parser->mTitle, $parser->mOptions, false, false);
# $output .= $parserOutput->getText();
foreach ($tasks_buffer as $task) {
$task['hidden'] = $hidden;
$output .= formatTask(
$task['status'],
$task['summary'],
$task['owner'],
'',
$parser);
}
return $output;
}
function addToTaskBuffer($content) {
global $tasks_buffer;
$tasks = preg_split("/[\n\r]+/", $content);
foreach ($tasks as $task) {
if (preg_match('/^\s*\[([123x! ])\]\s*(.*)$/',$task,$matches)) {
$status = $matches[1];
$summary = $matches[2];
$owner = '';
# the regexp updated by SebM (sebm@seren-com-pl) 22 March 2007
# to allow parentheses ( ) in task description
if (preg_match('/^(.+?)\s*\(([^()]+)\)$/',$summary,$matches)) {
$summary = $matches[1];
$owner = $matches[2];
}
$tasks_buffer[] = array(
'summary' => $summary,
'status' => $status,
'owner' => $owner,
'hidden' => 'n'
);
}
}
}
#-----------------------------------------------#
# Purpose : HTML format a task.
function formatTask( $status, $summary, $owner='', $page='', &$parser ) {
global $wgScriptPath, $wgTitle;
$imgTitle = 'Regular task'; $alt = '[ ]';
$img = '<img src="'.$wgScriptPath.'/extensions/Tasks/images/task';
switch ($status) {
case 'x': $img .= '_done'; $alt = '[x]'; $imgTitle = 'Closed task'; break;
case '!': $img .= '_alert'; $alt = '[!]'; $imgTitle = 'Urgent task'; break;
case '1': $img .= '_1'; $alt = '[1]'; $imgTitle = 'High priority task'; break;
case '2': $img .= '_2'; $alt = '[2]'; $imgTitle = 'Medium priority task'; break;
case '3': $img .= '_3'; $alt = '[3]'; $imgTitle = 'Low priority task'; break;
}
$img .= '.png" width="13" height="13" alt="'.$alt.'" title="'.$imgTitle.'" /> ';
if ($owner) { $summary .= ' ([[Special:Tasks/owner='.$owner.'|'.$owner.']])'; }
if ($page) { $summary = "[[:$page]]: ".$summary; }
$parserOutput = $parser->parse($summary, $parser->mTitle, $parser->mOptions, false, false);
return $img . ' ' . $parserOutput->getText() . '<br />';
}
#-----------------------------------------------#
# Purpose : Used before saveing a page to clear the tasks buffer.
function clearTasks() {
global $tasks_buffer;
$tasks_buffer = array();
return 1;
}
#-----------------------------------------------#
# Purpose : Used after a page is saved to first delete
# all tasks and then save the new ones created
# in the tasks buffer.
# Parameters: article, The article object.
# rev: 2006-03-12: <calendar> extension will cause double-logging of
# tasks rendered on a sub-page. "Rebuild" section prevents this.
function saveTasks( $article, $user, $text ) {
global $tasks_buffer;
$page_id = $article->getID();
$dbr =& wfGetDB( DB_MASTER );
# Delete all tasks for this page.
$dbr->delete(
'tasks',
array( 'page_id' => $page_id )
);
# Rebuild the $tasks_buffer array (in case we're on a <calendar> page)
clearTasks();
$matches = array();
$elements[] = 'tasks';
$text = Parser::extractTagsAndParams( $elements, $text, $matches );
foreach( $matches as $marker => $data ) {
list( $element, $content, $params, $tag ) = $data;
addToTaskBuffer($content);
}
# Re-insert all tasks that were created when parseing this page.
foreach ($tasks_buffer as $task) {
$task['page_id'] = $page_id;
$dbr->insert(
'tasks',
$task
);
}
return 1;
}
|
extensions/Tasks/SpecialTasks.php |
---|
<?php
# MediaWiki Tasks version 0.5.4 (adapted for MediaWiki 1.18 by Deplicator)
# Copyright (c) 2005 Aran Clary Deltac
# http://arandeltac.com/MediaWiki_Tasks
# Copyright (c) 2006 Sylvain Machefert, mods by mhc, Filo, James,
# Guillaume Pratte, Dangerville, OZZ
# http://www.mediawiki.org/wiki/Extension:Tasks_Extension
# Distributed under that same terms as MediaWiki itself.
class SpecialTasks extends SpecialPage {
function __construct() {
parent::__construct( 'Tasks' );
}
# constructor
function SpecialTasks($restriction = '')
{
parent::__construct('Tasks', $restriction ) ;
}
# override of the abstract execute() function, manages the output
function execute($args_string)
{
global $wgOut, $wgTitle, $wgParser;
$page_titles = array();
$dbr =& wfGetDB( DB_MASTER );
# Parse arguments.
$args = array();
if ($args_string != '') {
foreach (explode('&',$args_string) as $pair) {
$pair = explode('=',$pair);
$args[$pair[0]] = $pair[1];
}
}
# Define options for the SQL.
$options = array( 'ORDER BY'=>'status' );
if (isset($args['limit'])) {
$options['LIMIT'] = $args['limit'];
}
if (isset($args['owner'])) {
$args['owner'] = str_replace( '_', ' ', $args['owner'] );
}
# Create the WHERE clause.
$where = array();
//$where[]='tasks.page_id=page.page_id';
$where[]='t.page_id=p.page_id';
if (isset($args['status'])) {
$where[] = 'status<="'.$args['status'].'"';
}
if (isset($args['owner'])) {
$where[] = 'owner="'.$args['owner'].'"';
}
if (!isset($args['hidden'])) {
$where[] = 'hidden="n"';
}
# Run the SQL.
/*
$res = $dbr->
select( array('tasks','page'),
array('page.page_id','status','owner','summary','page_namespace'),
$where, 'Database::select',$options);
*/
$res = $dbr->
select( array($dbr->tableName('tasks').' as t',$dbr->tableName('page').' as p'),
array('p.page_id','status','owner','summary','page_namespace'),
$where, 'Database::select',$options);
#select( $table, $vars, $conds='', $fname = 'Database::select', $options = array() )
if (!$res) { return; }
# Set the title for this page.
if (isset($args['owner'])) {
$wgOut->setPageTitle( $args['owner'].'\'s Tasks' );
}
else {
$wgOut->setPageTitle( 'Tasks' );
}
# Generate HTML list of tasks.
#attach title and options
$wgParser->parse('nothing', $wgTitle, new ParserOptions(), false, true);
$count = 0;
$last_severity = '';
while ($task = $dbr->fetchRow( $res )) {
if (!isset($page_titles[$task['page_id']])) {
$page_titles[$task['page_id']] =
Title::makeTitle( $task['page_namespace'],
Title::newFromID($task['page_id'])->getText()
);
}
$page_title = $page_titles[$task['page_id']];
$wgOut->addHTML(
formatTask(
$task['status'],
$task['summary'],
$task['owner'],
$page_title,
$wgParser)
);
$count++;
}
$dbr->freeResult( $res );
# Display a message if there are no tasks.
if (!$count) {
$wgOut->addWikiText('No tasks found!');
}
# http://meta.wikimedia.org/wiki/Talk:Permissions (Error message with MediaWiki v1.6.5)
# explains line below
$wgOut->setArticleFlag( false );
}
}
|
working in 1.18.1
[edit]The above code works like a charm, out of the box. Opfeifer 22:26, 26 January 2012 (UTC)
Small problem in 1.19
[edit]The code above works pretty well, though there is a problem with the link on Specialpage:specialpages. Even though it leads to correct page, it shows as <tasks>
insted of Tasks
. Could anyone find a fix for that?
1.19 working version
[edit]I've made an internationalized version of this extension, so it's easy to use it in onther languages. Also, i've added a [?] () task, as a task which has to be decided whether it is done or not. Unfortunately, the database updating script doesn't work with me so I was forced to remove it. It would be really cool if one could make an SQL table adding script for this. The internalization file also fixes the bug mentioned above. So to install the extension:
Installation
[edit]Copy/paste the following codes in files.
extensions/Tasks/Tasks.php |
---|
<?php
# MediaWiki Tasks version 0.5.7 (adapted for MediaWiki 1.18 by Deplicator)
# Internationalized by Golob
# Copyright (c) 2005 Aran Clary Deltac
# http://arandeltac.com/MediaWiki_Tasks
# Copyright (c) 2006 Sylvain Machefert, mods by mhc, Filo, James,
# Guillaume Pratte, Dangerville, OZZ
# http://www.mediawiki.org/wiki/Extension:Tasks_Extension
# Distributed under that same terms as MediaWiki itself.
$dir = dirname(__FILE__) . '/';
$wgExtensionCredits['specialpage'][] = array(
'path' => $dir,
'name' => 'Tasks',
'author' => 'Aran Clary Deltac',
'url' => 'http://www.mediawiki.org/wiki/Extension:Tasks_Extension',
'descriptionmsg' => 'tasks-desc',
'version' => '0.5.7'
);
$wgAutoloadClasses['SpecialTasks'] = $dir . 'SpecialTasks.php';
$wgSpecialPages['Tasks'] = 'SpecialTasks';
$wgExtensionFunctions[] = "wfTasksExtension";
$wgExtensionMessagesFiles['Tasks'] = $dir . 'Tasks.i18n.php';
$wgExtensionMessagesFiles['TasksAliases'] = $dir . 'Tasks.alias.php';
$wgHooks['ArticleSave'][] = 'clearTasks';
$wgHooks['ArticleSaveComplete'][] = 'saveTasks';
global $tasks_buffer;
#-----------------------------------------------#
#-----------------------------------------------#
# Purpose : Declare parser extensions.
function wfTasksExtension() {
global $wgParser;
$wgParser->setHook( "tasks", "tasksHook" );
}
#-----------------------------------------------#
# Purpose : Display a list of tasks.
# Parameters: content, A list of tasks, one per line.
# args, An array of arguments.
# Arguments : hidden, All tasks will be hidden in the HTML.
# Returns : Tasks HTML.
function tasksHook( $content, $args = null, $parser) {
global $tasks_buffer;
clearTasks();
addToTaskBuffer($content);
$hidden = '';
if (isset($args['hidden'])) {
$hidden = 'y';
}
else {
$hidden = 'n';
}
$output = '';
#if you want tasks create a new section...
$parserOutput = $parser->parse('== [[Special:'.wfMsg( 'tasks' ).'|'.wfMsg( 'tasks' ).']] ==', $parser->mTitle, $parser->mOptions, false, false);
$output .= $parserOutput->getText();
foreach ($tasks_buffer as $task) {
$task['hidden'] = $hidden;
$output .= formatTask(
$task['status'],
$task['summary'],
$task['owner'],
'',
$parser);
}
return $output;
}
function addToTaskBuffer($content) {
global $tasks_buffer;
$tasks = preg_split("/[\n\r]+/", $content);
foreach ($tasks as $task) {
if (preg_match('/^\s*\[([123x!? ])\]\s*(.*)$/',$task,$matches)) {
$status = $matches[1];
$summary = $matches[2];
$owner = '';
# the regexp updated by SebM (sebm@seren-com-pl) 22 March 2007
# to allow parentheses ( ) in task description
if (preg_match('/^(.+?)\s*\(([^()]+)\)$/',$summary,$matches)) {
$summary = $matches[1];
$owner = $matches[2];
}
$tasks_buffer[] = array(
'summary' => $summary,
'status' => $status,
'owner' => $owner,
'hidden' => 'n'
);
}
}
}
#-----------------------------------------------#
# Purpose : HTML format a task.
function formatTask( $status, $summary, $owner='', $page='', &$parser ) {
global $wgScriptPath, $wgTitle;
$imgTitle = wfMessage( 'taskregular' )->text(); $alt = '[ ]';
$img = '<img src="'.$wgScriptPath.'/extensions/Tasks/images/task';
switch ($status) {
case 'x': $img .= '_done'; $alt = '[x]'; $imgTitle = wfMessage( 'taskdone' )->text(); break;
case '!': $img .= '_alert'; $alt = '[!]'; $imgTitle = wfMessage( 'taskalert' )->text(); break;
case '1': $img .= '_1'; $alt = '[1]'; $imgTitle = wfMessage( 'taskhipriority' )->text(); break;
case '2': $img .= '_2'; $alt = '[2]'; $imgTitle = wfMessage( 'taskmidpriority' )->text(); break;
case '3': $img .= '_3'; $alt = '[3]'; $imgTitle = wfMessage( 'tasklopriority' )->text(); break;
case '?': $img .= '_what'; $alt = '[?]'; $imgTitle = wfMessage( 'taskwhat' )->text(); break; }
$img .= '.png" width="13" height="13" alt="'.$alt.'" title="'.$imgTitle.'" /> ';
if ($owner) { $summary .= ' ([[Special:'.wfMessage( 'tasks' )->text().'/owner='.$owner.'|'.$owner.']])'; }
if ($page) { $summary = "[[:$page]]: ".$summary; }
$parserOutput = $parser->parse($summary, $parser->mTitle, $parser->mOptions, false, false);
return $img . ' ' . $parserOutput->getText() . '<br />';
}
#-----------------------------------------------#
# Purpose : Used before saveing a page to clear the tasks buffer.
function clearTasks() {
global $tasks_buffer;
$tasks_buffer = array();
return 1;
}
#-----------------------------------------------#
# Purpose : Used after a page is saved to first delete
# all tasks and then save the new ones created
# in the tasks buffer.
# Parameters: article, The article object.
# rev: 2006-03-12: <calendar> extension will cause double-logging of
# tasks rendered on a sub-page. "Rebuild" section prevents this.
function saveTasks( $article, $user, $text ) {
global $tasks_buffer;
$page_id = $article->getID();
$dbr =& wfGetDB( DB_MASTER );
# Delete all tasks for this page.
$dbr->delete(
'tasks',
array( 'page_id' => $page_id )
);
# Rebuild the $tasks_buffer array (in case we're on a <calendar> page)
clearTasks();
$matches = array();
$elements[] = 'tasks';
$text = Parser::extractTagsAndParams( $elements, $text, $matches );
foreach( $matches as $marker => $data ) {
list( $element, $content, $params, $tag ) = $data;
addToTaskBuffer($content);
}
# Re-insert all tasks that were created when parseing this page.
foreach ($tasks_buffer as $task) {
$task['page_id'] = $page_id;
$dbr->insert(
'tasks',
$task
);
}
return 1;
}
|
extensions/Tasks/SpecialTasks.php |
---|
<?php
# MediaWiki Tasks version 0.5.7 (adapted for MediaWiki 1.18 by Deplicator)
# Internationalized by Golob
# Copyright (c) 2005 Aran Clary Deltac
# http://arandeltac.com/MediaWiki_Tasks
# Copyright (c) 2006 Sylvain Machefert, mods by mhc, Filo, James,
# Guillaume Pratte, Dangerville, OZZ
# http://www.mediawiki.org/wiki/Extension:Tasks_Extension
# Distributed under that same terms as MediaWiki itself.
class SpecialTasks extends SpecialPage {
function __construct() {
parent::__construct( 'Tasks' );
}
# constructor
function SpecialTasks($restriction = '')
{
parent::__construct( 'Tasks', $restriction ) ;
}
# override of the abstract execute() function, manages the output
function execute($args_string)
{
global $wgOut, $wgTitle, $wgParser;
$page_titles = array();
$dbr =& wfGetDB( DB_MASTER );
# Parse arguments.
$args = array();
if ($args_string != '') {
foreach (explode('&',$args_string) as $pair) {
$pair = explode('=',$pair);
$args[$pair[0]] = $pair[1];
}
}
# Define options for the SQL.
$options = array( 'ORDER BY'=>'status' );
if (isset($args['limit'])) {
$options['LIMIT'] = $args['limit'];
}
if (isset($args['owner'])) {
$args['owner'] = str_replace( '_', ' ', $args['owner'] );
}
# Create the WHERE clause.
$where = array();
//$where[]='tasks.page_id=page.page_id';
$where[]='t.page_id=p.page_id';
if (isset($args['status'])) {
$where[] = 'status<="'.$args['status'].'"';
}
if (isset($args['owner'])) {
$where[] = 'owner="'.$args['owner'].'"';
}
if (!isset($args['hidden'])) {
$where[] = 'hidden="n"';
}
# Run the SQL.
/*
$res = $dbr->
select( array('tasks','page'),
array('page.page_id','status','owner','summary','page_namespace'),
$where, 'Database::select',$options);
*/
$res = $dbr->
select( array($dbr->tableName('tasks').' as t',$dbr->tableName('page').' as p'),
array('p.page_id','status','owner','summary','page_namespace'),
$where, 'Database::select',$options);
#select( $table, $vars, $conds='', $fname = 'Database::select', $options = array() )
if (!$res) { return; }
# Set the title for this page.
if (isset($args['owner'])) {
$wgOut->setPageTitle($args['owner'].wfMsg( 'taskwhose' ) );
}
else {
$wgOut->setPageTitle( wfMsg( 'tasks' ) );
}
# Generate HTML list of tasks.
#attach title and options
$wgParser->parse('nothing', $wgTitle, new ParserOptions(), false, true);
$count = 0;
$last_severity = '';
while ($task = $dbr->fetchRow( $res )) {
if (!isset($page_titles[$task['page_id']])) {
$page_titles[$task['page_id']] =
Title::makeTitle( $task['page_namespace'],
Title::newFromID($task['page_id'])->getText()
);
}
$page_title = $page_titles[$task['page_id']];
$wgOut->addHTML(
formatTask(
$task['status'],
$task['summary'],
$task['owner'],
$page_title,
$wgParser)
);
$count++;
}
$dbr->freeResult( $res );
# Display a message if there are no tasks.
if (!$count) {
$wgOut->addWikiText(wfmsg('notasks'));
}
# http://meta.wikimedia.org/wiki/Talk:Permissions (Error message with MediaWiki v1.6.5)
# explains line below
$wgOut->setArticleFlag( false );
}
}
|
extensions/Tasks/Tasks.alias.php |
---|
<?php
/**
* Aliases for Special:Tasks
*
* @file
* @ingroup Extensions
*/
$specialPageAliases = array();
/** English (English) */
$specialPageAliases['en'] = array(
'Tasks' => array( 'Tasks' ),
);
/** Polish (Polski) */
$specialPageAliases['pl'] = array(
'Tasks' => array( 'Zadania' ),
);
|
extensions/Tasks/Tasks.i18n.php |
---|
<?php
/**
* Internationalisation file for the Tasks extension.
*
* @file
* @ingroup Extensions
*/
$messages = array();
$messages['en'] = array(
'tasks' => 'Tasks',
'mytasks' => 'My tasks',
'taskregular' => 'Regular task',
'taskdone' => 'Done',
'taskalert' => 'Very important',
'taskhipriority' => 'High priority task',
'taskmidpriority' => 'Medium priority task',
'tasklopriority' => 'Low priority task',
'taskwhat' => 'What to do with this?',
'notasks' => 'No tasks',
'taskwhose' => '\'s tasks',
'tasks-desc' => 'Provides the ability to create tasks on any page of your MediaWiki'
);
/** Polish (Polski)
* @author Golob
*/
$messages['pl'] = array(
'tasks' => 'Zadania',
'mytasks' => 'Moje zadania',
'taskregular' => 'Zwykłe zadanie',
'taskdone' => 'Gotowe',
'taskalert' => 'Bardzo waĹĽne',
'taskhipriority' => 'Wysoki priorytet',
'taskmidpriority' => 'Ĺšredni priorytet',
'tasklopriority' => 'Niski priorytet',
'taskwhat' => 'Co z tym?',
'notasks' => 'Brak zadań',
'taskwhose' => 'a zadania',
'tasks-desc' => 'Umożliwia tworzenie własnych zadań na dowolnej stronie MediaWiki'
);
|
Execute SQL
[edit]If you are using a prefix on your tables, replace PREFIX_ with your prefix. Otherwise you should create a table just named 'tasks'.
create type task_status as ENUM('!','1','2','3',' ','x','?');
create type yes_no as ENUM('y','n');
CREATE TABLE PREFIX_tasks (
page_id INT NOT NULL DEFAULT 0,
STATUS task_status NOT NULL DEFAULT ' ',
owner varCHAR(255) NOT NULL,
summary text NOT NULL,
hidden yes_no NOT NULL DEFAULT 'n'
);
create index owner_idx on tasks (owner);
Images
[edit]Right click and save these images into your extensions/Tasks/images/ folder (image names should be lowercase).
File:Task.png File:Task 1.png File:Task 2.png File:Task 3.png File:Task alert.png
Images hack by tbhot3ww
[edit]This are another images you can use in your todo
LocalSettings.php
[edit]At the end of LocalSettings.php, add :
include("extensions/Tasks/Tasks.php");
Is this extension useful ??
[edit]As this extension is not maintained I am ready to maintain it if its really useful in production. Please add a comment here if you use it and support this. (maintaining it will also get it translated :)) --Nischayn22 (talk) 06:16, 17 July 2012 (UTC)
- Please, yes! Merging the contents of the talk page and the hacks into the main codebase would be nice, and while can't code I'm okay with volunteering my co's resources (AKA: server) to help. (Please note we can only handle low volume requests)
- If it matters, we use this extension, along with a couple others, to implement a hybrid dedicted job and Kanban system. We are a four man team who collaborate over the internet in our spare time and use this to maintain and check off tasks on our current projects and infrastructure.
- ~That Guy of Dark Glass Studios
- I am glad to see someone with more coding experience pick up this project too. We use it at work, and I've even taken to using it at home. It's simple and functional. --Deplicator (talk) 19:49, 23 September 2012 (UTC)
- Hey, everyone. While its interesting that so many people are interesting in this extension I also found some similar extensions which even might provide more functionality like Extension:Semantic Tasks and Extension:Semantic_NotifyMe--Nischayn22 (talk) 13:11, 25 October 2012 (UTC)
- Hello together,
I'd like to use this extension on mw 1.22.4 with MySQL.
It would be very fine if anybody could upgrade this Extension)
Kind regards 192.109.190.88 09:22, 7 April 2014 (UTC)