Keyword

Comments on category view

  • Raphael Aretakis
  • Raphael Aretakis's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago - 12 years 7 months ago #62736 by Raphael Aretakis
Comments on category view was created by Raphael Aretakis
Hi there,

I want to have 5 articles of the same category the one next to the other and the user will be able to post comments directly from the category view.

You can see what i've done so far here 46.4.215.43/~bproject/

So far I managed to comment out the comment fields I dont want, and call the comment form at the category_item.php page by using the following:

<div class="itemCommentsForm">
<?php echo $this->loadTemplate('comments_form'); ?>
</div>

Everything looks fine, but I have a problem. When I post to the first item (King's Cross) the auto refresh and everything works fine and everything, but the comment is posted on the item with id=1 (in this case called Westminster).

If I try to post to another item I get this error: {"_errors":[],"message":"Comment added! Refreshing page...","refresh":1}

Can you give me any suggestions please??

I use joomla 1.5.25 and k2 2.5.4 with the default joomla template.

P.S: the Comments will be displayed below via a module.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #62737 by william white
Replied by william white on topic Re: Comments on category view
there is a lot of code in the comments section of item.php, be sure to include the entire logic.
You may have to set a variable so it acts correctly

Please Log in or Create an account to join the conversation.

  • Raphael Aretakis
  • Raphael Aretakis's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62738 by Raphael Aretakis
Replied by Raphael Aretakis on topic Re: Comments on category view

William White wrote: there is a lot of code in the comments section of item.php, be sure to include the entire logic.
You may have to set a variable so it acts correctly


What do you mean set up a variable? I dont know how to do that... could you help me out William?

Please Log in or Create an account to join the conversation.

  • Raphael Aretakis
  • Raphael Aretakis's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago - 12 years 7 months ago #62739 by Raphael Aretakis
Replied by Raphael Aretakis on topic Re: Comments on category view

William White wrote: there is a lot of code in the comments section of item.php, be sure to include the entire logic.
You may have to set a variable so it acts correctly


I tried including the whole comment code of the item.php file but now I get an error which you can see here 46.4.215.43/~bproject/ .

I have included a zip with the category_item.php file that I use. Could you see it and help me to pull this off please? Because I really dont know how to use a variable like you said in order to make it work...
Attachments:

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago - 12 years 7 months ago #62740 by william white
Replied by william white on topic Re: Comments on category view
I took a look on a fresh install and included your file in my override. It seems that are several errors. I will give it a go from scratch later when i have time.
ooops, i insalled it on 2.5.1j and k2 2.5.4 and the template files are different. have to create another test platform, ill get back to you

Please Log in or Create an account to join the conversation.

  • Raphael Aretakis
  • Raphael Aretakis's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62741 by Raphael Aretakis
Replied by Raphael Aretakis on topic Re: Comments on category view

William White wrote: I took a look on a fresh install and included your file in my override. It seems that are several errors. I will give it a go from scratch later when i have time.
ooops, i insalled it on 2.5.1j and k2 2.5.4 and the template files are different. have to create another test platform, ill get back to you


Thanks a lot William... I'm at the edge of my seat for your reply...
In order for the form to work I made a new file called category_comments_form.php (which is actually the same as item_comments_form.php but with different name) and I include that too so you can get to see it.

I have to present this project to a colleague next Monday so I hope it can be done by then. If you want I can PM you ftp settings to work online. Let me know on that!
Attachments:

Please Log in or Create an account to join the conversation.

  • Raphael Aretakis
  • Raphael Aretakis's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62742 by Raphael Aretakis
Replied by Raphael Aretakis on topic Re: Comments on category view
I even tried to use the exact code of the item.php in the category_items.php file and it doesnt work at all... I get the same errors as before...


William White wrote: I took a look on a fresh install and included your file in my override. It seems that are several errors. I will give it a go from scratch later when i have time.
ooops, i insalled it on 2.5.1j and k2 2.5.4 and the template files are different. have to create another test platform, ill get back to you

Please Log in or Create an account to join the conversation.

  • Raphael Aretakis
  • Raphael Aretakis's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62743 by Raphael Aretakis
Replied by Raphael Aretakis on topic Re: Comments on category view
Maybe its a jquery conflict or something...

Please Log in or Create an account to join the conversation.

  • Raphael Aretakis
  • Raphael Aretakis's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62744 by Raphael Aretakis
Replied by Raphael Aretakis on topic Re: Comments on category view
Hey William, did you get to find anything?? Or if this cannot work can I get an alternative to do this?

William White wrote: I took a look on a fresh install and included your file in my override. It seems that are several errors. I will give it a go from scratch later when i have time.
ooops, i insalled it on 2.5.1j and k2 2.5.4 and the template files are different. have to create another test platform, ill get back to you

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #62745 by Jakub Jedynak
Replied by Jakub Jedynak on topic Re: Comments on category view
I'm not sure if you can do this with K2 comments. I suspect that comment form takes article id to assign comment to it, and in category layout you don't have ONE article but many so it's causes a problem.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum