Last modified: 2013-06-06 18:52:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36305, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34305 - This is an example bug for 2012 Pune Hackathon
This is an example bug for 2012 Pune Hackathon
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Other (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-09 20:52 UTC by Arthur Richards
Modified: 2013-06-06 18:52 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Example patch submission (1.22 KB, patch)
2012-02-10 05:33 UTC, Arthur Richards
Details
echoes the name taken from url (777 bytes, patch)
2012-02-11 07:33 UTC, akshay chugh
Details
Patch which extends the funtionality of special page (1.20 KB, patch)
2012-02-11 07:33 UTC, Ashwini
Details
prints the name specified in the url (662 bytes, patch)
2012-02-15 12:46 UTC, bharath
Details

Description Arthur Richards 2012-02-09 20:52:05 UTC
This is an example bug for tracking patches generated during a 'hacking mediwaiki' tutorial during the 2012 hackathon in Pune.
Comment 1 Arthur Richards 2012-02-10 05:33:59 UTC
Created attachment 9980 [details]
Example patch submission

These are some changes to make the example extension way more awesome. This patch makes it possible to dynamically generate a 'Hello world' message. It can take an optional 'name' parameter to say 'Hello $name'. If 'name' is not present, it will randomly select a name from a list of names in code.
Comment 2 akshay chugh 2012-02-11 07:33:26 UTC
Created attachment 9981 [details]
echoes the name taken from url

this newly made changes allow us to print the name parameter passed in url along with the word 'Hello'
Comment 3 Ashwini 2012-02-11 07:33:49 UTC
Created attachment 9982 [details]
Patch which extends the funtionality of special page

1. I have added some messages in special pages.
Comment 4 Ashwini 2012-02-11 08:16:10 UTC
Comment on attachment 9982 [details]
Patch which extends the funtionality of special page

>Index: Example/Example.i18n.php
>===================================================================
>--- Example/Example.i18n.php	(revision 111148)
>+++ Example/Example.i18n.php	(working copy)
>@@ -6,8 +6,10 @@
> // English
> $messages[ 'en' ] = array(
> 	'example-example' => 'This is an example!',
>+	'example-hello_world'=> 'hello $1',
> );
> 
>+
> // Message documentation for translators
> $messages[ 'qqq' ] = array(
> 	'example-example' => 'This is just an example message. Nothing special.',
>Index: Example/Example.body.php
>===================================================================
>--- Example/Example.body.php	(revision 111148)
>+++ Example/Example.body.php	(working copy)
>@@ -9,9 +9,23 @@
> 	/**
> 	 * Make your magic happen!
> 	 */
>+	function getRandomName(){
>+	$name_array=array();
>+	$name_array ['en'] = array (
>+		'first'=> 'Ashwini',
>+		'second'=> 'Arthur',
>+);
>+}
> 	function execute( $par ) {
> 		global $wgOut;
>+		global $wgRequest;		
>+		$wgOut->addWikiMsg( 'example-hello_world' );
>+		echo "Hello wikimedia";
> 		
>-		$wgOut->addWikiMsg( 'example-example' );
>+	
>+		$wgOut->addwikimsg('example-hello_world',$this->getRandomName()); 
>+		$wgOut->addwikimsg('example-hello_world',$wgRequest->getText('Ashwini'));
>+
>+		
> 	}
> }
Comment 5 bharath 2012-02-15 12:46:35 UTC
Created attachment 10017 [details]
prints the name specified in the url

this newly made changes can display the value of the name parameter passed in the url if it is mentioned otherwise it displays a random name
Comment 6 Andre Klapper 2012-05-08 09:13:11 UTC
Can somebody please review the patches and afterwards replace the "patch-need-review" keyword by "patch-reviewed"?
Comment 7 Mark A. Hershberger 2012-05-08 16:29:21 UTC
(In reply to comment #6)
> Can somebody please review the patches and afterwards replace the
> "patch-need-review" keyword by "patch-reviewed"?

done

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links