Hi
I would like to see the option, that users can add comment to some activity.
e.g. for change of facebook status.
Will be something like this possible in near future?
Thanks
Igorik
http://www.somvprahe.sk
| Comment | File | Size | Author |
|---|---|---|---|
| #35 | activity_comments_3.patch | 16.96 KB | sirkitree |
| #34 | activity_comments_2.patch | 16.95 KB | sirkitree |
| #31 | activity_comments_1.patch | 17.28 KB | sirkitree |
| #28 | activity_comments_1.patch | 17.18 KB | jaydub |
| #26 | activity_comments.patch | 13.44 KB | sirkitree |
Comments
Comment #1
jaydub commentedin near future: not likely
to get comments on activity records then realistically then activity records would be nodes and we're not going down that path just yet.
Comment #2
sirkitree commentedAgreed, but we should explore this possibility in the near future.
If we saved every activity as a node, with a little extra data (cck field for the module classification?) then we could use views to display and would really cut down the code base.
Comment #3
igorik commentedHi
Thanks for quick reply. I will be hope for developing the module this way.
Good luck and thanks for your work
Igorik
Comment #4
Flying Drupalist commented+1 for support on this. I hope eventually everything will become nodes. :)
Comment #5
morbus iffI will be working on this for a client, but I will *not* be using nodes. The plan is Facebook like replies, just a single textfield, check_plained, no input filters, etc., etc. I won't be utilizing comment.module or node.module for this functionality.
Comment #6
sirkitree commentedawesome! love to see what you come up with!
Comment #7
morbus iffHere's the first draft of this. It's good enough, for me, to show to the client for feature approval.
Comment #8
sirkitree commentedSexy! Hopefully I'll get a chance to look at this more in depth tonight or over the weekend. Thanks Morbus!!
Comment #9
michelleI just gave it a whirl and it works well. Submitting the comment via ajax would be gravy but I know Morbus isn't going to do that. If you activity folks know how to add that in, that would be great. :)
Thanks, Morbus!
Michelle
Comment #10
gausarts commentedsubscribe thanks
Comment #11
michelle@gausarts - You can "subscribe" by trying the module out and reporting your findings. That gets you updates and is far more helpful towards actually getting this into activity.
Michelle
Comment #12
morbus iffSirkitree: any comments on it?
Comment #13
sirkitree commentedUhg, sorry, haven't gotten a chance yet. I've been swamped at work witha new launch that's been taking up all of my time. Hopefully this weekend tho (worked last weekend and supposed to have off today but find myself squashing bugs again... such is life). Soon! Promise!
Comment #14
Flying Drupalist commentedHi Morbus Iff, thanks for the great module. The admin x now appears on a new line. Can you make it inline with the comment?
Comment #15
sirkitree commentedThis is great Morbus! Seems to work very well in my limited testing and your code is very well received.
I'm not sure I want to support another submodule, so I'm debating just throwing it into our code base. ref (#361550: Planning the next version of activity (6.x-2.x))
What do you think jaydub?
Comment #16
michelleI think just providing an option in settings as to whether or not to allow comments on activity makes sense. I hate that modules break into so many submodules for every little thing that could be a setting anyway. :)
Michelle
Comment #17
morbus iffSirkitree: for this to go into the core codebase (which I'm perfectly fine with and support), I think that all the theme functions should be moved into .tpl.php's. This way, we'd be able to use preprocesser functions to add the comments in, instead of my theme_registry_alter (which will cause problems with people who expect to theme theme_activity and not theme_activity_comments; Michelle ran into this.)
Comment #18
michelleDefinite +1 on moving to template files. It's the D6 way. :) And preprocess is so yummy.
Also, I realize you may not have time to do this all immediately but could you at least confirm that the comment storage is what you will be using so early adopters don't get burned when it becomes part of the module?
Thanks,
Michelle
Comment #19
sirkitree commentedIf it goes in (and pending jaydub's feedback) I see no reason to change the storage method.
Comment #20
michelle@sirkitree: Thanks. I'm working on a site right now that needs this so Morbus's timing is great. I don't mind using as yet uncommitted code as long as the data will transfer.
Michelle
Comment #21
walker2238 commentedWould I be able to use this for 5x?
Comment #22
sirkitree commentedComment #23
sirkitree commentedComment #24
sirkitree commentedOk, here is a patch that adds this feature into the core of the module. I didn't create a .tpl file as I'm not sure of the technique, link for me?
Comment #25
sirkitree commentedjust noticed the profile page now looks silly...
Comment #26
sirkitree commentedChanging the default theme on the profile to be a table view as well, keeping it all uniform.
Comment #27
sirkitree commentedComment #28
jaydub commentedOk I played around with this patch some. I made some minor and a few semi-major changes which I've noted below.
activity.install
- added an index on the activity_comments uid column. Figure there could be a reason to fetch a user's comments so having the index could be beneficial
- changed the update to 6101 from 6200. If we are targeting this for 6.1 release then should be 6101. 6200 would be an update to bring the module from 6.1 to 6.2 branch level
activity.css
- I made some changes to the location and styling of the activity record delete link which are rolled in with this since the addition of the 'Comment' link made is necessary.
- added a number of rules for individual elements of the activity comment such as comment author, comment timestamp and comment text. Overall style is moving toward a typical facebook comment.
activity.module
- I've moved the activity delete link into the $activity array that is passed around to most other functions and theme functions.
- moved the activity_comments loading out of the theme_activity function and into activity_get_activity.
- created a theme_activity_comments function to take some of the logic out of the theme_activity function.
- changed theme_activity function a bit to better place the comments link if any, the delete link if any, and the comments form if any.
activity_comments.js
- changed jQuery search to reflect change in position of the comments form.
added some code comments, modified others and removed some comments from unrelated code.
Another task we'll have to add if comments are a go is to add in comment deletion just as in activity record
deletion. that includes deleting any comments associated with an activity record when the record is deleted.
Comment #29
sirkitree commentedWow! Awesome work, as always jaydub! I'll review this later today.
Comment #30
jaydub commentedhow did the profile view look silly? I don't much like the table view there in the profile. Most other content displayed in the profile via hook_profile view $op are lists. tables are more difficult to work with when space is constrained and I think that user profile data may appear in smallish spaces such as a panel similar to a block on a sidebar.
Comment #31
sirkitree commentedBasically, the comment form was showing up and it looked all whack. So basically, instead of spending time on doing some more css to get it too look better, I took the lazy route and made it uniform to the All Activity page with a table so that it just conformed to that css.
The patch looks good, except for the last part which it looks like you used a different command to generate and it doesn't actually create the file. Here's a re-roll that does JUST that, didn't change anything else.
Comment #32
jaydub commentedI've managed to get the comments delete functionality running so I'll re re-roll with those changes at which time the basics should all be in here. We can work on the styling and other niceties later. The issue of the comments form in list-item mode vs table is simply a question of CSS rules as I checked into that. In tables, the default Drupal rules remove most margins from form elements. In list mode when you're in the #center region, there are default margins set on the form elements. The #center specifier is why the comments form looks fine on the blocks which are lists as well.
Comment #33
morbus iffWhy is the activity.css being added for every single page load? That's wrong.
Also, I finally figured out my self-comment: "oddly, when there are multiple forms on the page, the aid in values is always from the first rendered form...". To fix this, we would have to define our own hook_form(), and create unique forms that refer back to it. I've now down this successfully is other, non-activity, code. See http://www.computerminds.co.uk/drupal-6-multiple-instances-same-form-one....
Comment #34
sirkitree commentedHere's a re-roll with css loading in the correct places, activity_page() and hook_user() ..view..
Will look into the other but not sure it's needed to get a release out the door. Will apply to the next branch however which we want streamlined as possible. Thank you for your contributions Morbus. If you get a chance, I'd love to hear any feedback you might have on our plans for the next version, which you can see here: http://groups.drupal.org/node/19249
Comment #35
sirkitree commentedoops, js wasn't working with the new dom structure introduced. updated to use .siblings() instead of .children()
Comment #36
sirkitree commentedI'm going to rtbc this. needs to get pushed as I'm in a hurry to get a release done tonight so I can start showing work on the next branch (which is a pretty major re-write, mentioned above)...
Comment #37
sirkitree commentedcommitted to dev.
Comment #38
michelleCool!
Thanks,
Michelle
Comment #39
szy commentedHow can I turn these horrible comment forms off? :/
I can't see an option in block settings, there is no option in module settings either.
Guys, don't force me to use comments, please...
Szy.
Comment #40
sirkitree commentedYou can simply override the theme function.
Original:
Change to:
I realize this isn't totally ideal, but I'm trying to concentrate efforts on the next branch as much as I can.
Comment #41
szy commented@sirkitree, thanks.
And thank you for the module itself, I really like it, as I like all the modules 'living'
on site.
But:
-> #391770: Optional use of comments
:]
Szy.
Comment #43
james_sf commentedHi Sirkitree and Igorik,
I tried to run the activity_comments_3.patch against Activity 1.2, but patching resulted in several errors. Is this 3rd patch the latest, and does it work against the Activity 1.2 build?
On a related note, I'm thinking about upgrading to Activity 2. Do you have a comments solution (esp. for Facebook_Status) that works for Activity 2?
Thanks,
James
Comment #44
jaydub commentedI think you might be confused, the 1.2 release (and actually previous releases) already have the Activity Comments feature included. You don't need to add any patch from here. As issue #37 and #42 indicate, these changes were added to the project and this issue was closed back in March.