Minor tweaks for my SDN forum experience
Introduction
The SDN forums are an ambivalent experience for me – I like the idea, but I struggle often with content and features. Some have similar problems, which can be seen in the long thread Suggestions for forum improvements (check it out if you haven’t seen it yet).
Anyhow, I’ve whined already often enough about features I’d like to see, so this time I’ll take a more constructive approach and describe some minor tweaks I’m using to make my forum experience more enjoyable. Don’t expect anything great though, because it’s just me implementing some simple, quick and dirty hacks… 😉
My Tweaks
The following is a random collection of some tweaks I find useful. I’m actually in favour of a much more condensed reading layout (other vi-lovers might appreciate it), but I find it irritating when I post messages and they look completely different to what other users see. So let’s stick to a short feature list:
Add user details: I couldn’t care less when a user registered on SDN, but I do find it useful to know the
- Number of total and open questions
- Location/country
- Number of total points (if displayed on business card)
Here’s why I like to see this: There’s too many very simple silly questions (lots of users don’t seem to like investigating anything on their own) and even worse, lots of people don’t seem to care about questions they ask. I call the latter the fire-and-forget-syndrome. If possible, I’d like to avoid spending time on questions that are possibly no longer of interest (and due noise and poor search capabilities I doubt that the forums can currently serve as a knowledge base).
The country (flag) of the user is a nice addition, because it shows the truly global community we have and sometimes helps me in putting a posting into a cultural context (and thus better understand it). Makes it also more personal, which I find important (and as such I’d wish that users would stick to using their real name instead of some odd pseudonym).
I also added a link to the user’s company (if present). I don’t really care about that, but I’ve seen others being interested in that. Not to mention that I couldn’t resist, because most links on business cards seem broken because the http:// prefix is missing…
Relative posting times: I couldn’t care less at what time a message was posted. What I really want to know is how old it is. Thus I replaced any message posting times with a relative time using two time units like 3years 1month ago or 7h 30min ago.This way you can easily see if a message is really new or old.
To avoid looking at wrong relative times I update them every minute. I know it’s silly to do this for really old messages, but my KISS desire drove this choice. 😉
Fix broken CSS: I got really tired of users posting overlong coding lines or quotes without any spaces, which screw up all the messages in a thread. My fixed version now shows a horizontal scrollbar for those overlong postings. Ah, and as an ABAP developer I had to switch to the familiar Arial monospaced for SAP font for the code listings.
Funny enough, I just added another silly tweak that should be soon obsolete (because I’m sure SAP will fix this): All quotes are currently right justified, so I made it left-justified again.
Localize some links: I never understood why each message has an anchor on the page, but the links in the replies don’t use those anchors and instead cause a page reload. As I sometimes see messages posted without referencing some necessary context I do occasionaly like to go to the original message. If it’s on the same page, my fix will now make sure that the reference is to the anchor, so that no page reloading occurs.
Quickstart for the Impatient (Try at your own risk)
For the non-technical minded dare-devils who just want to see what I did, here’s the cookbook approach for Windows:
- Download Firefox portable if you don’t use this browser yet (the portable version can be easily deleted afterwards without leaving any trace on your machine)
- Start your portable Firefox and install Greasemonkey in it (just open the linked URL with Firefox)
- Head over to my Enhanced SAP SDN forums threads Greasemonkey script and click on the Install button. Pretend that you know what you’re doing and that you fully trust me, SAP and whomever else and hit install (everybody else might want to read on)
- Head over to your favourite SDN forum and look at an individual message.
Note that you can easily enable/disable Greasemonkey by clicking on the monkey face in the lower right corner of the Firefox status bar. Reload the page with Greasmonkey enabled and disabled and you should see the difference…
Short Background on Used Tools (for Other Developers)
Due to the volume of posted messages I use an RSS reader for quickly browsing through new messages. I find the web interface completely unsuitable and thus didn’t obther with any attempts to tweak it. Individual threads I tune minimally by using
- Firefox as a web browser along with the
- Greasemonkey and the Firebug plugin and the
- jQuery library.
Greasemonkey is a very powerful tool that allows you to inject/execute custom Javascript code on specific web pages and jQuery is an awesome library that makes the HTML DOM manipulations much easier. Firebug is a must-have for inspecting the DOM, manipulating styles on the fly, debugging Javascript, etc.
Obviously there’s some security risks associated with Greasemonkey, so make sure you understand what you’re doing or be at least willing to accept the consequences if something goes wrong.
Note that Greasemonkey is not compatible with the latest jQuery version, so for now we’ll stick to jQuery 1.3.2 (see Greasemonkey jQuery compatibility).
Greasemonkey scripts can be found in general at userscripts.org, but essentially any local file with Javascript code does the job as long as you use the extension .user.js (then a simple drag&drop into the browser window installs the script). Alternatively you can also use Greasemonkey’s context menu to create a new user script (but then you have some limitations because you cannot specify required libraries).
If you haven’t used Greasemonkey before, start by reading the documentation on wiki.greasespot.net. If you’re like me and you don’t breathe HTML and Javascript (as you get paid for ABAP programming or similar stuff), be prepared to get stuck. One part that bit me in particular was the sandbox design, which prevented a straightforward application of the jQuery.data() method (I wanted to use this to attach the parsed posting time, but it doesn’t work, see for example here).
The script almost works in Chrome (though I prefer the portable version SRWare Iron based on Chromium), which has native support for such user scripts (they are called content scripts there). I just had to change the loading of the jQuery library via the @require tag to a simple inclusion of the library in the source file of my script.
Final Comments
With such a huge and diverse SCN community it’s clear that SAP is unlikely to pursue any quick changes as response to our Suggestions for forum improvements. So for now we’re probably stuck with fragile and ugly screen-scraping techniques like I used (unless we’d magically get the something like the requested REST API for SCN).
My enhancement generates additional traffic for looking up user/business card information. In fact for each user I need two AJAX requests, which is rather ugly. So I apologize to SAP for causing some higher load on the servers, but to some degree I just follow the spirit of Sharing and Updating your Business Card has never been easier!… 😉
I've just moved Rob Burbank's practical guide to forums to the how to contribute page: ABAP Frequently Asked Questions . This blog merits being added to the compendium of very useful guides to our forum landscape.
Many thanks.
Cheers
looks like we will make SAP to change the detail here and there through the personal example only:)) And you´re the first one to create something "material". Thank you!
This "tool" is like the donkey´s ears for SAP. For me a sure thing is, that it had to take you much more time to "hack" the SDN than would take any insider to implement these tweaks/changes.
So if you can share the development time, everybody will be able to count like a half of the time to understand how long would it take the SAP guys to implement this.
I also wonder if you are going to produce two new bugs for a one fixed, as the habit here dictates:)) Hope to see some more stuff like this.
Cheers Otto
SAP faces the major challenge to craft their vision for the forums, understand and account for the (often conflicting) community needs, implement changes or new features, test and support them. Contrast that to my silly "hack" that affects 1 user and can be switched on/off at will...
I must admit I'm excited by Martin Lang's comment "Yes a revolution instead of an evolution is what we need!" posted in the forums ( ). Let's hope we'll not just be informed, but also involved in this process. The more open, the cleaner the design and implementation, the better...
In the end I'm hoping that we exchange ideas how to make minor improvements ourselves. I'm sure others have way better ideas and maybe we could work together on such intermediate/patch-work solution.
Cheers, harald
p.s.: As far as bugs are concerned I'd like to claim that my track record is not that bad. But usually it's better to ask such question his/her customers or co-developers who had maintain the code - then you're probably closer to the truth... 😉
In theory we can pull any information from the business card. I just briefly mentioned it in the blog, but I'm using the Firefox extension Firebug for inspecting the web page (much easier than displaying the source code and searching there).
If you have experience with some programming language and know a little bit HTML you probably could adjust the script. I could try to describe it in more detail if you want, but in general non-technical persons don't really enjoy such activities. 😉
Since your comment is headed with "email" and hardly anybody is interested in my "enhancement" I took the freedom to upload a new version where I added the e-mail information from the business card. If you check the script you'll see now some boolean flags at the start, where you can enable or disable options. If you're interested just deinstall and then reinstall the script; you can edit it via right click on the Greasemonkey icon in the status bar and choosing menu entry "Manage user scripts".
Note that long e-mail addresses will cause the left column with the user info to expand (looks ugly).
Cheers, harald
p.s.: Unfortunately I failed with my blog post: I was hoping to kick off a discussion about possible ways to implement features the community requests by using hacks/enhancements/workarounds, which can then also be used by non-technical persons. I guess next time I have to think of more sexy features, before I post... 😉
https://chrome.google.com/extensions/detail/fjnbnpbmkenffdnngjfgmeleoegfcffe
My SDN experience is about to change! (well, I'm not going to see right aligned quotes for a start).
Firefox: https://addons.mozilla.org/en-US/firefox/addon/1865/
Chrome: https://chrome.google.com/extensions/detail/gighmmpiobklfepjocnamgkkbiglidom
For the sites I usually visit I feel usage of this add-on is justified. However, for web sites where somebody publishes good and free information for a living usage might be questionable.
Anyhow, the SDN forums are to me clearly a spot where no adds should be present.
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/howto/contentscript_xhr/
If I get enough of my own time (I have two very little kids) I will write a Chrome extension to modify SDN Forums. I will definitely re-implement the flag and email bit.