Keyword

JomComment? Jomsocial too

  • rootlock
  • rootlock's Avatar Topic Author
  • Offline
  • New Member
More
15 years 9 months ago #68563 by rootlock
JomComment? Jomsocial too was created by rootlock
Hi, I love this extension. Seriously

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.

More
15 years 9 months ago #68564 by Shane Hubert
Replied by Shane Hubert on topic JomComment? Jomsocial too
I will second this as I am in the same boat and would like to use one commenting system to make this a little easyer

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

More
15 years 9 months ago #68565 by Xcantion
Replied by Xcantion on topic JomComment? Jomsocial too
i want to have jommcomment integration too.. i love this comment system

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

  • Markus
  • Markus's Avatar
  • Visitor
15 years 9 months ago #68566 by Markus
Replied by Markus on topic JomComment? Jomsocial too
Hi,

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.

More
15 years 9 months ago #68567 by Xcantion
Replied by Xcantion on topic JomComment? Jomsocial too
i think there must be some more edits because:

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.

More
15 years 9 months ago #68568 by Xcantion
Replied by Xcantion on topic JomComment? Jomsocial too
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:
//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);

}
and have paste youre code ... but now i have to comments form :P
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.

More
15 years 9 months ago #68569 by Xcantion
Replied by Xcantion on topic JomComment? Jomsocial too
any solution

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

  • rootlock
  • rootlock's Avatar Topic Author
  • Offline
  • New Member
More
15 years 9 months ago #68570 by rootlock
Replied by rootlock on topic JomComment? Jomsocial too
I have the same problem.... not a coder.

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

More
15 years 9 months ago #68571 by Xcantion
Replied by Xcantion on topic JomComment? Jomsocial too
Hello!! Thanks for this hint ...
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
  • rootlock's Avatar Topic Author
  • Offline
  • New Member
More
15 years 9 months ago #68572 by rootlock
Replied by rootlock on topic JomComment? Jomsocial too
I totally appreciate the work you both have done!!! I was starting to give up hope :)

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.

More
15 years 7 months ago #68573 by Craig Berry
Replied by Craig Berry on topic JomComment? Jomsocial too
Hi Dave,
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.

More
15 years 5 months ago #68574 by Arnold Wender
Replied by Arnold Wender on topic JomComment? Jomsocial too
Dave Marshall said:Hi all, I have been doing some testing on this. The easiest way I have found to add Jom Comment to K2 is to edit: components/com_k2/templates/default/item_comments_form.php
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.

More
15 years 5 months ago #68575 by Arnold Wender
Replied by Arnold Wender on topic JomComment? Jomsocial too
Now I can show the latest comments using the default JomComment Module (mod_jomlatest) just add this code to helper.php

///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.

More
15 years 5 months ago #68576 by nano02
Replied by nano02 on topic JomComment? Jomsocial too
Sorry my stupidity but I can not integrate my programming skills are too low, you show me exactly where to place this code?, Thanks

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

More
15 years 5 months ago #68577 by Arnold Wender
Replied by Arnold Wender on topic JomComment? Jomsocial too
nano02 said:Sorry my stupidity but I can not integrate my programming skills are too low, you show me exactly where to place this code?, Thanks


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.

More
15 years 5 months ago #68578 by nano02
Replied by nano02 on topic JomComment? Jomsocial too
THANK YOU, very much

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

  • Different Color
  • Different Color's Avatar
  • Offline
  • Premium Member
More
15 years 4 months ago #68579 by Different Color
Replied by Different Color on topic JomComment? Jomsocial too
I followed Dave's suggestions to replace the K2 comment template with the code he provided. However - when I fill in my comments and select ADD COMMENT, nothing happens... it just sits there! Do I need to change code somewhere else also?

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.

More
14 years 10 months ago #68580 by stavroch
Replied by stavroch on topic JomComment? Jomsocial too
I just upload the "item_comments_form.php" to the "components/com_k2/templates/default/item_comments_form.php" But on the K2 item I can't see the jomcomment component.

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

