07 May 2011 @ 5:54 PM 

MediaWiki Ratings extensionA few weeks back I started work on a new MediaWiki extension to provide decent rating functionality. The reason: I got sick of all the crappy rating extensions out there and decided to write one that both works and has sane code. The new extension is called “Ratings“.

The Ratings extension provides a tag extension that when embedded in a page allows users to rate different “properties” of the page. Quite simple. It also adds a votesummary hook which allows embedding a summary as seen below into pages for any property of any page.

The extension is written in such a way it’s easy to add additional types of rating (interface) elements. It exposes 2 API modules, one to obtain all rating data needed on a page, and one to submit votes.

It’s not quite finished yet, as I can’t get the rating interface quite right. I tried 2 jQuery rating star plugins, both messing up their position in the page after onload. Therefore I have not made any release yet, and definitely recommend against using this extension on any production wiki. I’m not planning to put any more time into this issue (I already wasted some hours on it >_>), so feel absolutely free to fix the layout issues (you can contact me for details, or try out the extension yourself and spot the obvious), or to put in your own favourite rating element. (source code)

MediaWiki Ratings extension showing a summary of current ratings

Posted By: Jeroen De Dauw
Last Edit: 07 May 2011 @ 05:54 PM

EmailPermalinkComments (4)
Tags
 13 Feb 2011 @ 8:55 PM 

Somewhere in the last two weeks I quickly wrote up a small new MediaWiki extension to include content from Wikipedia or some other MediaWiki install into pages on your wiki. It’s titled Include WP.

The extension does not import anything (so nothing is stored), but rather fetches content from the remote wiki every time the page is loaded. This means it takes a second or two for it to actually load, but ensures you got the latest content. Some clean up of the remote content happens and there are several options that allow you to customize how the included content is displayed. It makes use of the Validator extension.

Feature overview:

  • Include articles from Wikipedia or any other MediaWiki wiki into your pages.
  • Show only a limited amount of paragraphs on page load, with an option to show the full article.
  • Partial conversion to plain-text.
  1. Removal of templates (such as infoboxes), ref tags, comments, categories and images.
  2. Both internal and external links are rendered as plain-text.
  3. Tables, lists, table of content, section headers and more are retained.
  • Usage of the MediaWiki Resource Loader when available with backward support for MW 1.16.x.

Some screenshots :)

An included article, initially only showing a limited amount of paragraphs

An included article shown in a div with overflow (scrollbar) after requesting more content
Download

Posted By: Jeroen De Dauw
Last Edit: 13 Feb 2011 @ 09:34 PM

EmailPermalinkComments (4)
Tags
 24 Dec 2010 @ 9:53 PM 

I’m happy to announce the release of a new MediaWiki extension I’ve been working on over the past two weeks. It’s titled Live Translate and allows live page translation via the Google Translate API. It also enables you to define a “dictionary” of certain words or phrases and their translations; any word or phrase in the original text found in the “dictionary” will be translated using that dictionary, instead of using Google Translate.

The main features are:

  • Live translation of page contents using Google Translate.
  • Ability to define translations of special words in-wiki that will then be left alone by Google Translate.

Some screenshots

A wiki page with the translation control of the Live Translate extension at the right top corner:

A wiki page with the translation control of the Live Translate extension at the right top corner.

The same page after translating it to Dutch:

The same page after translating it to Dutch

The dictionary page briefly summarizing how many words and languages it contains:

The dictionary page briefly summarizing how many words and languages it contains.

Editing the special words dictionary works just like editing any other page:

Editing the special words dictionary works just like editing any other page.

Funding

I created this extension as WikiWorks consultant for Texas Instruments. Thanks to TI for funding this and allowing licensing under the GNU GPL.

WikiWorks, MediaWiki consulting

Points of interest

For me the most interesting part of creating this extension was figuring out how to walk through the page DOM and send only the actual text to the Google Translate API using JavaScript (and jQuery). This step was needed because the GT API limits translation requests to 500 characters, so it’s not definitely possible to send the whole page. It took me a while to figure this out, and I still think it’s a rather lame limit, as it leads to loss of context, and thus worse translations.

The rest of the extension is rather simple and does not contain anything I haven’t done before. The special words dictionary is stored in a simple db table (fields: word id, word text, word language and word primary) and can be accessed via 2 API modules. One is to query a list of the special words that are defined for a language, the other is to get translations of a set of special words from one language to the other. When you request your first translation of a page, the first API module is hit and the result is used to insert notranslate spans, which make Google Translate ignore stuff, around the special words. After that the other module is hit, the special words are replaced by their translations, and finally the script sends a ton of requests to the GT API.

