Hi Keith,

Thanks for this patch - this is very good. I'm going to do some more work on it and then send it up to subversion.

1. I started with the admin interface, added a "Ruled Table" and changed the delete function to work the same way the other Radiant delete pages work (with a separate page)

Awesome.

2. Cleaned up the routes (I had to do this to make the delete function work) and teh corresponding controllers. Your basic layout is still intact.

I decided to stick with the resourceful routes - at least for my purposes, it makes for more concise code. I got the delete function to work by posting to the #destroy method. Also, this way you don't have to do any if statements for post/get.

3. Removed "Comment Form" from the main comment tag. This kind of thing is so easy to add to a snippet, but hard to take out. Hope you don't mind.

Good idea.

4. Added a <r:comment:date /> tag. It is just a basic tag, take strftime formatting and returns the "created on" date

Much needed.

5. Finally, and this is not really necessary, but I moved the comment_tags.rb to the app/models folder. This seems to be the better place to keep it when you actually have a full app and models. Most other extensions put it here, it works either way. I will let you be the final judge of that.

I have seen it done both ways - the reorder extension keeps tags in lib. My preference is to use the Models directory only for database models, and put other objects in the lib directory or wherever else is appropriate. I'd like to hear what others have to say about this.

As for validation errors, I am not sure about the best way to do that. I think Javascript is not a good way, because you can't count count on what someone might have on the website. I for one never use scriptaculous/prototype and you are using yahoo. I hate to require that someone use a specific library. Building a flash message tag or building falsh messages into one of the basic comment forms seems like a much better idea. We can do a redirect to the form tag and have a flash message there, that should work without too much effort.

Yeah this is a tricky question. It seems like you should be able to make a snippet that passes an invalid Comment object to a custom tag, which then outputs the error code.

Here and there I added a few other things, but those are the major changes. Hope I haven't stepped on any toes! Change whatever you like, it is your extension after all and email me if you have any questions
Not at all! I really appreciate the help! I hope I haven't stepped on your toes. Also, I hope you don't mind, but I'm going to post this on the Radiant list so others can be involved.

Thanks again!
Ryan

On Apr 17, 2007, at 1:35 AM, Keith Bingman wrote:

OK, here is a huge giant diff. Like I said, I got carried away. I need this for a site I am working on, so started adding things for that site. Check it over carefully, but here are the major changes.

1. I started with the admin interface, added a "Ruled Table" and changed the delete function to work the same way the other Radiant delete pages work (with a separate page) 2. Cleaned up the routes (I had to do this to make the delete function work) and teh corresponding controllers. Your basic layout is still intact. 3. Removed "Comment Form" from the main comment tag. This kind of thing is so easy to add to a snippet, but hard to take out. Hope you don't mind. 4. Added a <r:comment:date /> tag. It is just a basic tag, take strftime formatting and returns the "created on" date 5. Finally, and this is not really necessary, but I moved the comment_tags.rb to the app/models folder. This seems to be the better place to keep it when you actually have a full app and models. Most other extensions put it here, it works either way. I will let you be the final judge of that.

Here and there I added a few other things, but those are the major changes. Hope I haven't stepped on any toes! Change whatever you like, it is your extension after all and email me if you have any questions


<routing_changes_3.patch>

As for validation errors, I am not sure about the best way to do that. I think Javascript is not a good way, because you can't count count on what someone might have on the website. I for one never use scriptaculous/prototype and you are using yahoo. I hate to require that someone use a specific library. Building a flash message tag or building falsh messages into one of the basic comment forms seems like a much better idea. We can do a redirect to the form tag and have a flash message there, that should work without too much effort.

Keith Bingman
Tel: +49-7731-79838380
[EMAIL PROTECTED]
http://keithbingman.com




On Apr 17, 2007, at 12:14 AM, Ryan Heneise wrote:

Hi Keith,

I did some work on the extension today and kind of got carried away: it bothered me that there was so much scaffolding in there, especially the routes, so I made them a bit more "Radiant". If you are interested, I will send you a diff file. I also started playing around with the the back end views, but didn't do too much. If you are interested in my routes changes, I will send you those. The RESTful stuff, while really cool isn't a good fit with Radiant and the scaffolding needed to be taken out. I haven't changed anything too major, but moved things around a bit and cleaned up the routes and controllers.

Yes - I am very interested in the diff. You're right, there really is no reason to have restful routes for this extension. I'll be interested to see what you did, because I am not too familiar with Radiant's routing.

I'm also going to add validation for the Comments model, and we need to figure out some way to display validation messages; for example if the commentor leaves the comment blank, it should show an error messages. I will probably play around with setting the flash variable, but i'm not sure yet how that will work with Radiant. Maybe in the end we'll end up using javascript validation.

The other big thing that needs to be done you already mentioned - is cleaning up the admin interface and removing the scaffolding.

Thanks for doing this, I really appreciate your help.

Ryan

On Apr 16, 2007, at 11:14 AM, Keith Bingman wrote:

Ryan,

I did some work on the extension today and kind of got carried away: it bothered me that there was so much scaffolding in there, especially the routes, so I made them a bit more "Radiant". If you are interested, I will send you a diff file. I also started playing around with the the back end views, but didn't do too much. If you are interested in my routes changes, I will send you those. The RESTful stuff, while really cool isn't a good fit with Radiant and the scaffolding needed to be taken out. I haven't changed anything too major, but moved things around a bit and cleaned up the routes and controllers.

Let me know if you are interested in the diff.

Keith

Keith Bingman
Tel: +49-7731-79838380
[EMAIL PROTECTED]
http://keithbingman.com




On Apr 12, 2007, at 4:13 PM, Ryan Heneise wrote:

Thanks Keith,

I fixed the login requirement - it should no longer force you to log in to post a comment.

I'd love to see your CSS. Currently it's using some very basic CSS and the Yahoo UI Grid Library. If you like, you can add your CSS to the "stylesheet" snippet (http://radiant.artofmission.com/ admin/snippets/edit/9).

By the way, I am officially soliciting patches for Comments. If you improve it, or tick off anything on the TODO list (http:// radiant.artofmission.com/about/), please send it in and I'll see that it gets applied.

- Ryan
http://radiant.artofmission.com/



On Apr 12, 2007, at 1:47 AM, Keith Bingman wrote:

Hi Ryan,

I just checked out your comments extension, which is like you said basic but definitely on the right path. Do you need some help with the Radiant CSS? I have done three or four extensions so far and am somewhat familar with the CSS Radiant uses and would be glad to help. I was about to hack something together for a couple of sites, but your extension will fit the bill nicely.

In any case, let me know and I will send you some CSS files if you are interested.

Thanks again and keep up the good work.

Keith


Keith Bingman
Tel: +49-7731-79838380
[EMAIL PROTECTED]








------------------------------------------------
Ryan Heneise
Art of Mission, Inc.
3720 Gattis School Rd #800 PMB 245
Round Rock, TX 78664

800-722-1492 (phone)

www.artofmission.com
[EMAIL PROTECTED]







_______________________________________________
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to