More
14 years 10 months ago #68581 by stavroch
Replied by stavroch on topic JomComment? Jomsocial too
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-&gt;params-&gt;get('itemComments')){<br/>
<br/>
$limit=$params-&gt;get('commentsLimit');<br/>
$comments=$model-&gt;getItemComments($item-&gt;id,$limitstart, $limit);<br/>
<br/>
for ($i=0; $i<br/>
<br/>
$comments[$i]-&gt;userImage='';<br/>
<br/>
if ($comments[$i]-&gt;userID &gt; 0){<br/>
<br/>
$profile=$model-&gt;getUserProfile($comments[$i]-&gt;userID);<br/>
<br/>
if ($profile-&gt;image){<br/>
$comments[$i]-&gt;userImage=JURI::root().'media/k2/users/'.$profile-&gt;image;<br/>
}<br/>
else{<br/>
if ($params-&gt;get('userImageDefault')){<br/>
$comments[$i]-&gt;userImage = JURI::root().'media/k2/users/default.jpg';<br/>
}<br/>
}<br/>
<br/>
}<br/>
else {<br/>
<br/>
if ($params-&gt;get('gravatar')){<br/>
$comments[$i]-&gt;userImage='http://www.gravatar.com/avatar/'.md5($comments[$i]-&gt;commentEmail).'?s='.$params-&gt;get('commenterImgWidth').'&amp;default='.urlencode(JURI::root().'media/k2/users/default.jpg');<br/>
}<br/>
<br/>
else {<br/>
if ($params-&gt;get('userImageDefault')){<br/>
$comments[$i]-&gt;userImage = JURI::root().'media/k2/users/default.jpg';<br/>
}<br/>
}<br/>
<br/>
}<br/>
<br/>
}<br/>
<br/>
$item-&gt;comments= $comments;<br/>
<br/>
jimport('joomla.html.pagination');<br/>
$total = $item-&gt;numOfComments;<br/>
$pagination = new JPagination($total, $limitstart, $limit);<br/>
<br/>
}<br/>
and have paste youre code ... but now i have to comments form :P
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.

More
14 years 10 months ago #68582 by Simon Wells
Replied by Simon Wells on topic JomComment? Jomsocial too
Stavros,

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-&gt;params-&gt;get('itemComments')){<br/>
<br/>
$limit=$params-&gt;get('commentsLimit');<br/>
$comments=$model-&gt;getItemComments($item-&gt;id,$limitstart, $limit);<br/>
<br/>
for ($i=0; $i<br/>
<br/>
$comments[$i]-&gt;userImage='';<br/>
<br/>
if ($comments[$i]-&gt;userID &gt; 0){<br/>
<br/>
$profile=$model-&gt;getUserProfile($comments[$i]-&gt;userID);<br/>
<br/>
if ($profile-&gt;image){<br/>
$comments[$i]-&gt;userImage=JURI::root().'media/k2/users/'.$profile-&gt;image;<br/>
}<br/>
else{<br/>
if ($params-&gt;get('userImageDefault')){<br/>
$comments[$i]-&gt;userImage = JURI::root().'media/k2/users/default.jpg';<br/>
}<br/>
}<br/>
<br/>
}<br/>
else {<br/>
<br/>
if ($params-&gt;get('gravatar')){<br/>
$comments[$i]-&gt;userImage='http://www.gravatar.com/avatar/'.md5($comments[$i]-&gt;commentEmail).'?s='.$params-&gt;get('commenterImgWidth').'&amp;default='.urlencode(JURI::root().'media/k2/users/default.jpg');<br/>
}<br/>
<br/>
else {<br/>
if ($params-&gt;get('userImageDefault')){<br/>
$comments[$i]-&gt;userImage = JURI::root().'media/k2/users/default.jpg';<br/>
}<br/>
}<br/>
<br/>
}<br/>
<br/>
}<br/>
<br/>
$item-&gt;comments= $comments;<br/>
<br/>
jimport('joomla.html.pagination');<br/>
$total = $item-&gt;numOfComments;<br/>
$pagination = new JPagination($total, $limitstart, $limit);<br/>
<br/>
}<br/>
and have paste youre code ... but now i have to comments form :P
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 ... !?
Attachments:

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


Powered by Kunena Forum