Ah, and not to forgot, I used a XOR. I kid you not, source code or it didn’t happen (see the last function).

State and future

Live Translate is currently at version 0.2 and contains all the features initially requested by TI. It appears to be stable, and ready for production usage. Of course, if bugs pop up, they will be addressed and a new minor version will be released. A cool new feature I’ve been considering, and might add at some point, is having __LIVETRANSLATE__ and __NOLIVETRANSLATE__ magic words, that allow per-page showing or hiding of the translation control. Yaron suggested also having a per-namespace setting. If you have some cool new features in mind, feel free to suggest them on the Live Translate discussion page (where you also can ask for support and point out bugs). If you want to fund any new functionality, please contact WikiWorks.

You can obtain the latest version of Live Translate here.

I’m happy to announce the release of a new MediaWiki extension I’ve been working on over the past two weeks.
Posted By: Jeroen De Dauw
Last Edit: 24 Dec 2010 @ 09:57 PM

EmailPermalinkComments (3)
Tags
 15 Dec 2010 @ 11:10 AM 

I’m happy to announce the release of a new MediaWiki extension I’ve been working on over the past two weeks. As you’ve might already have guessed from it’s name, Push, it enables you to push content of wiki pages to one or more other MediaWiki installs.

The main features are:

  • Pushing page content to other wikis via a tab on the page.
  • Bulk push via Special:Push.
  • Remote authentication support.
  • Automatic transfer of included files.
  • Support for ApprovedRevs. If there is an approved revision, it will be pushed, if not, the latest one is pushed.
  • AdminLinks integration.
  • Usage of the new MediaWiki Resource Loader when available with backward support for MW 1.16.x.

The tab interface

When logged in, a new tab or action (on vector based skins) will be added which leads to the push interface for the page you are on. This interface consists of a table listing the available target wikis and also informs you of the status of the target pages. A big push button in each row allows you to do the actual push. When there is more then one target wiki, a convenient ‘Push all’ button will also be shown.Underneath this table the available options will be displayed. With the current version you can choose to include the templates used on the page in the push, as well as transferring the embedded images.

The tab interface of the Push extension

In this screenshot of the tab interface, you can see an actual ‘Push’ tab, rather then an action in the collapsed actions dropdown. You can choose this behaviour, which is useful when you do very frequent pushing, using one of the settings made available by the Push extension.

After initiating the push to one or more targets, the work will happen in the background, and the interface will update to show you progress, completion, and possible errors (such as not having sufficient rights to edit on the target wiki).

Special:Push

Push provides bulk push capabilities via a special page aptly titled ‘Special:Push’. The layout and workings of this page should be familiar to anyone having used MediaWikis native Special:Export, as it’s largely based on this special page. A big textbox allows you to specify the pages you want to push (one per line), and you can choose to add all pages from a category or namespace to it. Under the texbox are the same options as in the tab interface: automatic inclusion of templates and files. Finally you are able to select one or more target wikis.

The Special:Push page

Note that the file inclusion option was not added yet in the version the below screenshot was taken at. I obtained the above list of pages by entering ‘Locations’ in the category box and submitting it.

When submitting the push request, you’ll be shown the pushing progress in the form of a list to which items get added as pushes complete.

Special:Push showing progress of a bulk push operation

Funding

I created this extension as WikiWorks consultant for Texas Instruments. Thanks to TI for funding this and allowing licensing under the GNU GPL.

WikiWorks, MediaWiki consulting

Status and future

Push is currently at version 0.5 and contains all the features requested by TI. It appears to be stable, and ready for production usage. Of course, if bugs pop up, they will be addressed and a new minor version will be released. Many useful additions to push can be imagined for various use-cases. Feel free to suggest them on the Push discussion page (where you also can ask for support and point out bugs). If you want to fund any new functionality, please contact WikiWorks.

You can obtain the latest version of Push here.

Posted By: Jeroen De Dauw
Last Edit: 15 Dec 2010 @ 11:32 AM

EmailPermalinkComments (1)
Tags
 08 Dec 2010 @ 2:24 PM 

