Add quick reply/edit

Michelle - September 3, 2008 - 16:10
Project:AJAX Comments
Version:6.x-1.8
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I'd like to have the ajaxy quick reply/edit like vB has. I don't know ajax at all, though. Any one want to work on this?

Michelle

#1

Michelle - December 9, 2008 - 03:54
Status:active» postponed

Will revisit this in 2.x.

Michelle

#2

-Shaman- - March 23, 2009 - 15:10

I'm using ajax_comments (http://drupal.org/node/349090), but with advanced_forum "delete" function doesn't works, I created an issue #411016: Can't delete comments when using advanced_forum.module, perhaps You could take a look at this as well?

#3

Michelle - March 23, 2009 - 15:15

I don't use that module and it's not something I'll have time to look at any time soon.

Michelle

#4

-Shaman- - March 23, 2009 - 20:58

That's shame, because those both modules together would make a killer forum. I'm gonna try play around this, could You tell perhaps why this could be that reply works, but delete isn't? Ajax comments is using token during delete operation, maybe here's the problem, that it's lost on the way thru advanced_forum?

#5

Michelle - March 23, 2009 - 21:04

AF doesn't do anything special on add/edit/delete so I really have no idea.

Michelle

#6

-Shaman- - March 23, 2009 - 21:38

Well I'll be trying do something about this then though I'm nobody's programmer :P

#7

Michelle - March 23, 2009 - 21:48

Well, if you get it figured out, feel free to report back here. I'll look at it when I work on 2.x.

Michelle

#8

-Shaman- - March 24, 2009 - 19:36

I found this in ajax_comments read me

2. If you have themed your comments output, make sure that everything is wrapped to ".comment" class
in your "comment.tpl.php"

Comments doesn't works because advanced forums comment template is different and there's no "div class comment".

#9

Michelle - March 24, 2009 - 22:16

Ah, well, there you go, then. Sounds like you just need to add that.

Michelle

#10

-Shaman- - March 26, 2009 - 15:26

Hi
Well it's not exactly comment class issue, because I replaced advf-forum-post.tpl.php with Drupal's default comment.tpl.php and comments still can't be deleted, they are only "fading away" but are not actually deleted, to be able to delete comments, I must disable comment theming (commenting lines) in advanced_forum.module, so it must be something in module's code, which collide with ajax_comment delete function.

#11

-Shaman- - March 27, 2009 - 20:29

Hi
I fixed this by commenting this code in advanced_forum.module (function advanced_forum_preprocess_comment, lines 461-512):

<?php
   
if (arg(1) != 'reply') {
     
// Because the $links array isn't available here, we recreate it
     
$node = node_load($variables['comment']->nid);
     
$links = module_invoke_all('link', 'comment', $variables['comment']);
     
drupal_alter('link', $links, $node);
      unset(
$links['comment_parent']);

     
// Iconify common links (optional to avoid translation issues)
     
_advanced_forum_buttonify_links($links);

     
// Remake the links with our changes
     
$variables['links'] = theme('links', $links, array('class' => 'links forum-links'));
     
$variables['links_array'] = $links;
    }

   
// Since we have to load the node anyway for our links trick, make it avail
   
$variables['node'] = $node;
?>

and replacing this:

<?php else: ?>
  <?php $classes .= $comment_classes; ?>
  <div id="comment-<?php print $comment->cid; ?>" class="forum-post <?php print $classes; ?> clear-block">
<?php endif; ?>

with the code below, in adfv-forum-post.tpl.php (lines 31-34):

<?php else: ?>
  <div class="comment">
<?php endif; ?>

#12

Michelle - March 27, 2009 - 21:22

Well, glad you got it working but you're cutting out a large chunk of functionality to do it. Not something I recommend for users in general but great if you're happy with it. :)

Michelle

#13

-Shaman- - March 28, 2009 - 19:14

Well I know it's probably not the best way to do it, but I couldn't make this working in any other way. Perhaps when You'll be working on version 2.x of the module You gonna find some better solution (I'm sure You will ;-).

#14

Michelle - March 29, 2009 - 02:20

Hopefully. We'll see when I get that far. :)

Michelle

#15

robertdjung - April 1, 2009 - 02:18

subscribe. might give this idea some time.

#16

Michelle - May 7, 2009 - 02:45
Version:6.x-1.x-dev» 6.x-2.x-dev
Category:task» feature request
Status:postponed» active

#17

Ingumsky - June 7, 2009 - 14:01

Subscribe...

#18

tallsimon - August 21, 2009 - 14:57

i'd love to see this too, have had to turn off ajax comments for the forums :-(

#19

Michelle - August 21, 2009 - 15:10

This is not likely to get into 2.x unless someone writes a patch or an add-on to nodecomment. While 2.x will still work with normal comments, I, personally, will be using nodecomment and that's what gets my attention.

Michelle

#20

apanag - August 26, 2009 - 11:39

I am going to look into this, at my free hours. I ll post later a few details about how i am going to develop it.

apanag

#21

Michelle - August 26, 2009 - 16:58

@apanag: Thanks. :)

Michelle

#22

apanag - August 29, 2009 - 17:46

Michelle,

nodecomment is going to be the default comment system in the advanced_forum2? Or is it going to be a plugin and the user will be able to choose either default drupal comment system or nodecomment?

apanag

#23

Michelle - August 29, 2009 - 18:03

It's optional but my focus is on nodecomment. AF will continue to work with comment but not all the features will.

Michelle

#24

apanag - August 29, 2009 - 18:09

I see.
So i think the best solution is to develop a plugin for nodecomment as you suggested on post #19.

apanag

#25

Roavei - September 28, 2009 - 14:43

subscribe...

#26

Drake - October 2, 2009 - 13:15

I have noticed that if Ajax Comments are enabled for forum topic, the "delete" button use the link for example:
.../comment/delete/?token=0519dc......

and this does not work becasue the comment ID is not included before ?

if I use the link
.../comment/delete/75?token=0519dc (75 states for comment ID) then the delete function works properly also in conetion with Ajax Comments...

So to solve this issue we will have to include the NID before ?

but how???

#27

Ingumsky - October 3, 2009 - 14:51

Yep, that's the same for me. It has been mentioned in other AF-related thread that this issue wouldn't be solved by Michelle but workaround was found by another user.

#28

Alex72RM - November 5, 2009 - 09:28
Project:Advanced Forum» AJAX Comments
Version:6.x-2.x-dev» 6.x-1.8
Component:User interface» Code
Category:feature request» bug report

Hi,

@#26... the problem is then with AJAX comments module integration. It isn't a problem strictly concerning advanced forum.

In fact, when I disable AJAX comments, all come back to work as desired.

 
 

Drupal is a registered trademark of Dries Buytaert.