You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Dudee <gu...@gmail.com> on 2007/09/17 13:51:56 UTC
Create new actions and macros?
I want to add some more properties for the blogs and a webpage where these
can bet set. I've added the fields in the database and a webpage for each
weblog where these can be set. But how do I go from here. I don't really
know how the backend of Roller works. Where should I add my new action file
and what should it look like, and is there any hibernate/database files I
have to add or modifie?
I also wonder if the following macros exist:
1. Get x most recent entries from all blogs (to use on the frontpage)
2. Get x most recent entries from a specific blog (to use on the frontpage)
3. Get most recent users online
I'm using roller 4.0rc1.
--
View this message in context: http://www.nabble.com/Create-new-actions-and-macros--tf4464722s12275.html#a12730308
Sent from the Roller - User mailing list archive at Nabble.com.
Re: Create new actions
Posted by Dudee <gu...@gmail.com>.
I'm using Eclipse and there is no Find Usages there so I'm a bit lost.
Is the following steps correct if I want to add more properties to my
weblogs and create a template where I can show them or am I missing
something?
1. Create a table in the database with all the new properties
2. Create 3 files in the pojo-folder (hbm, orm ,java)
3. Create a new file in the rendering/model folder
4. Create a new struts action
5. Create the template
and then to create a action for updating the properties from the webpage I
1. Update the template
2. Create an action file in the Struts2 folder
3. Create an struts action
I'm using the latest version of roller.
I would really appreciate if you could help me out.
Dave Johnson-8 wrote:
>
> These kinds of questions are probably better for the dev list...
>
> On 9/17/07, Dudee <gu...@gmail.com> wrote:
>> I want to add some more properties for the blogs and a webpage where
>> these
>> can bet set. I've added the fields in the database and a webpage for each
>> weblog where these can be set. But how do I go from here. I don't really
>> know how the backend of Roller works. Where should I add my new action
>> file
>> and what should it look like, and is there any hibernate/database files
>> I
>> have to add or modifie?
>
> We don't have docs that explain how to add fields to objects and
> define new Struts actions, so you're going to have to spend a little
> time studying the code to figure out how things work. Take a look at
> the Weblog object for example, do a Find Usages in your IDE and look
> at how it is used in the backend managers, the action and the wrapper.
>
> - Dave
>
>
--
View this message in context: http://www.nabble.com/Create-new-actions-and-macros--tf4464722s12275.html#a12751793
Sent from the Roller - User mailing list archive at Nabble.com.
Re: Create new actions
Posted by Dave <sn...@gmail.com>.
These kinds of questions are probably better for the dev list...
On 9/17/07, Dudee <gu...@gmail.com> wrote:
> I want to add some more properties for the blogs and a webpage where these
> can bet set. I've added the fields in the database and a webpage for each
> weblog where these can be set. But how do I go from here. I don't really
> know how the backend of Roller works. Where should I add my new action file
> and what should it look like, and is there any hibernate/database files I
> have to add or modifie?
We don't have docs that explain how to add fields to objects and
define new Struts actions, so you're going to have to spend a little
time studying the code to figure out how things work. Take a look at
the Weblog object for example, do a Find Usages in your IDE and look
at how it is used in the backend managers, the action and the wrapper.
- Dave
Re: Create new actions
Posted by Dave <sn...@gmail.com>.
These kinds of questions are probably better for the dev list...
On 9/17/07, Dudee <gu...@gmail.com> wrote:
> I want to add some more properties for the blogs and a webpage where these
> can bet set. I've added the fields in the database and a webpage for each
> weblog where these can be set. But how do I go from here. I don't really
> know how the backend of Roller works. Where should I add my new action file
> and what should it look like, and is there any hibernate/database files I
> have to add or modifie?
We don't have docs that explain how to add fields to objects and
define new Struts actions, so you're going to have to spend a little
time studying the code to figure out how things work. Take a look at
the Weblog object for example, do a Find Usages in your IDE and look
at how it is used in the backend managers, the action and the wrapper.
- Dave
Re: Create new actions and macros?
Posted by Dudee <gu...@gmail.com>.
Thanks for all the help. Appreciated!
Dave Johnson-8 wrote:
>
> On 9/17/07, Dudee <gu...@gmail.com> wrote:
>> I want to add some more properties for the blogs and a webpage where
>> these
>> can bet set. I've added the fields in the database and a webpage for each
>> weblog where these can be set. But how do I go from here. I don't really
>> know how the backend of Roller works. Where should I add my new action
>> file
>> and what should it look like, and is there any hibernate/database files
>> I
>> have to add or modifie?
>>
>> I also wonder if the following macros exist:
>> 1. Get x most recent entries from all blogs (to use on the frontpage)
>
> Yes. Setup your front-page blog as an 'aggregated blog' and you'll get
> the $site model. See the Roller template guide for information on the
> methods provided by $site.
>
>> 2. Get x most recent entries from a specific blog (to use on the
>> frontpage)
>
> I think the $site model also offers that.
>
>> 3. Get most recent users online
>
> That one doesn't exist. We don't have any notion of "users online" at
> this point.
>
> - Dave
>
>
--
View this message in context: http://www.nabble.com/Create-new-actions-and-macros--tf4464722s12275.html#a12736490
Sent from the Roller - User mailing list archive at Nabble.com.
Re: Create new actions and macros?
Posted by Dave <sn...@gmail.com>.
On 9/17/07, Dudee <gu...@gmail.com> wrote:
> I want to add some more properties for the blogs and a webpage where these
> can bet set. I've added the fields in the database and a webpage for each
> weblog where these can be set. But how do I go from here. I don't really
> know how the backend of Roller works. Where should I add my new action file
> and what should it look like, and is there any hibernate/database files I
> have to add or modifie?
>
> I also wonder if the following macros exist:
> 1. Get x most recent entries from all blogs (to use on the frontpage)
Yes. Setup your front-page blog as an 'aggregated blog' and you'll get
the $site model. See the Roller template guide for information on the
methods provided by $site.
> 2. Get x most recent entries from a specific blog (to use on the frontpage)
I think the $site model also offers that.
> 3. Get most recent users online
That one doesn't exist. We don't have any notion of "users online" at
this point.
- Dave