I’ve been neglecting my blog in favour of microblogging status updates and release notes, and have not written anything here for over a month and a half. Therefore I’m going to provide an overview of all the awesome (now also on StatusNet!) new things that have come out since then, along with other interesting news from the Semantic MediaWiki world.

Semantic MediaWiki 1.5.4

Yes, 1.5.4. Since my previous blog post, I have made 2 minor updates to the SMW 1.5.x branch: SMW 1.5.3 on November 4th and SMW 1.5.4 on December 1st. The focus of these releases is mainly on fixing bugs, increasing security and compatibility with MediaWiki 1.17. The only significant new feature are explicit strict and non-strict greater-then and less-then comparators, which Saruman paid me to add.

The Semantic MediaWiki documentation wiki also got a facelift, including a new logo and redesigned Style. Most of the work here was done by Markus Krötzsch and Yaron Koren. See Yarons blog post for more info on the new look.

Maps and Semantic Maps 0.7.3

After releasing Maps and Semantic Maps 0.7.1, I continued refining the new images-as-layers functionality that this release introduced. As I had accidentally broken compatibility with MediaWiki 1.15.x without noticing, I ended up doing a pretty quick 0.7.2 release, about a week later. In late November I got contracted to add KML export functionality to Semantic Maps, which I implemented in the form of a new ‘kml’ result format, and then released in version 0.7.3. Some additional options for the KML format are available when using the code which is on svn trunk, but that’s not enough of a change to justify a new release just yet.

Semantic Bundle

Several important releases of other SMW related extensions that are in the Semantic Bundle have also been made, most notable to Semantic Forms, which has progressed no less then 5 minor releases since my last post. Each of these was followed by a Semantic Bundle release, which also include updates to Semantic Internal Objects and ApprovedRevs. Several compatibility improvements have been made to Semantic Result Formats, but this extension hasn’t brought a new version yet.

Push

The last few days I’ve been working on an awesome new extension that’s meant to facilitate pushing page content from one wiki to one or more other wikis, called ‘Push’. It makes heavy use of the MediaWiki API, and takes advantage of the MW 1.17 Resource Loader when available (but is compatible with MW 1.16). You can use it on-page by clicking the ‘push’ tab, which will get you a list of targets to push to (specified in LocalSettings).

Screenshot of the push tab interface

It also supports bulk operations via Special:Push, which allows you to select pages in a similar fashion to Special:Export, and then, after submitting, pushes the pages one by one in a nice ajax-y way.

The 'pushing' interface of Special:Push

I created this extension as WikiWorks consultant for Texas Instruments.

What’s next?

MediaWiki 1.17 has just branched, so hopefully it won’t take to long for it to get released.

Posted By: Jeroen De Dauw
Last Edit: 08 Dec 2010 @ 02:33 PM

EmailPermalinkComments (3)
Tags
 21 Oct 2010 @ 2:54 PM 

Maps 0.7.1 and Semantic Maps 0.7.1 are now available for download. The main new feature in this release is the long awaited images as layers. It allows you to display images with OpenLayers, so users can pan and zoom around, and markers can be placed to draw attention to certain area’s and provide additional information. Check out the examples. Some issues have also been fixed, in both extensions, mainly OpenLayers related.

An OpenLayers map displaying an image layer with some random markers.

What’s next?

Improving the pages in the layer namespace and providing a way to group markers in different overlays in OpenLayers. For a complete overview, see the roadmap. Feel free to propose new features, or help out creating them.

Posted By: Jeroen De Dauw
Last Edit: 21 Oct 2010 @ 02:54 PM

EmailPermalinkComments (0)
Tags
 15 Oct 2010 @ 11:49 PM 

Also check out the wiki version of this post.

Version 0.7 of both the Maps and Semantic Maps extensions is now available for download. This release is made after 3 beta’s and a release candidate, so should be stable.

The most notable new features in this release are tag extension support for all the Maps parser functions, more consistent error handling via Validator 0.4 and compatibility with the upcoming MediaWiki 1.17. Most changes are internal improvements, but there are also several bug fixes and minor new features.

Maps showing a Google Maps map with multiple=

Whats next?

There only big new feature on the roadmap for 0.7.x is the infamous images-as-layers one. This feature was supported by the now long obsolete Semantic Layers extension (example), and has been requested by dozens of people since the first releases of Maps. Next to fixing the bugs that show up, the focus will mainly be on adding new functionality. Feel free to propose new features, or help out creating them.

 06 Oct 2010 @ 12:30 PM 

An early beta of the next big release of the Maps and Semantic Maps extensions is now available for download. The most notable new features in this release are tag extension support for all the Maps parser functions, more consistent error handling via Validator 0.4 and compatibility with the upcoming MediaWiki 1.17. Most changes are internal improvements, but there are also several bug fixes and minor new features.

Both extensions need some more polishing work before the 0.7 release, some testing needs to be done, and some small new features might still be added. This is a list of changes so far:

Maps

New features

Tag support for these parser hooks (which previously only had parser function support):

  • Coordinates
  • Distance
  • Finddestination
  • Geocode
  • Geodistance

Semantic Maps reporting a fatal error in a map form input.

Bug fixes

  • Fixed compatibility with the MW 1.17 resource loader.
  • Fixed i18n issue with the overlays control for Google Maps v2 maps.
  • Fixed default zoom level for Yahoo! Maps maps.
  • Increased the maximum decimals for DMS coordinates from 2 to 20.

Removed features

  • #geocodelong and #geocodelat parser functions – you can obtain their functionality using #geocode.

Internal improvements

  • Rewrote the geocoding functionality. It’s now an integral part of the extension that can not be just pulled out, while the reverse is true for individual geocoders. Geocoder interaction now uses the same model as mapping service interaction.
  • Use of Validator 0.4, allowing for more robust and consistent error reporting.
  • Rewrote the parser hooks to use the ParserHook class provided by Validator.
  • Restructured the directory structure of the extension to better match it’s architecture.

Semantic Maps

New features

  • Added ‘locations’ parameter to the map query printers that allows for displaying static locations in addition to query results in queries. It behaves the same as the locations parameter in display_points.
Semantic Maps displaying the result of a query on an OpenLayers map together with a static point.

Semantic Maps displaying the result of a query on an OpenLayers map together with a static point.

Bug fixes

  • Fixed compatibility with the MW 1.17 resource loader.

Internal improvements

  • Use of Validator 0.4, allowing for more robust and consistent error reporting.
  • Restructured the directory structure of the extension to better match it’s architecture.

Notice

Although the big features should work, this release will probably contain multiple issues. Please report any you might find.

For the most current version of this announcement, see the original on the mapping wiki.

 27 Aug 2010 @ 7:16 PM 

Just under a month after the 0.6.5 release of both mapping extensions, the next minor update, 0.6.6, is available for download. No spectacular new features, but several important bugfixes. Several issues with coordinate parsing have been fixed, you can now using geocoding when behind a proxy, and wikitext should finally(!) behave correctly in marker pop-ups. Some internal changes have also been made, mainly rounding off the many changes I made in the 0.6.x branch. I expect this release to be the most stable one to date, and have therefore changed the extensions status from ‘beta’ to ‘stable’ on the documentation pages.

A lot of improvements have been made to the documentation as well. Both the Maps examples and Semantic Maps examples are now comprehensive and complete. There now are finally examples of using query templates, of distance queries and of some nice compound queries. Some more work is needed though, a lot of which is explaining basic functionality and fixing minor issues all over the place. I’ll be taking care of the most important things, but I’d be great if people using the extensions could help me out improving the documentation :P

This release is probably the last one before 0.7, in which I expect to be focusing on new functionality. I’m looking for people that want to fund the development of new features, so please contact me if you are such a person :)

Downloads:

 20 Jun 2010 @ 4:35 PM 

Maps and Semantic Maps 0.6.3 are now available for download. This release is one aimed to improve stability and addresses a number of bugs that where present in 0.6.x. Some notable fixed issues are a failure of parsing any coordinates containing a degree symbol that surfaced in 0.6.2, and the failing of non-Google Maps form inputs. Some internal rewriting has also been done, which was needed to address some of these bugs, and will enable future awesomeness increase. The included OpenLayers library has also been upgraded to 2.9.1. (changes to Maps, changes to SM). People running any 0.6.x are advised to upgrade. Especially people using Semantic Maps in conjunction with Semantic Forms, as both 0.6 and 0.6.1 contain undesired behaviour in the forms.

A new release of Semantic Bundle, which will include these versions of the mapping extensions, is likely to soon be released as well :)

Semantic Maps 0.6.3 dependencies

Downloads

See also


 Last 50 Posts
 Back
Change Theme...
  • Users » 4814
  • Posts/Pages » 200
  • Comments » 161
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About me



    No Child Pages.