Tampermonkey and Greasemonkey to your help when you are not satisfied

greasemonkeyWhen you use a web site or a web based system more or less everyday you find things that you would like to change in the design or some of the functionality. In that case Tampermonkey / Greasemonkey could be your friend if you also have some basic knowledge in javascript.

 

I recently started to play an old computer game called Planetarion. The last time I played was back in the late 90th/early 2000 and it still has the same look and feel. Of course it’s some of its charm but I could not resist to fix the most obvious flaws.

tampermonkeyTo make use of Tampermonkey/Greasemonkey you create a javascript file. Then you add the following code to configure the script to be activated only on the site game.planetarion.com and set up some basic includes like JQuery. This code begins the so called “user script”:

// ==UserScript==
// @name Planetarion style script
// @namespace https://www.hoyce.com/
// @version 1.1
// @description A user script that styles Planetarion
// @match http://game.planetarion.com/*
// @author Hoyce
// @require http://code.jquery.com/jquery-latest.js
// @grant none
// ==/UserScript==

In my case I wanted to fix the menu in the game and titles in the browser tabs. One of the things that irritated me the most was that you couldn’t see which page/section you were in based on the menu links. An easy fix for this is to highlight the active link with a distinct color and bold text. (see some javascript code below)

Another improvement was to shorten the title text which is shown in the browser tabs to get a good overview on which tab contains which page when you have several tabs open in your browser.

 

function setActiveLink(element) {
  var menuItem = $(element);
  menuItem.css('font-weight', 'bold').css('color', '#47b4fa');
}
 
function setTitle(title) {
  $('title').text('PA ' + title);
}

if(window.location.href.indexOf('fleets.pl') > 0) {
  setActiveLink('li#menu_fleets a');
  setTitle('Fleets');
}

Activate your script in your browser

To make use of your script you have to install the browser plugin which depends on the browser you use. Use Tampermonkey for Chrome/Opera/Safari and Greasemonkey for Firefox.

Then activate the the script you just created and make use of its extra functionality!

Get the code form GitHub: https://github.com/hoyce/planetarion-scripts     GitHub-Mark-120px-plus

Polopolyforum has closed the doors

splash-wrap_bkg

As one of the two creators (@niklasolsson@patricjansson) I must say we did a good thing when we started Polopolyforum. The need for a publicly available information source was big and Polopoly it self (the company) was not transparent enough. So we took matters in our own hands and launched www.polopolyforum.se.

Back in 2009 when we started, the lack of public information and knowledge exchange around Polopoly was poor and many companies, most media and universities, used Polopoly CMS for their main sites. In parallell to this the universities had discussions and knowledge exchange during the yearly conference Suniweb but also during meetings in between on different locations like KTH, SU and LIU.

Since Polopoly them selfs did not arrange any meet ups Xlent took the chance and invited a lot of Polopoly customers for an evening with talks, discussions and snacks. We presented Polopolyforum and we got some more contributors from that point.

The community

We got more and more members in the forum but not so many did contribute to the knowledge base as we where hoping for. One of the obvious reasons was that there were and still is many consultants that maintain and develop the Polopoly instance on these companies and the willingness of sharing solutions to the competition was not so great.

The in-house developers at the universities did not have that competition but the numbers of developers in that category was not so high so the information flow was still pretty low.

Blog posts, guest posts and interviews

To level up and get some content we started to blog about what we did and learned. We also invited people to write guest posts and we arranged meetings with Anders Weijnitz (@aweijnitz) who were the product owner of Polopoly CMS at that time. He presented the new functionality in the up coming releases and what they were planing for the nearest future. This information was published on the blog and made sure no one was working on the same functionality as Polopoly was building in the CMS is self.

Later on Marcus Frödin (@marcusf) became the product owner on Polopoly and he went out to the Swedish customers and arranged geek meets. The community started to grow again and the the trust of Atex/Polopoly started to come back. But after some time Marcus moved to Spotify and the lack of information and interest was a fact once again.

CMS logos

The move to EPiServer and other open source frameworks

Today in Sweden a lot of previous Polopoly customers has made their move to EPiServer and some other to open source frameworks like Drupal and SiteCore. Maybe because the lack form Atex to keep their existing Swedish customers “warm” and informed of their future plans and road map.

This has off course decreased the contributions to the Polopoly community and the purpose and goal of Polopolyforum to full fill.

It was fun as long as it lived and maybe the critical mass of Polopoly CMS customers will be reached in the future but until then….over and out!

 

 

UStream for WordPress and the power of the community

Ustream_Logo_2013 I recently got a support question on my plugin called UStream for WordPress which is a plugin for embedding UStream videos on you blog. The plugin did not seem to work after the WordPress 4.0 update and the user seemed to have at least one client who really needed it.

The reason behind the failure of the plugin was that UStream had changed the way you embed the video from object tags to iframe tags and the fix was easy. I updated my plugin, answered the user and she was happy. And if she was happy, I’m happy!

The WordPress community for the win!

wordpress-logo-notext-rgbWhat I want to say with this is not that I fixed this bug and “Hey, I’m so good”. No, I really want to give thumbs up for the community thing where you can get a lot, and I mean really a lot of functionality for free but also the possibility to give some back witch other can utilize on their WordPress driven sites.

I both use other plugins and on some of them I have reported bugs to the authors. I have in all cases gotten help pretty quickly and been able to continue to use their plugins and have not been forced to do the hard work of building these plugins my self.

There is one thing I want to encourage people to do when they use plugins they get for free and that is to give back a review of the plugin. Either by just mark the grade of the plugin or write a word or two what you think of it. This will help contributors to get their work used by even more people and probably make them put more effort in creating awesome stuff.

The WordPress community for the win!