roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: expose weblog uploaded files model?
Date Mon, 20 Aug 2007 14:31:16 GMT
OK, in Weblogger's docs/examples/plugins/pluginmodel directory you
will find code and a build script for a simple Page Model plugin. The
directory is here http://tinyurl.com/3bx8q6 and the actual PageModel
class is here: http://tinyurl.com/2vq8xj

That plugin simply allows template to access the currently
authenticated user. What you want to do instead is to wrap the
FileManager.

Hmm... actually, that plugin is out of date for 4.0 (due to changes in
package naming) but it should work fine in 3.1). I need to fix that.
Anyhow, using 3.1 class names, you'd want to do something like this:

   FileManager mmgr = RollerFactory.getRoller().getFileManager()

And then provide methods in your model class for accessing the data
you want from the file manager. Make sense?

- Dave



On 8/20/07, Guy Katz <gkatz@allot.com> wrote:
> That will be great.
> Java is not a problem for me.
> Just point me in the right direction and I will try to write it!
> Thanks.
>
> -----Original Message-----
> From: Dave [mailto:snoopdave@gmail.com]
> Sent: Monday, August 20, 2007 5:15 PM
> To: user@roller.apache.org
> Subject: Re: expose weblog uploaded files model?
>
> On 8/20/07, Guy Katz <gkatz@allot.com> wrote:
> > Hi and thanks for the reply.
> > I want to list the uploaded resources for a weblog.
> > I could not find a way to achieve this. I want one of my themes to
> > display the uploaded resources the same way I list categories and
> > links(blog roll)
> >
> > From your answer I understand that there is not way to do this. Did I
> > understand correctly?
>
> You can do it, but it will require writing a "Model Plugin" in Java. I
> can give you some pointers if you'd like to try that.
>
> - Dave
>

Mime
View raw message