Wednesday, July 17, 2013

The plugins index page

Before I start with the blog I have to share this picture which is on my desktop right now just as a silent reminder:



So the time came to go ahead an give something to the user. As mentioned here Geeklog has a specific structure for plugins. What I did here is the public_html/plugin_name/index.php or simply the page displayed after the user clicks on the navigation link of the plugin.

The hardest part here was deciding on what to display, I decided to go with some stats and some basic functionality. And of course displaying the plugin info.
I also started implementing lib-translator.php which will hold all the function I use for the plugin. Including AJAX call function. In lack of better idea the AJAX calls will pass one additional parameter, the name of the function they need, the library will then call the function. Something like this:





Lets see how it all looks

For a anonymous user (not logged in) the plugin page is very,very simple it displays only the info about the plugin including that it is done as part of +Google Summer of Code  by me under the mentorship of +Dirk Haun .

After the user simply logs in (as in has not jet used the plugin) the page will not change much. It will show a preview of what it will have once the hands are dirty from translating.


The Plugin info is hidden, it has the same content as if the user was not logged in and the view can be toggled by hitting the show link. The show  will simply display the content by removing the hidden  CSS class I use. As for the badges the process is different, it will initially display only 4 of them, show all  will issue a AJAX call and get the rest of them (The page will not reload).

Now after a a few translations have been submitted, the page gets a bit more vivid.

The Quick Stats part displays a few number for the user and general numbers - Number of translations by user, Number of translations in total... It also displays a list of languages the user has worked on and their current translation percentage, as in the plugin side form.

The My Badges  section displays all the badges the user has acquired over time. We wont to use
Gamification here to encourage users to submit translations and vote translations.
The preliminary list of 'badges' a user can get is:
  • First translation
  • 10th, 50th, 100th... translation
  • First vote
  • Casting a vote which removes a translation
  • Getting more than 100 upvotes
  • Submitting more than 10 translations in a day
  • Submitting more than 20 translations in a day
  • Submitting translations 1, 7, 20 days in a row
  • Working on a language which is fully translated
This list will be a bit longer, If you have an idea for awards and designs please do send me an email or leave a comment.

This is how a single badge should look like:

The On a Run  is the title of the badge, and the tooltip is there to explain for what a badge is given.








Note The images used here are for testing purposes only!


The last thing left on the page is the list of translations:
The list will display all translations submitted by the user in increasing order of time passed since submission. And allow the user to delete a translation. It does not allow for changes as I think it is much better to do translating in context, and anyhow after changing a translation all the data would be rested which would make it equal to submitting a new translation. The list will have highlighted translations with a negative number of votes.

The idea is to delete translations after they reach a certain number of negative votes. The number will be set in the plugin configuration by the admin.


Not related stuff

As the summer goes by and it gets hot in my room I figured work would be so much easier with a bit of music, so here it is my working playlist.







No comments:

Post a Comment