Tricked Out News

Welcome to TON. This site is dedicated to development of addons for the RavenNuke™ CMS
Follow Us:
Tricked Out Mods: Forums

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Facebook social plugin
 Goto page 1, 2  Next
 
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> Tricked Out News
View previous topic :: View next topic  
Author Message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38

Reputation: 11.1

PostPosted: Thu Jan 26, 2012 8:36 pm 
Post subject: Facebook social plugin
Reply with quote

Hallo,

can use the "social plugin Facebook comments" show down in the News
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Fri Jan 27, 2012 5:02 pm 
Post subject:
Reply with quote

I don't understand the question. Are you saying you can't use it or are you asking how to use it?
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38

Reputation: 11.1

PostPosted: Fri Jan 27, 2012 6:32 pm 
Post subject:
Reply with quote

how to use it?
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Fri Jan 27, 2012 8:42 pm 
Post subject:
Reply with quote

Using RavenNuke 2.5 as the code base, in modules/News/article.php after:
Code:
get_lang($module_name);

Add:
Code:
$inlinefbjs='<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/en_US/all.js#xfbml=1&appId=YourAppId";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));</script>';
addJSToBody($inlinefbjs, 'inline');


Being sure to replace YourAppId with your Facebook App Id number.

At the bottom, replace:


Code:
include_once('modules/News/comments.php');


With:
Code:
echo'<div class="fb-comments" data-href="' . $nukeurl . '/modules.php?name=' . $module_name . '&file=article&sid=' . $sid . '" data-num-posts="5" data-width="470"></div>';

echo '</td></tr></table>'."\n";

_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38

Reputation: 11.1

PostPosted: Sun Jan 29, 2012 3:26 pm 
Post subject:
Reply with quote

Thank you, this worked very well.
and I can make it the same, with this module (video modules) or module is the just viable with the news?
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sun Jan 29, 2012 4:44 pm 
Post subject:
Reply with quote

You should be able to since the module name will be different it should keep them separate.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38

Reputation: 11.1

PostPosted: Sun Jan 29, 2012 5:15 pm 
Post subject:
Reply with quote

I did it, but I get the same comments on all video files
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sun Jan 29, 2012 5:24 pm 
Post subject:
Reply with quote

You will have to look at how the url is formed when viewing the video. That module uses $id instead of $sid. If you want to, paste me the link to the module and I will post the code for it.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38

Reputation: 11.1

PostPosted: Sun Jan 29, 2012 6:02 pm 
Post subject:
Reply with quote

http://www.amchum.de/video.html

I've made for you a username, and sent via PM.
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sun Jan 29, 2012 6:14 pm 
Post subject:
Reply with quote

Try this code for the Video module

Top of the function watch before include("header.php");

Code:
$inlinefbjs='<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/en_US/all.js#xfbml=1&appId=YourAppId";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));</script>';
addJSToBody($inlinefbjs, 'inline');





Replace comments($id, $comment); with:
Code:
echo'<div class="fb-comments" data-href="' . $nukeurl . '/modules.php?name=' . $module_name . '&op=watch&id==' . $id . '" data-num-posts="5" data-width="470"></div>';



_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38

Reputation: 11.1

PostPosted: Sun Jan 29, 2012 6:23 pm 
Post subject:
Reply with quote

thank you thank you.

that works,100%
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sun Jan 29, 2012 6:43 pm 
Post subject:
Reply with quote

If you are going to use the facebook and the regular comments system with the News module, you will want to remove the
Code:
echo '</td></tr></table>'."\n";

from what I posted for it. That line of code is already in the comments.php file.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38

Reputation: 11.1

PostPosted: Sun Jan 29, 2012 6:53 pm 
Post subject:
Reply with quote

thanks again, I have the code changed from en_US to de_DE. but it shows only in English.
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sun Jan 29, 2012 7:19 pm 
Post subject:
Reply with quote

I have no idea about the language. You may want to check over at Facebook about that.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38

Reputation: 11.1

PostPosted: Mon Jan 30, 2012 12:15 pm 
Post subject:
Reply with quote

thank you for everything. You are the perfect example for all support pages.
  
Back to top
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> Tricked Out News All times are GMT - 5 Hours
 Goto page 1, 2  Next
 Page 1 of 2

 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001-2008 phpBB Group
Forums ©