| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 9168|Reply: 7
Collapse the left

"Facebook Comment" Function

[Copy link]
Post time: 2012-11-15 11:20
| Show all posts |Read mode
Edited by hello_world at 2012-11-16 11:28

Hi all,

Just wondering if anyone know how to add "Facebook Comment" function in DiscuzX 2.0
Mulitple Language version. (ie. Add facebook comment option on the first post of a thread.)
I got a viewthread_node.html  from the following link but problem occur after installing. (see image below)
Anyone know alternative way to do it?
Many thanks.
http://www.msg2me.com/forum.php?mod=viewthread&tid=5591&highlight=facebook%2Bcomment






This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x
Post time: 2012-11-16 00:17
| Show all posts
Editado por jhoxi en 2012-11-16 01:21

upload viewthread_node to template/forum/default/forum replace

clean cache

Ready!
 Author| Post time: 2012-11-16 01:57
| Show all posts
Edited by hello_world at 2012-11-16 02:59

Hi jhoxi and ohters,

I did exactly the same thing as you mentioned.
The "facebook comment" box did not appear in all the thread.
For those it appear, it comes with the error message that I shown above.
Anyone can give some help? Thanks so much.
Anyone have othe file that I can try apart from the one that I got from
the following link?
http://www.msg2me.com/forum.php?mod=viewthread&tid=5591&highlight=facebook%2Bcomment





This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

 Russia

Post time: 2012-11-16 12:25
| Show all posts
I have added this functionality into x2ML.
See rev.#401.

Facebook Comments block added into the first thread post.
For enable this feature you have to add a new setting into your database:
INSERT INTO `pre_common_setting` (`skey`, `svalue`) VALUES ('facebook_comment', '1');
Post time: 2012-11-16 18:36
| Show all posts
Edited by kaaleth at 2012-11-16 20:03

Nice. I tested this same plugin and this is my "vision":

1. Go to template\default\common\header.htm
2. Find (#34 line):

  1. <body id="nv_{$_G[basescript]}" class="pg_{CURMODULE}{if $_G['basescript'] === 'portal' && CURMODULE === 'list' && !empty($cat)} {$cat['bodycss']}{/if}" onkeydown="if(event.keyCode==27) return false;">
Copy the Code
After this, add:
  1. <!-- facebook comment -->
  2. <div id="fb-root"></div>
  3. <script>(function(d, s, id) {
  4.   var js, fjs = d.getElementsByTagName(s)[0];
  5.   if (d.getElementById(id)) return;
  6.   js = d.createElement(s); js.id = id;
  7.   js.src = "//connect.facebook.net/pl_PL/all.js#xfbml=1";
  8.   fjs.parentNode.insertBefore(js, fjs);
  9. }(document, 'script', 'facebook-jssdk'));</script>
  10. <!-- /facebook comment -->
Copy the Code
3. Save and clear template cache.4. Go to Extensions -> Site Advertising -> and choose one option (for example Forum/Group interthread)
5. Add new adv type and fill fields like you want.
6. For last field named as "code" add:
  1. <div class="fb-comments" data-href="http://localhost/dx25" data-num-posts="2" data-width="700"></div>
Copy the Code


Replace http://localhost/dx25 as your site and thats all! Additionality you can modyfiy width of div. If you want to get own code, go to facebook developer section.
Demo:

This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x
 Author| Post time: 2012-11-17 00:20
| Show all posts
vot replied at 2012-11-16 13:25
I have added this functionality into x2ML.
See rev.#401.

Hi vot,

Thank you very much for your reply.
I am now using rev.#390.
What is the procedure to upgrade to rev#401? Please kindly let me know.
Many thanks.

 Author| Post time: 2012-11-17 00:21
| Show all posts
kaaleth replied at 2012-11-16 19:36
Nice. I tested this same plugin and this is my "vision":

1. Go to template\default\common\header.ht ...

Hi Kaaleth,

Thank you so much for your detail instruction, it is really helpful.
Let me try to fix it.
Many thanks.

Post time: 2012-11-17 05:03
| Show all posts
hello_world respondió a las 2012-11-17 01:20
Hi vot,

Thank you very much for your reply.

remplace all files, clean cache
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-05 00:38 GMT+3 , Processed in 0.077788 sec., 9 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list