squeg
Posts: 113
Joined: Wed Jun 30, 2004 1:59 am
Contact:

Postby squeg » Thu Jul 01, 2004 6:24 pm

Is there any documentation on the script options available for use in your feed templates? I'd like to do a little more playing around with configuring templates for different purposes and I'd be interested in knowing what items i can place programatically.

Also, are there script options other than placing your variable names in the curly brackets, if I want to do any kind of dynamic manipulation at the time the feed is generated? I'm not terribly sure what i might do with that yet, just seeing what the options are.

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Fri Jul 02, 2004 7:37 am

squeg wrote:Is there any documentation on the script options available for use in your feed templates? I'd like to do a little more playing around with configuring templates for different purposes and I'd be interested in knowing what items i can place programatically.


Not really. The parameters that are in the supplied templates are basically it but if you want some new ones, just let me know and I'll put them in.

squeg wrote:Also, are there script options other than placing your variable names in the curly brackets, if I want to do any kind of dynamic manipulation at the time the feed is generated? I'm not terribly sure what i might do with that yet, just seeing what the options are.


I've found that I've wanted a more dynamic framework for generating pages but the code currently doesn't support anything more than simple parameter replacement. Again, if you can come up with some ideas and I can dilate the space-time continuum to give me more than 24 hours in a day, I'll upgrade the code :-) :roll:

squeg
Posts: 113
Joined: Wed Jun 30, 2004 1:59 am
Contact:

Postby squeg » Fri Jul 02, 2004 6:14 pm

Hmmm... messing with the space/time continuum. Maybe not such a good idea. Perhaps just driving across time-zones?

As far as additional parameters might go, I was mostly just curious. But I do think some more options for the channel details might be nice. It appears that you have one parameter that basically includes several details depending on what's available in the feed. It might be nice to have some optional variables for each specific detail so that the user could format/position them however he sees fit.

Without scripting, i can't think of any other variables you might need.

I can think of two scripting ideas that would be useful for building templates. First some kind of conditional operator, like an "if" and some conditionals. That plus a variable that indicated the "state" of the current item (new/unread/read) would then allow you to format the item differently depending on its state. It would also let the user replace the images that appear next to the item based on state.

The other thing I'd love to see is some kind of "next" function in that could be called in the "repeat" block of the template This would advance to the next item in the feed without jumping back to the beginning of the repeat block. Right now, you're kind of limited in how you can present the data because you have to repeat the same HTML everytime with your item data. It prevents someone from say, presenting the data in a anything but the simplest of columnar forms.

Right now, I THINK it might be possible to accomplish a kind of floating column set with CSS and some fancy "DIV" work by using a div to provide some boundaries and then floating all the item divs to the left. But every column item would look the same and formating would be limitted.

However, if there were a next function, I could call, to step to the next item in the feed without repeating all of the HTML in the repeat block, then I could create some much more elaborate pages where each column could have it's own formating rules and the rows could end where I wanted them to.

Aside from columns, a "next" function would allow you to create striped rows similar to a spreadsheet to improve readability.

Oh, one last thought... while on the subject of scripting and variable replacement, it might be nice to be able request a certain number of characters or words to use for the excerpted item details. I could see useful presentations that only give say the first 15 words

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Sat Jul 03, 2004 5:30 am

squeg wrote:It appears that you have one parameter that basically includes several details depending on what's available in the feed. It might be nice to have some optional variables for each specific detail so that the user could format/position them however he sees fit.


It was done that way because I didn't have a more dynamic way of optionally including stuff or not :roll:

squeg wrote:I can think of two scripting ideas that would be useful for building templates. First some kind of conditional operator, like an "if" and some conditionals. That plus a variable that indicated the "state" of the current item (new/unread/read) would then allow you to format the item differently depending on its state. It would also let the user replace the images that appear next to the item based on state.


It'd be easy to go overboard with this kind of stuff. Maybe I should just hook in a PHP processor :lol:

/taka thinks for a second... Maybe that's not such a silly idea :? :shock:

The other suggestions you made for page layout where also pretty good. I'm thinking about offering a more sophisticated way of generating pages (e.g. maybe something like FeedDemon's newspaper feature, taking input from multiple channels) but it will probably be XSLT driven. I went the HTML template way originally because I wanted to make it as easy as possible for non-techies to use. But the PHP thing is intriguing...

squeg wrote:it might be nice to be able request a certain number of characters or words to use for the excerpted item details. I could see useful presentations that only give say the first 15 words


You can tweak the FeedItemDescriptionExcerptMin/MaxWords settings in CONFIG.INI to do this (although it's a global setting). I'll see how hard it will be to make it a parameter to a template parameter.

Matt

Postby Matt » Wed Jul 14, 2004 6:21 am

It'd be great to have a list available of all the options you can get. One i'd really like to have is how to get the pubDate from the feed, and show it with each item. (i could have sworn it was previously there, but i cant find it now).

A page in the documentation with the valid search and replace tags would be really good.

Oh, and ps - congrats on a darn cool program.

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Wed Jul 14, 2004 6:28 am

Matt wrote:One i'd really like to have is how to get the pubDate from the feed, and show it with each item.


Some of the metadata is rolled into a single template parameter - I'll make each one available separately for the next release.

Matt wrote:Oh, and ps - congrats on a darn cool program.


Thanks :-) :oops:


Return to “Awasu - General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests