- Posts: 8
COMMUNITY FORUM
Comments on category view
- Raphael Aretakis
- Topic Author
- Offline
- New Member
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.
- william white
- Offline
- Platinum Member
- Posts: 3722
You may have to set a variable so it acts correctly
Please Log in or Create an account to join the conversation.
- Raphael Aretakis
- Topic Author
- Offline
- New Member
- Posts: 8
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
- Topic Author
- Offline
- New Member
- Posts: 8
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...
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
- Posts: 3722
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
- Topic Author
- Offline
- New Member
- Posts: 8
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!
Please Log in or Create an account to join the conversation.
- Raphael Aretakis
- Topic Author
- Offline
- New Member
- Posts: 8
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
- Topic Author
- Offline
- New Member
- Posts: 8
Please Log in or Create an account to join the conversation.
- Raphael Aretakis
- Topic Author
- Offline
- New Member
- Posts: 8
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.
- Jakub Jedynak
- Offline
- Senior Member
- Posts: 56
Please Log in or Create an account to join the conversation.