[ADB] Facebook For PhpBB Light

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
sleevedbiker
Registered User
Posts: 789
Joined: Mon Oct 12, 2009 4:33 pm

Re: [ALPHA] Facebook 2011

Post by sleevedbiker » Wed Mar 30, 2011 2:41 am

keitzy wrote:The like button is for each post not the page. I am working on the fix for the admin settings.
yeah i know, i am just making my own changes to it. mainy using it for the connect with facebook, and the avatar linking. good work btw.
You ride with an outlaw, You die with an outlaw

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [ALPHA] Facebook 2011

Post by keitzy » Wed Mar 30, 2011 4:08 am

find in viewtopic

Code: Select all

'FBLIKE'        => ($forum_id == $auth_role['forum_id']) ? '' : '<div style="overflow:visible !important;"><br /><fb:like href="' . generate_board_url() . '/viewtopic.php?f=' . $forum_id  . '&t=' . $topic_data['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id'] . '" ' . (($config['fb2011_like_layout'] == 'standard') ? '' : 'layout="' . $config['fb2011_like_layout'] . '" ') . (($config['fb2011_like_action'] == 'like') ? '' : 'action="' . $config['fb2011_like_action'] . '" ') . 'show_faces="' . $config['fb2011_like_faces'] . '" ' . 'width="' . $config['fb2011_like_width'] . '" ' . 'font="' . $config['fb2011_like_font'] . '"' . (($config['fb2011_like_color'] == 'light') ? '' : 'colorscheme="' . $config['fb2011_like_color'] . '" ') . ' /></div>'),
		'FBCOMMENTS'     => ($forum_id == $auth_role['forum_id']) ? '' : '<div style="display:inline;"><br /><fb:comments href="' . generate_board_url() . '/viewtopic.php?f=' . $forum_id  . '&t=' . $topic_data['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id'] . '" xid="' . $row['post_id'] . '" numposts="2" width="' . $config['fb2011_like_width'] . '" publish_feed="true" /></div>'),
and replace with

Code: Select all

'FBLIKE'        => ($forum_id == $auth_role['forum_id'] || $config['fb2011_like_enable'] == 'no' ? '' : '<div style="overflow:visible !important;"><br /><fb:like href="' . generate_board_url() . '/viewtopic.php?f=' . $forum_id  . '&t=' . $topic_data['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id'] . '" ' . (($config['fb2011_like_layout'] == 'standard') ? '' : 'layout="' . $config['fb2011_like_layout'] . '" ') . (($config['fb2011_like_action'] == 'like') ? '' : 'action="' . $config['fb2011_like_action'] . '" ') . 'show_faces="' . $config['fb2011_like_faces'] . '" ' . 'width="' . $config['fb2011_like_width'] . '" ' . 'font="' . $config['fb2011_like_font'] . '"' . (($config['fb2011_like_color'] == 'light') ? '' : 'colorscheme="' . $config['fb2011_like_color'] . '" ') . ' /></div>'),
		'FBCOMMENTS'     => ($forum_id == $auth_role['forum_id'] || $config['fb2011_comment_enable'] == 'no' ? '' : '<div style="display:inline;"><br /><fb:comments href="' . generate_board_url() . '/viewtopic.php?f=' . $forum_id  . '&t=' . $topic_data['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id'] . '" xid="' . $row['post_id'] . '" numposts="2" width="' . $config['fb2011_like_width'] . '" publish_feed="true" /></div>'),
Database setting fix is here http://forums.damienkeitel.com/db.zip. Please extarct and copy db_update.php to your root folder run the file by browsing to e.g http://example.com/db_update.php.
The settings will be reset so you will have to redo the settings again.
Image

cossielee
Registered User
Posts: 101
Joined: Tue Jul 13, 2010 12:26 am

Re: [ALPHA] Facebook 2011

Post by cossielee » Wed Mar 30, 2011 8:32 am

Cheers keitzy, made the db changes and its now saving settings, popup window now appears when clicking the facebook connect button, i get a error though but i think thats due to me using a test forum on my local host and my fb app being linked to my actually site.

Only problem i have now is the comments box, it seems to slow down the page loading due to it being on every post. I worked on moving the single post like button for another mod and managed to put it before the edit buttons, heres how it looked:

Image

dont know if this would be a better option and maybe have the comments box at the bottom of the page to reduce load.. or have it so it appears when you hover over the like button, i know this cna be done, i could get it to fit right in the image above so had to use the small like box :)

Any thoughts on the ability to choose which forums can be liked? i have a few private forums so the last thing i need is someone hitting 'like' on a thread in their that shouldnt be liked :)

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [ALPHA] Facebook 2011

Post by keitzy » Wed Mar 30, 2011 8:34 am

Yeah facebook is not compatible with offline. You need an actual domain name to use in settings.
Image

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [ALPHA] Facebook 2011

Post by keitzy » Wed Mar 30, 2011 8:36 am

The permssions are setup on the like button. IF the post cannot be viewed by a guest then it cannot be liked or commented on. Only seems fair as we do not want to force the guest to register to view the comment or the object that was liked.

Code: Select all

  $aclsql = "SELECT forum_id
    FROM " . ACL_GROUPS_TABLE . "
    WHERE auth_role_id = '16'";
  $result = $db->sql_query($aclsql);

  $auth_role = $db->sql_fetchrow($result);

'FBLIKE'        => ($forum_id == $auth_role['forum_id']
The above is a prior little sql query that finds the guest permission and applies it to the like and comments feature within each post. If the forum id does not match the authorized forum id then they will no show. This was a problem I stumbled across about 1& 1/2 years ago when noobs from my gaming clan kept sharing members only posts on facebook. Completely annoying when the public can't read the post and some of the sensitive subject data being publicly announced.
Image

cossielee
Registered User
Posts: 101
Joined: Tue Jul 13, 2010 12:26 am

Re: [ALPHA] Facebook 2011

Post by cossielee » Wed Mar 30, 2011 8:55 am

ok mate, reason i was asking about permissions is becasue i have a beta test section that only official playstation beta testers have access too, i dont want them posting anything from that forum on facebook or sony will come get us :D

Now noticed that the 'Like' button on each post has a dropdown comments box in addition to the main comments box. Any ideas on how to move the main comments box to the bottom of the page and remove it from the topic page?

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [ALPHA] Facebook 2011

Post by keitzy » Wed Mar 30, 2011 9:10 am

Each individual comments box and like are independent of each other and bound to each post. The problem with fb:comments is that they don't live anywhere. So the like button comments has nothing to do with the comments box. Doesn't make any sense does it. I have posted this little problem with facebook.
Really the comments just live on that post under each post and show on the users wall if they select post to profile. But really the comments box is useless atm as you cannot style the comments to fit into a dark style website, the moderation of the comments is a mess and the settings are really just a kids toy.
You can see my opinion of fb:comments.
Hopefully facebook will let us advanced dev's use these social plugins in a more professional way than noobish style social plugins.
If you have seen my website forums then you will have seen my custom page comments box at the bottom on the index page. That is where I would like to see facebook equal with the fb:comments. But I am a nobody and nothing so my simple coding will never get looked at even though my custom comments box is more closer to a facebook profile page than their out of place fb:comments.

Wow I can rant a bit about facebook. That's the short story of my little travels with Facebook API.
Image

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [ALPHA] Facebook 2011

Post by keitzy » Wed Mar 30, 2011 9:25 am

What I would like to happen is an integration of comments into each post.
We have a special group called facebook guest, which can only post if they are logged in via facebook.
When a topic can be viewed by the public. You can have the option to post the topic post to the wall of the linked post url which only the admin can see but can be posted to the facebook users wall. If a friend that is not a forum user comments on that it can be posted back to the forum as a reply post from a facebook guest.
Like when a comments is posted from a website to facebook is says posted from blah domain. The same would happen with the post. It would say posted from facebook by facebook guest.
Now that is some absolute major coding and work to be done.

This is just an idea to make phpbb forums more viral throughout out the social side of the internet.
This is why I want to have fb:comments more configurable than it is or just not use it all and use my custom comments system and control everything from the ucp and acp.
Image

cossielee
Registered User
Posts: 101
Joined: Tue Jul 13, 2010 12:26 am

Re: [ALPHA] Facebook 2011

Post by cossielee » Wed Mar 30, 2011 9:54 am

Iv asked a few of my site mods what they think of this and they love it, though none of them like the comments box as they feel that comments should be posts on the thread, so iv disabled the comments on my test forum which just leaves me the 'like' box, when i click it i get the following:

You like localhost/phpBB3/viewtopic.php?f=26&t=344&p=4307#p4307. but it doesnt post to facebook unless you add a comment, and if you comment on it the wall post looks the same, localhost/phpBB3/viewtopic.php?f=26&t=344&p=4307#p4307

the Thread 'like' button posts it as this:

PS3 Coffin Dodgers • Information
http://www.ps3coffindodgers.com


Any ideas keitzy??

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [ALPHA] Facebook 2011

Post by keitzy » Wed Mar 30, 2011 10:01 am

I'm surprised its actually posting to facebook. How did you get an appid for localhost?
Image

cossielee
Registered User
Posts: 101
Joined: Tue Jul 13, 2010 12:26 am

Re: [ALPHA] Facebook 2011

Post by cossielee » Wed Mar 30, 2011 10:19 am

keitzy wrote:I'm surprised its actually posting to facebook. How did you get an appid for localhost?
Eh, iv no idea, just inputed my codes and now it seems to connect, dont know if thats a good thing or bad thing :shock:

As per my above post, iv just realised that your mod doesnt contain the 'Like' thread feature and that i forgot to remove my previous 'Like' mod, the thread like button is the one that puts correct info on facebook, here is the code i use for that:

Code: Select all

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.ps3coffindodgers.com%2Fviewtopic.php%3Ff%3D{FORUM_ID}%26t%3D{TOPIC_ID}&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:45px"></iframe>
Im happy to use that for the thread 'Like' button, it would be good though to use your post 'Like' button but have it showing the thread title on facebook wall..hope that makes sence :roll: :)

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [ALPHA] Facebook 2011

Post by keitzy » Wed Mar 30, 2011 11:09 am

You mean for the whole topic?
Image

cossielee
Registered User
Posts: 101
Joined: Tue Jul 13, 2010 12:26 am

Re: [ALPHA] Facebook 2011

Post by cossielee » Wed Mar 30, 2011 11:54 am

keitzy wrote:You mean for the whole topic?
no, for individual posts..

Just installed on my live site (i know the risks lol), when i log into ACP then select the Facebook 2011 category i get the following errors.

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_fb2011.php on line 35: simplexml_load_file() [function.simplexml-load-file]: URL file-access is disabled in the server configuration
[phpBB Debug] PHP Notice: in file /includes/functions_fb2011.php on line 35: simplexml_load_file(http://www.facebook.com/translations/FacebookLocales.xml) [function.simplexml-load-file]: failed to open stream: no suitable wrapper could be found
[phpBB Debug] PHP Notice: in file /includes/functions_fb2011.php on line 35: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://www.facebook.com/translations/FacebookLocales.xml"
[phpBB Debug] PHP Notice: in file /includes/functions_fb2011.php on line 39: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /adm/index.php on line 151: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3502)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3502)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3502)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 155: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3502)
 

User avatar
keitzy
Registered User
Posts: 359
Joined: Thu Nov 12, 2009 6:32 am
Location: Esperance, Western Australia
Contact:

Re: [ALPHA] Facebook 2011

Post by keitzy » Wed Mar 30, 2011 12:06 pm

Oh. Looks like you may need to contact your host to get them to add url file access for your web hosting.

In the Facebook 2011 settings you can choose what settings you want for your like button.
Image

cossielee
Registered User
Posts: 101
Joined: Tue Jul 13, 2010 12:26 am

Re: [ALPHA] Facebook 2011

Post by cossielee » Wed Mar 30, 2011 12:15 pm

keitzy wrote:Oh. Looks like you may need to contact your host to get them to add url file access for your web hosting.

In the Facebook 2011 settings you can choose what settings you want for your like button.
Looks like this will be a no go on my live site, my host says that i need PHP setting called "allow_url_fopen" but they wont allow it due to it being a security concern as it creates cronss-site scripting attacks. He suggests i ask for a way around this or use other plugin. :(

**EDIT** the actual mod is working on my live site, i can like and comment on posts and it goes to my wall, also has my face, i just cant access the admin section of it..

Locked

Return to “[3.0.x] Abandoned MODs”