Keyword

Commenting on K2 blog using only social account

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 4 months ago #113428 by Yiota
Try this item.php

Attachment not found

Attachments:

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

  • Filip Nikitovic
  • Filip Nikitovic's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 4 months ago - 11 years 4 months ago #113429 by Filip Nikitovic
Replied by Filip Nikitovic on topic Re: Commenting on K2 blog using only social account
Sorry, I wasnt able to see Your comment until I tryed to comment again.

Thank You for trying to help.

When I use four item.php I do get facebook comment box at the end of page.
I can comment using my facebook account but when i refresh page comment disapear but I can see that comment on my facebook profile.

So I tryed commenting using Yahoo account and refreshing page, and comment stay on page but when I click on pen icon at the right top side of comment box (where edit and delete options are)

Attachment not found


and I click on edit and facebook login box is showed,see bellow

Attachment not found


but comment is made with Yahoo and Im still loged in Yahoo(if that is important for You to know).

Another problem is when I click on pen icon at the right top side of comment box and click delete that comment made with Yahoo,I get facebook message,like on this image

Attachment not found


Its importand to know that at this point Im loged out of Facebook,Yahoo and Joomla and still I can delete comment so if I can delete it the I belive anyone can delete comments on my page.
Attachments:

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 4 months ago #113430 by Yiota
Try the following facebook block to the item.php
<div class="fb-comments" data-href="<?php echo $this->item->link; ?>" data-width="470" data-num-posts="10"></div>

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

  • Filip Nikitovic
  • Filip Nikitovic's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 4 months ago #113431 by Filip Nikitovic
Replied by Filip Nikitovic on topic Re: Commenting on K2 blog using only social account
I would appreciate if You could tell me where to inesrt code exactly
<a name="itemCommentsAnchor" id="itemCommentsAnchor"></a>
   
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
     <div class="fb-comments" data-href="http://www.vienna-airport-cab.at/" data-width="470" data-num-posts="10"></div>
 <?php endif; ?> 
  
        <?php if(!JRequest::getCmd('print')): ?>
        <div class="itemBackToTop">
                <a class="k2Anchor" href="<?php echo $this->item->link; ?>#startOfPageId<?php echo JRequest::getInt('id'); ?>">
                        <?php echo JText::_('K2_BACK_TO_TOP'); ?>
                </a>
        </div>
        <?php endif; ?>

        <div class="clr"></div>
</div>

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 4 months ago #113432 by Yiota
You just need to replace the existing div in the code you pasted above with the one I'm resending you here: (it has a slight change)
<div class="fb-comments" data-href="<?php echo $this->item->absoluteURL; ?>" data-width="470" data-num-posts="10"></div>

Please, if you are not familiar with php you should consider hiring someone that does.

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

  • Filip Nikitovic
  • Filip Nikitovic's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 4 months ago - 11 years 4 months ago #113433 by Filip Nikitovic
Replied by Filip Nikitovic on topic Re: Commenting on K2 blog using only social account
I changed that line as You instructed
<!-- Item comments -->
    <a name="itemCommentsAnchor" id="itemCommentsAnchor"></a>
   
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
     <div class="fb-comments" data-href="<?php echo $this->item->absoluteURL; ?>" data-width="470" data-num-posts="10"></div>
 <?php endif; ?>

And now when I click on comment nothing happens.

Please, if you are not familiar with php you should consider hiring someone that does


Well Ive done everything You said to do, and Yes I asked You to be direct when explaining and I appreciate that very much.
I gave up on using facebook as comment box few days ago but I continued on trying and doing everything You say becouse of other users,mybe this can help someone in future, and becouse I respect You and Your time trying to help me.
For more complicated stuff I would have to hire php professional.
Regards,
Filip Nikitovic

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 4 months ago #113434 by Yiota
Please, don't get this the wrong way. I only try to help you. There is nothing wrong with consulting a more experienced developer to solve your problem.

Anyhow. I tried the code myself and the facebook comments mechanism is working just fine. Would you like to resent me your item.php page to test it as well?

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

  • Filip Nikitovic
  • Filip Nikitovic's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 4 months ago - 11 years 4 months ago #113435 by Filip Nikitovic
Replied by Filip Nikitovic on topic Re: Commenting on K2 blog using only social account
I have to admit that Your last message did sound like I bored You enough.
No problem, everything is cool.

There is nothing wrong with consulting a more experienced developer to solve your problem.

I cant afford that at this moment.

Anyhow. I tried the code myself and the facebook comments mechanism is working just fine.

I read somewhere that K2 wont work with some templates.
Im using Kotoba template by Joomla Direct.

Would you like to resent me your item.php page to test it as well?

Im testing everything on localhost becouse my site www.vienna-airport-cab.at/
is for taxi company and we have our cutomers using order form everyday so if something go wrong on localhost there is no damage.

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


Powered by Kunena Forum