Re(2): show text abstract in discussion group post

Jan M.J. Storms jan at storms.org
Fri Dec 20 07:11:40 PST 2002


Joshua Lipton/Slowtrain scripsit dd. Thu, 19 Dec 2002 18:29:02 -0600

>I went ahead and got MetaTool but I'm not sure that it's going to be able to
>do what I need. This code needs to be able to work within the Discussion
>Theme that I've been modifying.
>
>My thought with MetaTool was to create a metafield that inherited the body,
>then redisplay that same field in the messagelist that appears in recent
>topics. However, when I use the {metaDataMacros.showval({"membername}")
>deal, I get "assignment over existing table object" error messages.
>
>Would it not be better to have a custom macro that just inherited the body,
>stripped out everything past the first 255 characters and then was a legal
>macro that I could use in the Discussion Theme? I think this is the way to
>do it, but I don't know enough Manila/Frontier to write a script like that.
>
>If you do believe that I can do this in MetaTool, I wouldn't be shocked, but
>please be more specific if you can.
>
>Thanks,
>joshua at theslowtrain.com

I'm sorry, I meant "metadata", not "metatool".

Here is to get you started:

make a metadata type called "inResponseTo"

Make a story with a query that looks for all "inResponseTo" with value
"0".  Like:

{metadatamacros.query("inResponseTo", "0", maxItems: 5, includeSelf:
false, header:"zoiets ", dateformat: "shortstring")}

This gives you the topics list.

Now you have a few options. You can either set a metatype to the first
200 words of the body using the newmessage and changedmessage callbacks,
or you could use a metadata trigger script to do it, but your best option
may be to write your own query results formatter.

The adres of the formatter is a parameter of metadatamacros.query. You
can also make use of beforeItem and afterItem to make the list match your
discussion theme.

I hope this helps, and I would be interested to see what you come up with.

Regards,

Jan M.J. Storms




More information about the Frontier-Users mailing list