Antville Project

Sunday, 16. June 2002

just a short message

to "plumcrazy4you" and some others: this weblog is dedicated to discuss the development of the antville weblog tool. so please stop using this weblog as if it were your own by posting stories/images that have nothing to do with that (you can easily open up your own weblog here).

link (no comments) 
 

Friday, 14. June 2002

stripping chars from the preferences tag - bug or feature ?

I'm just about to create a new weblog and chose a title with lowerthan / greater than signs in it. They seem to be handed through to the database without being escaped, so the result was a bit different than planned ;) Of course, these chars prevent the text inbetween from being displayed. I think it would be easy to do a search on the text data when submitting the form and replace special characters with the corresponding HTML entities.

In case this topic is through already take my apologies, but I quickly scanned this page and didn't see anything the like.

link (one comment
 

Thursday, 13. June 2002

Extensible Stories in Antville

Yesterday I checked in a patch to the xml_content branch of the CVS that changes how Antville stores Stories and Comments in the relational DB. Instead of storing titles and bodies of stories in a separate column each, everything is encoded into an XML document using Helma's native XML extension and stored into a generic "content" column.

This great advantage to this is that it is now possible to add custom properties to stories (and, if desired, comments) with almost no effort. The only thing one has to do is to add macros for the custom parts both in the story (or comment) editor skin and in the story (or comment) skins where that part is to be displayed. Antville still requires a text property to be there, and text and title are assumed by some internal parts like the recently modified list. Other than that, there is no limit on the number and names of custom story properties.

The macro used to edit or display story properties is called content and it is very similar to the old title and text macros (which are still supported for backward compatibility), except that it requires an attribute called part describing the name of the content part to be edited or displayed. For example, editing a story title with the content macro looks like this:

<% this.content part="title" as="editor" width="24" style="formTitle" %>

while displaying a custom property called "teaser" might look like this:

<% this.content part="teaser" %>

The content macro takes one extra attribute called fallback, which describes a content part which is to be used in case that the one specified by the part attribute is not set. Thus, the following code

<% this.content part="teaser" fallback="text" %>

would display the content part called "teaser" if it exists and the content part called "text" if not. If a part is not defined, nothing is displayed.

I must say that I'm myself astounded by the flexibilty, simplicity and usefulness of this concept. A lot of things suddenly become very easy. Most of these are beyond what we will likely ever want to do with Antville, but it's still worth to pick out a few: stories in multiple languages, partitioning a story into multiple parts or over multiple pages, versioning ... the list goes on.

Here's a quick look into how this is implemented. All in all, it was surprisingly simple because of Stefan's XML Extension. I'm using the native dumping/reading of Hopobjects, so all I have to do is create a transient Hopobject and add the content parts to it as properties. The Hopobject can be transformed into an XML string in one call of XML.writeToString(hopobject), and converted back from XML to Hopobject calling XML.readFromString(xmlstring). Basically, story content is managed via these three simple functions in story/objectFunctions.js:

/**
 *  Get a content part by name.
 */
function getContentPart (name) {
   var cnt = this.getContent();
   return cnt[name];
}

/**
 *  Return the content parsed into a HopObject.
 */
function getContent () {
  if (!this.content)
     return new HopObject ();
  return Xml.readFromString (this.content);
}

/**
 *  Set the content of this story object.
 */
function setContent (cnt) {
    this.content = Xml.writeToString (cnt);
    var raw = "";
    for (var i in cnt)
       raw += cnt[i]+" ";
    this.rawcontent = raw;
}

(The last section in setContent() is used for writing the raw content without XML markup into a separate column for searching. I'm still thinking about other ways to search over story content. Just as a note, it would technically be possible to search for content in specific content parts using something like "%<partname>%searchterm%</partname>%".)

The XML that's written to the DB looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!-- printed by helma object publisher     -->
<!-- created Wed Jun 12 18:52:09 CEST 2002 -->
<xmlroot xmlns:hop="http://www.helma.org/docs/gui
de/features/database"> <hopobject id="t15" name="" prototype="hopobject" created="1023900729721" lastModified="1023900729722"> <text>some text</text> <title>hello world!</title> </hopobject> </xmlroot>

I hope this gave you a good impression of what this feature is about and how it works. I'm curious to hear what you think.

link (12 comments
 

bug when registering

when i enter a number (e.g. "123") into the field "username" at /members/register i get an

Error in application 'antville': Syntax error detected near line 1, column 5, after "this" in string: 'this.123'

link (one comment
 

Wednesday, 12. June 2002

FYI: antville-update

today i merged in the changes made in the branch grob_messages into the main trunk in CVS. please give it a try (but remember: this is still part of code-refacturing and therefore should be considered beta!) and report any bugs or suspicious behaviours.

link (5 comments
 

Strange GROUPis from nowhere

In order to port antville to oracle 8i i got a problem with the GROUP BY clause of SELECT statements. It seems for oracle you must declare every columns position.

I removed the clauses out of story's and weblog's macro.js for tests.

now restarting hop i still get the same error: [HopMacro error: helma.scripting.ScriptingException: Error retrieving NodeIDs: ORA-00979: not a GROUP BY expression ]

searching the statement in the sourcecode of hop i found the GROUP BY clause only in Relations.java which doesn't import FESI. At a first view this can't throw a ScriptingException.

someone can put light on this phenomenon?

thanks in advance roland

link (5 comments
 

the road to 1.0?

here's a list of (missing) features or things that should change in antville as a result of an evening in a "gastgarten" where hns and i talked about the rough "roadmap" towards antville 1.0. i hope i got everything right and didn't forget something, and sorry for not posting it sooner. the names in brackets indicate those responsible for implementing.

  • Names of DB-Columns/Tables will be prefixed (or renamed to avoid usage of reserved names), plus adding SQL-scripts for other databases (at least oracle) [robert]
  • the content of a story (which is now stored in separate columns, "TITLE" and "TEXT") will be stored as XML in just *one* column in the database. the reason is that stories can be "extended" with new parts (eg. lead-text, abstract, link ...) by simply modifying the form for creating a new story (input-tags could be named ie. "content:title"). eventually the story-table in database is extended with a single column containing the plain text of the whole story-content for keyword-search [hns]
  • the language of system-messages changes according to system-language or weblog-language. all system-messages are basically skins that are defined in separate language-files (one for each) and can be reached at app.data[language-code]. this is already in CVS, for more see this posting.
  • antclick will include McCoi as database instead of HSQLdb [hns]
  • antville-setup: antville will provide a browser-based setup, meaning that parameters (like enabling/disabling auto-cleanup, language-settings, directories etc.) will be changeable without having to fiddle around in app.properties [robert, already in process].
  • enable/disable posting of comments for each story
  • two new macros: one for embedding the recent n stories located in a topic, and the other one for embedding a story/poll with a given id. with these macros users can customize the frontpage of their weblog.
  • navigation issues: see hns's proposal for details

plus some ideas that could be part of version 1.0, but 'til now are not more than brief concepts:

  • theme-support: every owner/admin of a weblog can export the design (meaning skins and those images referenced in skins) into a "theme", which then can be downloaded and imported by others. importing themes will support "theme-preview" (meaning that one can safely test a theme within the own weblog).
  • integration of PARSS-functionality in antville: the idea behind is that users should be able to subscribe RSS-feeds which are displayed as "simple weblogs" in antville. from there one can easily use an RSS-item as basis for a new post in a weblog. this is still subject to discuss (tobi and hns can tell a lot more about that).

all of the above features are still open to discussion. and of course everybody is welcome to contribute (ideas/code).

link (8 comments
 

The Antville Server Fund has been a great success. Thanks to everybody who contributed!
online for 8887 Days
last updated: 1/4/11, 10:22 AM
status
Youre not logged in ... Login
menu
October 2025
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
262728293031
July
recent
zfuture's house here is zfuture's
house
by zfuture (7/31/03, 2:59 AM)
i understand your concerns however,
i hardly can think of a solution. certainly, if the...
by tobi (7/29/03, 9:47 AM)
Found several more similar sites
listed This is getting to be quite a concern to...
by cobalt123 (7/27/03, 7:56 PM)
Second Post Alert on Referrer
bug livecatz I put this into "help" and now here:...
by cobalt123 (7/26/03, 7:14 PM)
well it's not easy to
find from here, anyway. think we should include a link,...
by tobi (7/24/03, 11:25 AM)
So finally I found
the helma Bugzilla - stupid me.
by mdornseif (7/24/03, 10:28 AM)
clock not that it's particularly
earthshattering but the antclock is running slow by about 15...
by kohlehydrat (7/23/03, 8:25 PM)
but blogosphere.us isn't can't really
be rated as spam can it?
by kohlehydrat (7/23/03, 8:08 PM)
More referrer spam www.webfrost.com
by Irene (7/23/03, 7:55 PM)
How to log skin names
I accessed to console?? Hi, I would like to know...
by winson (7/23/03, 4:12 PM)

Click here to get an XML version of this weblog.

Made with Antville
powered by
Helma Object Publisher