New site, new blog

Published 11 February, 2007 in Misc - 0 Comments

Plogger, the badly named blogging system

So, I’ve been working on this blogging system for a while and now it’s completed enough to run. One can wonder why one would write a blogging system when there already exist a zillion of them? Well I guess it’s the callenge that make it worth the effort, or that it’s just great fun programming! And there’s always new things to learn, or new methods for how to do things and so on.

Anyhow, the system is still a bit rough around the edges so I wont share it just yet, but as soon as I’m satisfied I will release it under the GPL license.

Here’s a little summary of the project:

29 lines of Plain text
  1. ———————————————–
  2. Plogger PROJECT SUMMARY
  3. ———————————————–
  4. ent: 3 st
  5. xml: 1 st
  6. jpg: 3 st
  7. stx: 25 st
  8. swp: 1 st
  9. cache: 1 st
  10. text: 1 st
  11. php: 51 st
  12. css: 10 st
  13. ini: 1 st
  14. gif: 3 st
  15. txt: 3 st
  16. xsl: 20 st
  17. pdf: 1 st
  18. gz: 1 st
  19. wsdl: 1 st
  20. odt: 1 st
  21. dtd: 2 st
  22. js: 8 st
  23. png: 206 st
  24. unknown: 10 st
  25. ———————————————–
  26. Number of files: 353 st
  27. Directories: 39 st
  28. Lines of code: 19030 st
  29. ———————————————–

SOAP enabled

During the last months I have begun looking into C# so I thought a good project to start off with was to write a desktopk client for my blogging system. I also wanted to explore the SOAP protocol a little bit more, I’m up to some SOAP stuff at work soon, so I developed a SOAP API for the blogging system that I could use for the client.

So far the client is starting to work pretty well and you can create new blog post, edit blog post, delete blog posts and handle comments. Since I mostly use GNU/Linux at home the client runs on the Mono platform and uses GTK# for the GUI. My goal is also to port the client to Windows and Mac when I’m satisfied with the GNU/Linux version.

Here’s some screen dumps of the client (click on the images for larger versions):

Entry list

Entry list dialog

Settings

Settings dialog

Entry form

Entry dialog

Handle comments

Comments dialog

Don’t be hassled by the mix of Swedish and English in the interface. GTK Stock buttons get their text from the surrounding environment and thus gets translated automatically.

The client is pretty stable but there’s some exception handling – and function implemetation – left to do, but that will come with time and along with using the client.

Templating

Since I really love XSL that’s what I’m using for the templating system for the blog system. I will give you a short example of why I love XSL. All external links on this site has a little icon appended to the link text. That little feature is handled by this code:

9 lines of XSL
  1. <xsl:template match=“a[contains(@href, ‘http://’)]”>
  2. <a>
  3. <xsl:copy-of select=“@*” />
  4. <xsl:copy-of select=“node()”/>
  5. <img src=“{$tmpl.path}/img/a-external.png” width=“12” height=“9”
  6. alt=“External URL”
  7. />
  8. </a>
  9. </xsl:template>

This template matches all <a> tags where the arrtibute href contains http:// and append the <img> tag after the link text. Now isn’t that lovely so say!

That’s that for now. When I’ve cleaned up the code a little bit I will release it for those curious.