You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Daniel Ruan <da...@gmail.com> on 2011/03/01 17:11:33 UTC

Re: Listing Articles by the Same Author

Hi Dave,

Unfortunately we have just one blog. So that won't work.

How about doing a search against a username? I tried to use the Lucence
syntax to specify a field search but got no luck with that.

Daniel

On Sun, Feb 27, 2011 at 10:09 AM, Dave <sn...@gmail.com> wrote:

> On Thu, Feb 24, 2011 at 3:21 PM, Daniel Ruan <da...@gmail.com> wrote:
> > I have a blog with multiple contributors. Is there a way to display all
> the
> > articles from the same author?
>
> You can only do that if you have a "site wide" blog, i.e. one that
> aggregates entries from across all blogs on your entire Roller site.
> In a site-wide blog, you get the Site Model AKS the $site object,
> which supports a method that returns a pager with just entries from
> one author:
>
>   public Pager getWeblogEntriesPager(WeblogWrapper queryWeblog,
>      User user, int sinceDays, int length)
>
> Take a look at the Roller Template Guide for more information.
>
> Hope that helps...
>
> - Dave
>

Re: Listing Articles by the Same Author

Posted by Daniel Ruan <da...@gmail.com>.
Hi Nelson,

A clever idea :). Unfortunately we are using categories so this won't work.
 But you just inspired me: I can tag the article by the author username and
then customize the tag macros to hide all author name tags.  I am sure this
will work :-).

Daniel

On Tue, Mar 1, 2011 at 11:57 AM, Nelson Chamberlain <
nchamberlain@ceradyne.com> wrote:

> Hi Daniel
>
> Could you assign each author their own category? (Bob Smith, John Doe,
> etc). That would allow you to display all articles by the same author by
> selecting their category.
>
> The biggest problem would then be if you also needed to view their articles
> by non-author categories, e.g., if an article written by Bob is assigned to
> the category "Bob" it cannot be assigned to a second category "Software".
>
> But if each author typically writes on only one topic, then assigning each
> author their own category could work.
>
> Nelson
>
> -----Original Message-----
> From: Daniel Ruan [mailto:danielruan@gmail.com]
> Sent: Tuesday, March 01, 2011 8:12 AM
> To: user@roller.apache.org
> Subject: Re: Listing Articles by the Same Author
>
> Hi Dave,
>
> Unfortunately we have just one blog. So that won't work.
>
> How about doing a search against a username? I tried to use the Lucence
> syntax to specify a field search but got no luck with that.
>
> Daniel
>
> On Sun, Feb 27, 2011 at 10:09 AM, Dave <sn...@gmail.com> wrote:
>
> > On Thu, Feb 24, 2011 at 3:21 PM, Daniel Ruan <da...@gmail.com>
> wrote:
> > > I have a blog with multiple contributors. Is there a way to display all
> > the
> > > articles from the same author?
> >
> > You can only do that if you have a "site wide" blog, i.e. one that
> > aggregates entries from across all blogs on your entire Roller site.
> > In a site-wide blog, you get the Site Model AKS the $site object,
> > which supports a method that returns a pager with just entries from
> > one author:
> >
> >   public Pager getWeblogEntriesPager(WeblogWrapper queryWeblog,
> >      User user, int sinceDays, int length)
> >
> > Take a look at the Roller Template Guide for more information.
> >
> > Hope that helps...
> >
> > - Dave
> >
>

RE: Listing Articles by the Same Author

Posted by Nelson Chamberlain <nc...@ceradyne.com>.
Hi Daniel

Could you assign each author their own category? (Bob Smith, John Doe, etc). That would allow you to display all articles by the same author by selecting their category. 

The biggest problem would then be if you also needed to view their articles by non-author categories, e.g., if an article written by Bob is assigned to the category "Bob" it cannot be assigned to a second category "Software".

But if each author typically writes on only one topic, then assigning each author their own category could work.

Nelson

-----Original Message-----
From: Daniel Ruan [mailto:danielruan@gmail.com] 
Sent: Tuesday, March 01, 2011 8:12 AM
To: user@roller.apache.org
Subject: Re: Listing Articles by the Same Author

