Active development of JAMWiki has ceased, and bug fixes and support will be limited at best. If you are interested in taking over management of JAMWiki please send an email to the jamwiki-devel mailing list.

User comments:scroco


Image alignment

At the moment image resizing is not supported (planned for the future) but image alignment should work:

Image only
Image with caption
[[Image:LocationSomalia.png|Map of Somalia]]
Image with frame
[[Image:LocationSenegal.png|frame|Map of Senegal]]
Thumbnail image
[[Image:LocationSenegal.png|thumb|Map of Senegal]]
Right-aligned image
[[Image:LocationSenegal.png|right|Map of Senegal]]
Left-aligned image
[[Image:LocationSenegal.png|left|Map of Senegal]]

If there are any errors with the above please let me know. -- Ryan 09-Aug-2006 10:23 PDT

I spoke too soon - looks like there's a bug somewhere with the first two. I'll investigate. -- Ryan 09-Aug-2006 10:25 PDT
Never mind, wrong image name on the first two. As long as the image exists it should align properly - see Parser Test for an example. -- Ryan 09-Aug-2006 10:31 PDT

  • Image with Caption only creates a text link to the image, no inline image. Is that what is intended?
  • What is the difference between left and frame?
  • What is the difference between right and thumb?

What I'm trying to say in the roadmap is: besides image resizing, should it support multiple options like [[Image:LocationSenegal.png|thumb|left|Map of Senegal]]

Additionally, the caption should support links like [[Image:LocationSenegal.png|thumb|left|Map of [[Senegal]] ]]

Sorry for the confusion.

No problem - looks like there are additional combinations that need to be supported. The fact that [[Image:LocationSenegal.png|thumb|left|Map of Senegal]] aligns right is a bug, I'll fix that for the next release. Allowing Wiki markup within an image caption is something that should also be supported, although it's a bit tricky. I'll add that to Known Issues and try to get it into the next release as well. As to "Image with Caption only creates a text link" can you provide an example? [[Image:LocationSenegal.png|Map of Senegal]] seems to display OK for me on the Parser Test page. -- Ryan 09-Aug-2006 10:49 PDT

It's a rendering issue in IE. Here's a screen capture of the parser test page. ... snip ...

Thanks, looks like the div tag is getting messed up. I'll get a fix out shortly. -- Ryan 09-Aug-2006 11:14 PDT
Fixed now on - the offending code was an extra quotation mark being added in the LinkUtil.buildImageLinkHtml() method. -- Ryan 09-Aug-2006 11:27 PDT

OK, I think the code now corrects some of the image alignment issues. The current algorithm is:

  • "frame" and "thumb" are treated the same. Once image resizing is put in place then "thumb" will indicate an image of a reduced size. I don't think Mediawiki makes any further distinction between the two, although I'm wrong a lot.
  • "left", "right" and "center" alignments should always be obeyed. If I've gotten this wrong somewhere please report on the Known Issues or Bug Reports page.

A current example of the code in action is on Parser Test#Images. Let me know if you find any further problems, and thanks for pointing this out. -- Ryan 10-Aug-2006 12:32 PDT


Since you've helped out a lot with testing and feature suggestions I'd be glad to add you to the JAMWiki CREDITS.txt file if you'd like. If you're interested please just let me know what name to use for attribution; for reference I just list myself using my real name and login - "Ryan Holliday (wrh2)". -- Ryan 11-Aug-2006 18:07 PDT

Thanks for the offer, sounds good to me ... The format you use is fine: "Scott Croco (scroco)". I'm committed to this product, so I'll continue to test and interact for sure. And If I build something that is worth adding to the project, I'll be sure to tell you about it. -- scroco 13-Aug-2006 22:46 PDT
OK, I've got you in CREDITS.txt. Some day when everyone is running JAMWiki you can go to bars and pick up chicks with the line "Yeah, I was in the JAMWiki credits all the way back at version 0.2.1". Chicks dig lines like that. -- Ryan 14-Aug-2006 12:39 PDT
Good point ... but will my wife and kid be impressed? -- scroco 14-Aug-2006 13:21 PDT
My girlfriend actually likes it when I try such things - she tends to sit back and laugh when any such attempt is made. Might work to similar advantage for you. -- Ryan 14-Aug-2006 14:20 PDT

New special page

Ryan, I've added a new special page to my build (for displaying user profile type info), and I've got everything working except for the links to this new page. How do I get JAMWiki to recognize a special page link?

For example, in the recent changes jsp, I have this code:

<a href = "<jamwiki:link value="Special:User" />?user=<c:out value="${change.authorId}" />">
<c:out value="${change.authorName}" /></a>

The format of which I copied from the Special:History link in the same page

<a href = "<jamwiki:link value="Special:History" />?topic=<jamwiki:encode value="${change.topicName}" />">
<f:message key="common.caption.history" /></a>

When the page renders, my links looks like this:

<a href = "/wiki/Special:Edit?topic=Special:User?user=1234">John Smith</a>

I want the link to be "Special:User?user=1234", not "Special:Edit?topic=Special:User?user=1234". I've looked through the, I don't understand why it's adding the "Special:Edit" to the link for "Special:User" but not for "Special:History".

-- scroco 16-Aug-2006 11:29 PDT

The way the system determines whether or not to display a link as an edit or as a normal link is by calling WikiBase.exists(virtualWiki, topicName). That method does a few things, one of which is to see if a value is a real topic or a special topic. Since Special:User isn't going to be a topic stored in the jam_topic table you can add it to as:
The file is a leftover from the old Very Quick Wiki code, and while it can be cleaned up a bit I like the idea of having a properties file to denote special pages as it might make it easier to support plugins in the future. If we come up with a better way to do that, can definitely go away. -- Ryan 16-Aug-2006 11:34 PDT

Perfect. Thank you. Maybe there's a good way to leverage jamwiki-servlet.xml, since it defines all the special pages as well? -- scroco 16-Aug-2006 11:53 PDT

Added to the To-Do List. -- Ryan 16-Aug-2006 12:00 PDT

I have a couple follow up questions.

  • I also need to update what is output when a user uses "~~~~". I imagine that is somewhere in the parser, could you point me to where it is?
  • About, is that file used for anything? It contains reference to 2 classes which don't exist.

-- scroco 16-Aug-2006 12:42 PDT

Signatures are built from ParserUtil.buildWikiSignature(). If you can make that method more generic (ie allow administrators to specify signature patterns, etc) I'd be all for it. The jamwiki-preprocessor.jflex file also has code to recognize the tildes while parsing, but I think that's lower-level than what you're looking for.
And,, and the file are all on the chopping block, I just need to read through the code a bit more closely. At least one of those files was used in the Very Quick Wiki code (I think) to allow inter-wiki links (such as [[Wikipedia:Main Page]]) so I've kept them around, but once JAMWiki has inter-wiki links working they will most likely all go away. -- Ryan 16-Aug-2006 12:50 PDT


How about adding two settings to, which would be available in the Environment, "sig-name-format" and "sig-date-format".

sig-date-format can be any valid date format.
sig-name-format can use wiki link syntax, and can include the below predefined variables (or can just be text, no link):

{0} - user ID
{1} - user login
{2} - user display name
{3} - user email


sig-date-format=dd-MMM-yyyy HH:mm zzz



And then rework ParserUtil.buildWikiSignature() to get the settings from the Environment and build the appropriate signatures.

-- scroco 16-Aug-2006 14:20 PDT

Sounds reasonable - feel free to copy the above to the Roadmap under the JAMWiki 0.3.x series - I'd rather not add any more features to 0.2.1 since it would be good to get that release out soon, but it could be included in 0.3.0, which will be the next release unless a really nasty bug turns up in 0.2.1. -- Ryan 16-Aug-2006 14:39 PDT

Source code

You probably already noticed, but for major releases I've been uploading the source code to Sourceforge, where it can then be downloaded. See JAMWiki Release Archive for links. For beta releases I'll continue to release source code from Let me know if the releases have been too frequent/infrequent for you, and if there's anything else I can do to make things easier. -- Ryan 17-Aug-2006 17:11 PDT

The frequency of the releases has been fine. Once or twice, I didn't get around to integrating a beta release before the next one was ready, but that's fine. As long as you're happy with your pace, I'm fine with it. -- scroco 17-Aug-2006 17:49 PDT