- Posts: 11
COMMUNITY FORUM
JomComment? Jomsocial too
- rootlock
-
Topic Author
- Offline
- New Member
I'm wondering if there is a way to use JomComment by azrul? I'm using Jomsocial and Jomcomment and would really like to use the same comment system all around my site, especially because Jomsocial's Jomcomment plugin posts latest comments to each user profile. Is this possible
While I'm at it, I would also like K2 articles to post to the Jomsocial activity page as well. I'll be doing some more research at the Jomsocial forum but any suggestions or references would be appreciated!
Thanks!
Brad
Please Log in or Create an account to join the conversation.
- Shane Hubert
-
- Offline
- New Member
- Posts: 4
Please Log in or Create an account to join the conversation.
- Xcantion
-
- Offline
- Junior Member
- Posts: 32
Please Log in or Create an account to join the conversation.
- Markus
-
- Visitor
open: joomlaroot/components/com_k2/templates/default/item.php
comment out Lines 457-522
paste this in Line 456:
include_once( JPATH_PLUGINS . DS . 'content' . DS . 'jom_comment_bot.php' );
echo jomcomment($this->item->id, "com_k2");
Not testet!!! MAKE A BACKUP
Please Log in or Create an account to join the conversation.
- Xcantion
-
- Offline
- Junior Member
- Posts: 32
i have edit this file.. but the standart comment form pops up... no jomcomment
Please Log in or Create an account to join the conversation.
- Xcantion
-
- Offline
- Junior Member
- Posts: 32
i have edit the file:
/var/www/vhosts/cyber/web/components/com_k2/views/item/view.html.php
and i have comment out this section:
//Comments
if ($item->params->get('itemComments')){
$limit=$params->get('commentsLimit');
$comments=$model->getItemComments($item->id,$limitstart, $limit);
for ($i=0; $i
$comments[$i]->userImage='';
if ($comments[$i]->userID > 0){
$profile=$model->getUserProfile($comments[$i]->userID);
if ($profile->image){
$comments[$i]->userImage=JURI::root().'media/k2/users/'.$profile->image;
}
else{
if ($params->get('userImageDefault')){
$comments[$i]->userImage = JURI::root().'media/k2/users/default.jpg';
}
}
}
else {
if ($params->get('gravatar')){
$comments[$i]->userImage='http://www.gravatar.com/avatar/'.md5($comments[$i]->commentEmail).'?s='.$params->get('commenterImgWidth').'&default='.urlencode(JURI::root().'media/k2/users/default.jpg');
}
else {
if ($params->get('userImageDefault')){
$comments[$i]->userImage = JURI::root().'media/k2/users/default.jpg';
}
}
}
}
$item->comments= $comments;
jimport('joomla.html.pagination');
$total = $item->numOfComments;
$pagination = new JPagination($total, $limitstart, $limit);
}
that means jomcomment can be integrated with no problem ... bzt my problem is.. i am not a php coder... maybe someone can help a bit ... !?
Please Log in or Create an account to join the conversation.
- Xcantion
-
- Offline
- Junior Member
- Posts: 32
Please Log in or Create an account to join the conversation.
- rootlock
-
Topic Author
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Xcantion
-
- Offline
- Junior Member
- Posts: 32
Jommcomment workx now!!!
But i have one question...
accept terms doesnt work... if i click for submission .... jomcomment mean everytime.... pls accept terms & rules... but i have accept this already...
now i must deactivate terms & rules ... or jomcomment will not work...
maybe someone has a hint for this little problem
Please Log in or Create an account to join the conversation.
- rootlock
-
Topic Author
- Offline
- New Member
- Posts: 11
Is there anyway either of you could give me a copy of the last part of the code? I'm not sure what "comment out means"? I've removed it and pasted the code but I'm not getting good results...
FYI : I am using Affinity
Thanks again
Please Log in or Create an account to join the conversation.
- Craig Berry
-
- Offline
- New Member
- Posts: 4
Thanks a ton for the the Affinity hack. Worked like a charm...jomcomment integration is working.
Do you know where I can pull out the 'be first to comment' line. Since it doesn't work with this workaround, I'd rather it not appear.
Thanks!
Craig
UPDATE: Found it! in item.php, I just removed the entire tag (which contains the php echo 'be the first to comment'). Of course, not before backing up the file!
Dave Marshall said:Hi Jennifer, As I stated above,
"There is one drawback to this, you will not be able to use the Comment Anchor for K2 and the K2 modules will not show the Latest Comments from Jom Comment but at least you will have one commenting system across your site. I am not a programmer so this will have to be left up to someone else. I have attached the file so that you may just upload it and overwrite the above mentioned files."
This means you will not be able to use the "be the first to comment anchor" you will need to disable these in the K2 Settings and Category Settings.
Did you add the code to the:
"components/com_k2/templates/default/item_comments_form.php"
or the
"templates/rt_affinity_j15/html/com_k2/templates/default/item_comments_form.php" ?
if you are using Affinity you need to use the later.
Have you set the K2 Parameters "Global setting for comments" to either:
"Enabled to Everyone"
or
"Enabled for rgistered users only"?
Have you cleared the Joomla and your Browser cache? If you are using the Joomla Cache take note that it is very agressive and any changes in K2 will not be shown unless you clear it.
Jennifer said:Hey, I did exactly what you said (I have affinity) and I can not see the commenting form at all. When I click on "be the first to comment" it takes me to the bottom of the screen and there is not commenting form. What could I be doing wrong?
Dave Marshall said:Hi again, The forum did not seem to accept the code I pasted but you can get it from the attached file.
Please Log in or Create an account to join the conversation.
- Arnold Wender
-
- Offline
- New Member
For those of you using the Rocket Theme Affinity template you will need to edit the:
templates/rt_affinity_j15/html/com_k2/templates/default/item_comments_form.php
Now delete everything in the file and replace it with the following code:
[code]
[code]
There is one drawback to this, you will not be able to use the Comment Anchor for K2 and the K2 modules will not show the Latest Comments from Jom Comment but at least you will have one commenting system across your site. I am not a programmer so this will have to be left up to someone else. I have attached the file so that you may just upload it and overwrite the above mentioned files.
PLEASE MAKE A BACKUP FIRST!!!
Hope this helps you all.
Cheers
Dave
Hello Mr Marshall, It works for me, now I´m tryng to modify the file helper.php from the module mod_jomlatest... to show the latest comments, wish me luck :D
Please Log in or Create an account to join the conversation.
- Arnold Wender
-
- Offline
- New Member
///Integramos K2
else if( $row->option == 'com_k2')
{
$query = "SELECT title FROM #__k2_items WHERE id='{$row->contentid}'";
$db->setQuery($query);
$title = $db->loadResult();
$link = JRoute::_( 'index.php?option=com_k2&view=item&id=' . $row->contentid );
}
///
Example: www.joomlamania.org/index.php?option=com_k2&view=item&id=94:ver-posici%C3%B3nes-de-modulos-en-tu-template-en-joomla
cheers
Please Log in or Create an account to join the conversation.
- nano02
-
- Offline
- Senior Member
- Posts: 52
Please Log in or Create an account to join the conversation.
- Arnold Wender
-
- Offline
- New Member
Hello,
I placed that code snippet in the default JomComment module mod_jomlatest
I attach the modified file (helper.php) upload this to modules/mod_jomlatest/ and replace the existing one, backup your original file!
I hope this help you.
Arnold
Please Log in or Create an account to join the conversation.
- nano02
-
- Offline
- Senior Member
- Posts: 52
Please Log in or Create an account to join the conversation.
- Different Color
-
- Offline
- Premium Member
- Posts: 99
ALSO - is it possible to 'migrate' my old Joomla Article comments to the new K2 Items that I converted? I'm thinking if I did it, it would have to manually... which sucks.
Martha
Please Log in or Create an account to join the conversation.
- stavroch
-
- Offline
- Elite Member
- Posts: 295
Please Log in or Create an account to join the conversation.
- stavroch
-
- Offline
- Elite Member
- Posts: 295
I am using K2 v2.2 and I can't see the code that you describe on the view.html.php. How can I integrate JomComment with K2 v2.2?
topmaniac said:Hello i have found a "half solution"
i have edit the file:
/var/www/vhosts/cyber/web/components/com_k2/views/item/view.html.php
and i have comment out this section:
<br/>
//Comments<br/>
if ($item->params->get('itemComments')){<br/>
<br/>
$limit=$params->get('commentsLimit');<br/>
$comments=$model->getItemComments($item->id,$limitstart, $limit);<br/>
<br/>
for ($i=0; $i<br/>
<br/>
$comments[$i]->userImage='';<br/>
<br/>
if ($comments[$i]->userID > 0){<br/>
<br/>
$profile=$model->getUserProfile($comments[$i]->userID);<br/>
<br/>
if ($profile->image){<br/>
$comments[$i]->userImage=JURI::root().'media/k2/users/'.$profile->image;<br/>
}<br/>
else{<br/>
if ($params->get('userImageDefault')){<br/>
$comments[$i]->userImage = JURI::root().'media/k2/users/default.jpg';<br/>
}<br/>
}<br/>
<br/>
}<br/>
else {<br/>
<br/>
if ($params->get('gravatar')){<br/>
$comments[$i]->userImage='http://www.gravatar.com/avatar/'.md5($comments[$i]->commentEmail).'?s='.$params->get('commenterImgWidth').'&default='.urlencode(JURI::root().'media/k2/users/default.jpg');<br/>
}<br/>
<br/>
else {<br/>
if ($params->get('userImageDefault')){<br/>
$comments[$i]->userImage = JURI::root().'media/k2/users/default.jpg';<br/>
}<br/>
}<br/>
<br/>
}<br/>
<br/>
}<br/>
<br/>
$item->comments= $comments;<br/>
<br/>
jimport('joomla.html.pagination');<br/>
$total = $item->numOfComments;<br/>
$pagination = new JPagination($total, $limitstart, $limit);<br/>
<br/>
}<br/>
that means jomcomment can be integrated with no problem ... bzt my problem is.. i am not a php coder... maybe someone can help a bit ... !?
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Chances are, you wont see this as you would most likely be using a newer version.
Luckily, I have a JomComment plugin for K2, see the attached.
Simon
K2 Support
Stavros said:Hy topmaniac,
I am using K2 v2.2 and I can't see the code that you describe on the view.html.php. How can I integrate JomComment with K2 v2.2?
topmaniac said:Hello i have found a "half solution" i have edit the file:
/var/www/vhosts/cyber/web/components/com_k2/views/item/view.html.php
and i have comment out this section:
<br/>
//Comments<br/>
if ($item->params->get('itemComments')){<br/>
<br/>
$limit=$params->get('commentsLimit');<br/>
$comments=$model->getItemComments($item->id,$limitstart, $limit);<br/>
<br/>
for ($i=0; $i<br/>
<br/>
$comments[$i]->userImage='';<br/>
<br/>
if ($comments[$i]->userID > 0){<br/>
<br/>
$profile=$model->getUserProfile($comments[$i]->userID);<br/>
<br/>
if ($profile->image){<br/>
$comments[$i]->userImage=JURI::root().'media/k2/users/'.$profile->image;<br/>
}<br/>
else{<br/>
if ($params->get('userImageDefault')){<br/>
$comments[$i]->userImage = JURI::root().'media/k2/users/default.jpg';<br/>
}<br/>
}<br/>
<br/>
}<br/>
else {<br/>
<br/>
if ($params->get('gravatar')){<br/>
$comments[$i]->userImage='http://www.gravatar.com/avatar/'.md5($comments[$i]->commentEmail).'?s='.$params->get('commenterImgWidth').'&default='.urlencode(JURI::root().'media/k2/users/default.jpg');<br/>
}<br/>
<br/>
else {<br/>
if ($params->get('userImageDefault')){<br/>
$comments[$i]->userImage = JURI::root().'media/k2/users/default.jpg';<br/>
}<br/>
}<br/>
<br/>
}<br/>
<br/>
}<br/>
<br/>
$item->comments= $comments;<br/>
<br/>
jimport('joomla.html.pagination');<br/>
$total = $item->numOfComments;<br/>
$pagination = new JPagination($total, $limitstart, $limit);<br/>
<br/>
}<br/>
that means jomcomment can be integrated with no problem ... bzt my problem is.. i am not a php coder... maybe someone can help a bit ... !?
Please Log in or Create an account to join the conversation.