Hi Dave,

Unfortunately we have just one blog. So that won't work.

How about doing a search against a username? I tried to use the Lucence
syntax to specify a field search but got no luck with that.

Daniel

On Sun, Feb 27, 2011 at 10:09 AM, Dave <sn...@gmail.com> wrote:

> On Thu, Feb 24, 2011 at 3:21 PM, Daniel Ruan <da...@gmail.com> wrote:
> > I have a blog with multiple contributors. Is there a way to display all
> the
> > articles from the same author?
>
> You can only do that if you have a "site wide" blog, i.e. one that
> aggregates entries from across all blogs on your entire Roller site.
> In a site-wide blog, you get the Site Model AKS the $site object,
> which supports a method that returns a pager with just entries from
> one author:
>
>   public Pager getWeblogEntriesPager(WeblogWrapper queryWeblog,
>      User user, int sinceDays, int length)
>
> Take a look at the Roller Template Guide for more information.
>
> Hope that helps...
>
> - Dave
>

Re: Listing Articles by the Same Author

Posted by Daniel Ruan <da...@gmail.com>.
I will try that too.  Thanks.

Daniel

On Tue, Mar 1, 2011 at 5:57 PM, David Johnson <sn...@gmail.com> wrote:

> Thats OK, you should still be able to set that one blog to be site-wide and
> thus gain access to the $site model and its methods.
>
> - Dave
>
>
>
> On Mar 1, 2011, at 11:11 AM, Daniel Ruan <da...@gmail.com> wrote:
>
> > Hi Dave,
> >
> > Unfortunately we have just one blog. So that won't work.
> >
> > How about doing a search against a username? I tried to use the Lucence
> > syntax to specify a field search but got no luck with that.
> >
> > Daniel
> >
> > On Sun, Feb 27, 2011 at 10:09 AM, Dave <sn...@gmail.com> wrote:
> >
> >> On Thu, Feb 24, 2011 at 3:21 PM, Daniel Ruan <da...@gmail.com>
> wrote:
> >>> I have a blog with multiple contributors. Is there a way to display all
> >> the
> >>> articles from the same author?
> >>
> >> You can only do that if you have a "site wide" blog, i.e. one that
> >> aggregates entries from across all blogs on your entire Roller site.
> >> In a site-wide blog, you get the Site Model AKS the $site object,
> >> which supports a method that returns a pager with just entries from
> >> one author:
> >>
> >>  public Pager getWeblogEntriesPager(WeblogWrapper queryWeblog,
> >>     User user, int sinceDays, int length)
> >>
> >> Take a look at the Roller Template Guide for more information.
> >>
> >> Hope that helps...
> >>
> >> - Dave
> >>
>

Re: Listing Articles by the Same Author

Posted by David Johnson <sn...@gmail.com>.
Thats OK, you should still be able to set that one blog to be site-wide and thus gain access to the $site model and its methods.

- Dave



On Mar 1, 2011, at 11:11 AM, Daniel Ruan <da...@gmail.com> wrote:

> Hi Dave,
> 
> Unfortunately we have just one blog. So that won't work.
> 
> How about doing a search against a username? I tried to use the Lucence
> syntax to specify a field search but got no luck with that.
> 
> Daniel
> 
> On Sun, Feb 27, 2011 at 10:09 AM, Dave <sn...@gmail.com> wrote:
> 
>> On Thu, Feb 24, 2011 at 3:21 PM, Daniel Ruan <da...@gmail.com> wrote:
>>> I have a blog with multiple contributors. Is there a way to display all
>> the
>>> articles from the same author?
>> 
>> You can only do that if you have a "site wide" blog, i.e. one that
>> aggregates entries from across all blogs on your entire Roller site.
>> In a site-wide blog, you get the Site Model AKS the $site object,
>> which supports a method that returns a pager with just entries from
>> one author:
>> 
>>  public Pager getWeblogEntriesPager(WeblogWrapper queryWeblog,
>>     User user, int sinceDays, int length)
>> 
>> Take a look at the Roller Template Guide for more information.
>> 
>> Hope that helps...
>> 
>> - Dave
>>