Embed Facebook BBCode

Started by dougiefresh, July 11, 2015, 02:33:41 PM

Previous topic - Next topic

villasg

I do not have this issue with  2.4

dougiefresh

Huh, my test site did.....  Hence the need for the fix....

dougiefresh

Uploaded v2.6 - August 29th, 2015
o Fixed missing CSS file operations within package-info.xml

dougiefresh

Uploaded v2.7 - September 6th, 2015
o Fixed issue where BBCodes list was completely empty because of mod... (shrug)

stefan357965

Quote from: dougiefresh on September 06, 2015, 01:08:07 PM
Uploaded v2.7 - September 6th, 2015
o Fixed issue where BBCodes list was completely empty because of mod... (shrug)
[/quote

Great work man!

Koda

#45
Thank you for making this mod dougiefresh!  I have an issue, and I am sure it is mine, but maybe you can assist me.

All facebook posts that have type=1 or an &id tag at the end are not showing up with this mod when I post to my forum.  I can post everything from my wall fine for some reason, but with others the &id is present which prevents me from sharing, even if the post is marked as public.  Any idea?  I am not that well versed in facebook.  Thank you!



Think I figured it out, some profiles are set to private even though the posts are set to public.  This is preventing the posts from being shared even if they appear public.  To get the proper link for public posts, right click the timestamp when it was posted and copy/paste the link.  Posts that have extra text after the proper id are not public posts.

As a recommendation for a future version, maybe include a hover info box over the facebook icon explaining these things to new users.  A dev may be able to figure it out but I doubt even 10% of my members would be able to figure out how to use this feature correctly due to facebooks security settings.

Koda

Sorry for the double post, but I have been working with your mods for the past few hours and really like them, but there seems to be some issue with the mods and the bbcode.  When I post the links with the code manually entered it sometimes messes up and throws out an extra [/facebook] tag, this also happens if I insert multiple bbcode tags into the same thread, but the formatting really gets messed up and only the first link is displayed, the rest are eaten up and bbcode is displayed instead.  Any input is much appreciated, thank you.

dougiefresh

Uploaded v2.8 - September 21st, 2015
o Fixed auto-embedding issue where URLs inside code tags where auto-linked.

dougiefresh

Uploaded v2.8 - September 21st, 2015
o Fixed auto-embedding issue where URLs inside code tags where auto-linked.




@Koda: Let me look into these bug reports.  If you could provide the text of the post for me to test against, it might be very helpful....

Koda

#49
Anytime I post a facebook link it tries to auto embed including when I use the embed manually.

[facebook]facebook.com/page#goeshere[facebook]f will turn into the facebook post followed by [/facebook] text.  When a link to facebook is posted, a [/facebook] also follows.  Just tested with 2.8 update.

This also happens with your tumblr mod, perhaps it may be specific to my theme or other mods I have installed?

Here is an example with the tumblr mod, it is the same error with the facebook mod:

http://phytoactive.net/herbs/test-104/msg125/#msg125

Thanks!

dougiefresh

Quote from: Koda on September 22, 2015, 04:50:54 PM
[facebook]facebook.com/page#goeshere[facebook]f
@Koda:  I need actual links to check against.  Giving me something so generic is virtually useless in trying to diagnose this issue....

Koda

Well the issue is with the bbcode not exactly the display of the facebook code.  I experience the same error with all of your bbc embed mods (facebook, tumblr). 

Example:  posting http://h-e-r-b-s.tumblr.com/post/129892397465 into a post creates http://h-e-r-b-s.tumblr.com/post/129892397465[/tumblr]

If I post [tumblr]http://h-e-r-b-s.tumblr.com/post/129892397465[/tumblr] I will receive the embedded tumblr code, but there is always a visible [/tumblr] after it.  If I post another [tumblr] tag afterwards, the formatting gets really messed up and only the first embedded tumblr is shown, afterwards is broken bbc. 

You can see my test page here: http://phytoactive.net/herbs/test-104/msg125/#msg125

Scroll to the bottom where you can see the bbc start to break.  The issue is the same as facebook, and your other bbc mods with my template.  Other bbc mods do not cause this issue.


dougiefresh

I had to register on your forum in order to see how you used the bbcodes.  One problem that you have is the mod expects this:
[tumblr]http://h-e-r-b-s.tumblr.com/post/129892397465[/tumblr]
and what you have is this:
[tumblr]http://h-e-r-b-s.tumblr.com/post/129892397465
[/tumblr]

Putting the closing tag on the same line as the rest of it SHOULD fix this.  Since your usage wasn't an expected usage of the bbcode, the auto-embed isn't "equipped" to deal with the issue....

I've fixed this issue for the next version of each of the Facebook, Tumblr and Instagram mods, however, I don't have time tonight to package them up and release them properly since it's my bedtime.  (I get up too early in the morning...  :P) I'll do it tomorrow.

Koda

Not sure how the formatting would have been changed to that, but I did just try to post 2x tumblr posts and received no errors.  I will install the updated facebook mod tomorrow and let you know if the issue still exists.

It may be entirely with my software, I noticed another mod doing this too when I tried to tag a link with the bbc, it tried to format after the link was already formatted.

dougiefresh

I've been working multple 12+ hour shifts over the last week and haven't had the energy or time to work on this bug report.  However, today, I've fixed and uploaded the new version of the Tumblr mod.  Later today, I'll fix my Facebook and Instagram mods and upload them.

dougiefresh

Uploaded v2.9 - October 2nd, 2015
o Rewrote auto-embedding code to deal with line-breaks and duplicate closing brackets.
o Added "Invalid Facebook URL" message for use with invalid FB URLs (duh)....




@Everybody: This update fixes the auto-embed code so that tags and URLs like the following are correctly dealt with:
Code (Line break after URL) Select
[facebook]{link here}
[/facebook]

Code (Line break before URL) Select
[facebook]
{link here}[/facebook]

Code (Line break before and after URL) Select
[facebook]
{link here}
[/facebook]

Mimmi

Thank you for a nice mod! Here is Norwegian translation:

$txt['fb_default_lang'] = 'Språket Facebook-kontrollene er vist i:';
$txt['fb_default_video_width'] = 'Standard bredde av innebygd Facebook-video:';
$txt['fb_default_post_width'] = 'Standard bredde av innebygd Facebook-innlegg:';
$txt['fb_invalid'] = '[ Ugyldig Facebook-URL ]';
Forum-junkie and still a newbie in the world of administrating php etc... Volunteers in reproductive rights. http://www.liv-laga.no/

dougiefresh

Uploaded v2.10 - November 6th, 2015
o Added Norwegian language modifications to the mod.  Thanks, Mimmi!

dougiefresh

Uploaded v2.11 - November 7th, 2015
o Fixed Norwegian language modifications so that they are added to correct language file.

dougiefresh

#59
Uploaded v2.12 - November 12th, 2015
o Issue already been addressed.  No functional changes made to the mod.

Advertisement: