Translate
Online Users

In total there are 10 users online :: 1 registered, 0 hidden and 9 guests

Most users ever online was 72 on Mon Apr 07, 2014 12:28 pm

Users browsing this forum: No registered users and 2 guests based on users active over the past 5 minutes

Last Online
In order to view the online list you have to be registered and logged in.



We are a free and open
community, all are welcome.

Click here to Register

Search

Facebook page like block

How-to...

Moderator: Staff

Facebook page like block

PostAuthor: jabhi » Fri Jul 17, 2015 11:44 pm

I am trying to add facebook like page block, pls check the code.

Code: Select all
<div class="block_data" style="text-align:center">
<div class="fb-page" data-href="https://www.facebook.com/mazhavilmallus" data-width="400" data-height="800" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true" data-show-posts="true"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/mazhavilmallus"><a href="https://www.facebook.com/mazhavilmallus">മഴവിൽ മല്ലൂസ്</a></blockquote></div></div>
</div>



Not appearing correctly. please check.
http://www.mazhavilmallus.com/
Go phpBB go... Respected : Developers, Supporters.
User avatar
jabhi
 
Posts: 260
Joined: Thu Apr 26, 2012 10:46 pm

Re: Facebook page like block

PostAuthor: Mike » Tue Jul 21, 2015 7:05 am

The code looks fine... I'll test the block and report back...

Lets call the new block: block_facebook.html

Method 1: You would need edit: styles/_portal_common/template/portal_center.html and add <!-- INCLUDE blocks/block_facebook.html --> to it /portal_center.html to the end of the file...

Method 2: Create a new block in root/blocks folder named: block_facebook.php and then treat it like any other block (use ACP > PORTAL to set it up)...

block_face_book.php (contains nothing as it's only used to load the life)...
Code: Select all
<?php
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
   exit;
}
?>


The block only show a link... If you have some code that will fetch contents in your example code above, it doesn't work... Do you have some javascript or any more info?
Image
User avatar
Mike
Developer team leader
Developer team leader
 
Posts: 6051
Joined: Sun Mar 27, 2011 2:12 pm
Location: Dublin, Ireland

Re: Facebook page like block

PostAuthor: Mike » Tue Jul 21, 2015 7:59 am

Looks like there's an API involved... if you have the script for this it should work...
Image
User avatar
Mike
Developer team leader
Developer team leader
 
Posts: 6051
Joined: Sun Mar 27, 2011 2:12 pm
Location: Dublin, Ireland

Re: Facebook page like block

PostAuthor: jabhi » Tue Jul 21, 2015 9:01 am

Hmm..., I got it from facebook plugins.
https://developers.facebook.com/docs/pl ... age-plugin

You look into it for possibilities..
Thanks.
Go phpBB go... Respected : Developers, Supporters.
User avatar
jabhi
 
Posts: 260
Joined: Thu Apr 26, 2012 10:46 pm

Re: Facebook page like block

PostAuthor: Mike » Tue Jul 21, 2015 10:24 am

I'll play with it when I get a free minute but right now I'm up to my eyes porting portal for phpBB 3.1...
Just using the basic code give me a simple block... ->
facebook.png (134.88 KiB) Viewed 5062 times


I'm not a lover of Facebook but I suppose it has uses...

Mike
Image
User avatar
Mike
Developer team leader
Developer team leader
 
Posts: 6051
Joined: Sun Mar 27, 2011 2:12 pm
Location: Dublin, Ireland

Re: Facebook page like block

PostAuthor: jabhi » Tue Jul 21, 2015 11:36 am

My bad, there is a javascript code there which go to right after the opening <body> tag
Where I have to put it?
Code: Select all
<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/sdk.js#xfbml=1&version=v2.4&appId=33086315375456";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


Code: Select all
<div class="fb-page" data-href="https://www.facebook.com/mazhavilmallus" data-width="500" data-height="400" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true" data-show-posts="true"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/mazhavilmallus"><a href="https://www.facebook.com/mazhavilmallus">മഴവിൽ മല്ലൂസ്</a></blockquote></div></div>
Go phpBB go... Respected : Developers, Supporters.
User avatar
jabhi
 
Posts: 260
Joined: Thu Apr 26, 2012 10:46 pm

Re: Facebook page like block

PostAuthor: jabhi » Sun Jul 26, 2015 12:24 am

Any way to avoid validation error.
http://www.mazhavilmallus.com
Go phpBB go... Respected : Developers, Supporters.
User avatar
jabhi
 
Posts: 260
Joined: Thu Apr 26, 2012 10:46 pm


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Charlie Pringle
Ebay's 76junkyard