Recent Posts

RSS Feeds

Apache Roller 4.0 theme upgrade from version 3.1

Porting themes from rollerthemes.com

This is the story of how I adapted my Apache Roller web theme after upgrading from version 3.1 to version 4.0.1. One of the reasons to select Apache Roller as my preferred blogging software was the excellent and free selection of themes from rollerthemes.com, which in turn were adapted to Apache Roller version 3.1 by Eugene Strokin from templates of www.freecsstemplates.org. My main reason not to upgrade to Apache Roller 4.0 earlier was my expectation that my themes would not work any more. Now that I've tried it nevertheless I have to admit I was right, but it wasn't so bad after all.

What did I have to fix?

First of all, after the upgrade I restarted Apache Tomcat with the new Apache Roller and it did seem to work like before. You had to look twice to notice some bugs/incompatibilities:

  • Referrer links were empty / not working any more
  • Comments were not allowed
  • Calendar links did not work (did they before?)
  • Some theme adjustments were not displayed

Some tweaking required

What I did was to compare the code fragments repsponsible for the forementioned functionality in my theme code (velocity templates) with the code fragments of code in the basic / default theme of version 4.0.1. I just copied over how it was done in the 4.0.1 themes. First I made the mistake to change the source files directly, wondering why things were not changed at all. But then I remembered that I was using a customized theme and therefore had to use the Roller UI to change the copies of the velocity templates in the database via my web browser.

The comments functionality now looks like this in Weblog

 

#if ($model.permalink)
  <br/><br/>
  #if($model.weblogEntry.commentCount > 0)
    #showWeblogEntryComments($model.weblogEntry)
  #end
  #showWeblogEntryCommentForm($model.weblogEntry)
#end    

And the Referrer link box in the sidebar like this:

<li class="categories">
  <h2>Referers</h2>
    #set($refs = $model.weblog.getTodaysReferrers())
    #showReferrersList($refs 20 23 true)
</li>

The calendar box on the sidebar generates links with a date parameter in the URL, but they don't work. I decided to delete this until I get time to look into it in depth.

Further information

Further information on how to create themes fro Apache Roller version 4.0 are available in the blog of dave johnson:

and in the official Apache Roller Template Guide.

Hopefully some of the excellent, free roller themes find their way to the Roller Support Project and rollerthemes.com.

  Share

Permalink     Kommentare[1]

Related Articles:

Kommentare:

Apache roller is going to make it big in the blogging arena. there's much more thank jut a blogging here, there's a lot to learn.

Gesendet von ZK@Web Marketing Blog am May 21, 2009 at 07:31 AM CEST #

Senden Sie einen Kommentar:
Kommentare sind ausgeschaltet.