News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Embed Instagram BBCode

Started by dougiefresh, June 23, 2015, 02:36:27 PM

Previous topic - Next topic

Ninja ZX-10RR

Actually veriify that you successfully updated to 2.0.11 first, and only then think about mods. Sometimes the updates silently fail and you don't know it unless you manually click on each arrow to inspect each file edit while installing them. This is done because SMF assumes a mod has edited those strings of codes, so they no longer need to be updated (which is fairly questionable to me, but it's just me).
What you should do now is to manually verify that each update installed successfully in each file, and it's going to take not less than 3 hours. If you don't have many mods installed nor custom edits to files I'd recommend you just install a clean 2.0.11 from scratch and re-mod it again.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

TLMB

Thanks Ninja. Unfortunately I have plenty of mods installed. Slog-work time, I guess.... :/

dougiefresh

If a SMF update doesn't update a particular file, then the version number won't change.   I'm at work right now and can't verify that files version number.

margarett

Subs-Post is  * @version 2.0.10
But the file version is just recognized by this text string. What's important is the content.

So you need to make sure that the changes performed to it in both 2.0.9 and 2.0.10 are present at the file.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Ninja ZX-10RR

Quote from: TLMB on September 28, 2015, 08:43:28 AM
Thanks Ninja. Unfortunately I have plenty of mods installed. Slog-work time, I guess.... :/
Don't tell me, I have around 140 installed ;D
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dougiefresh

Uploaded v1.11 - October 2nd, 2015
o Rewrote auto-embedding code to deal with line-breaks and duplicate closing brackets.




@TLMB: Sorry about not responding lately.  I've been working multiple mandatory 12+ hour shifts and have just recently gotten off the mandatory crap....  This update will not solve your particular bug reports....  SOOOO, let's play catch-up!

Quote from: TLMB on September 27, 2015, 02:23:04 PM
Thank you.
But how do I upgrade? Trying to install v1.10 tells me "it's already installed", but trying to uninstall v1.9 gives me Test Failed on
Quote*    2.    Execute Modification    ./Sources/Post.php    Test failed
      1.    Replace    ./Sources/Post.php    Test failed
      2.    Replace    ./Sources/Post.php    Test failed
*    3.    Execute Modification    ./Sources/Subs.php    Test failed
      1.    Replace    ./Sources/Subs.php    Test failed
Attach your Sources/Post.php and Sources/Subs.php so that I can see what the problem is.....

Quote from: TLMB on September 27, 2015, 02:23:04 PM
I also have Antes' Tweet embed mod and your facebook embed mod installed. Any conflict there?
I don't see any conflict between the three mods.  The Antes' Tweet embed mod doesn't make changes to the same areas as either of my mods.  My Embed Facebook mod is designed to be installed alongside this mod....

Quote from: TLMB on September 27, 2015, 06:14:55 PM
Unfortunately I'm now getting a "the message body was left empty" error when I try to edit a post that has some instagram links in, amongst other stuff. (Googling suggests this may be to do with too many bbcodes in one post.)
The forum strips out all HMTL tags that it considers "unnecessary", in order to see if anything left is worth displaying.  So if the previous install statement didn't tell me that there is something wrong with your install, getting this message tells me there is definitely something wrong!

Quote from: TLMB on September 27, 2015, 06:14:55 PM
The post is shown as blank, even though clicking "modify" loads the post's full content in the edit window.
Show me what you are using in your post, so that I can see if it is something I can solve....

Quote from: TLMB on September 27, 2015, 06:14:55 PM
My forum now tells me that I have Subs-Post.php version 2.0.8 , and the latest version is 2.0.10. I'm running 2.0.11. I suspect it may be to do with this?
I'd be surprised if this particular "issue" had any play in this particular bug report.....  However, as margarett stated, you should make sure those changes are present, as the SMF updates are fairly (if not VERY) important!!

Quote from: TLMB on September 27, 2015, 06:14:55 PM
Tempted to try your Faster BBC Parser mod to see if that magically fixes things... :)
It wouldn't solve this particular problem.  The Faster BBC Parser mod is designed to replace some code, which in particular circumstances, can result in the forum crashing.  This is NOT one of them!  :P

TLMB

Hi Dougie,
No need to apologise - I quite understand. I haven't yet had time to try to do my own checking of the SMF upgrade changes yet.

Here is the post I'm trying to make. As a stopgap solution, I've split it into 2 posts at "OR..." , and those both post okay individually. As one complete message though, it fails.
Note: I've manually added spaces to the [c o d e] tags of my messages, so that it doesn't break the [c o d e] parsing of this post! The spaces in the first image url are also there deliberately.
Like this
1. ([b][color=purple]as an embedded image[/color][/b])
[c o d e][img] http :// kendama.co.uk/ images/ WatchmenKendama_sm .jpg [/img] (without spaces)[/ c o d e]
(You can click the little "Mona Lisa" button to get the [ img ] tags.)
..which will give you...
[img width=600 height=800]http://kendama.co.uk/images/WatchmenKendama_sm.jpg[/img]

NOTE: the URL you use must be a direct link to the [i]image file itself[/i], and not to a web page that the image [i]is on[/i].

If your image is on a website page that doesn't allow you to easily share the direct image URL (like Twitter or Instagram, for example), then just type the page URL into your post, without using any code tags. e.g.
"Copy link to tweet" from Twitter, and it will automatically embed, like this: [url=https://twitter.com/britishkendama/status/409024472771870720]https://twitter.com/britishkendama/status/409024472771870720[/url]
Or "Copy Share URL" from Instagram, and it will automatically embed, like this:
[url=http://instagram.com/p/i1AI5wiHk0/]http://instagram.com/p/i1AI5wiHk0/[/url]





Also, we have a Facebook auto-embed for facebook [b]posts[/b] (not images). Copy the link from the timestamp of the post, and paste it in your reply here.
[url=https://instagram.com/p/72tOPQCHvl/]https://instagram.com/p/72tOPQCHvl/[/url]

...and you get:

[url=https://www.facebook.com/BritishKendamaAssociation/posts/1003599909691776]https://www.facebook.com/BritishKendamaAssociation/posts/1003599909691776[/url]

OR...

2. Like this ([b][color=purple]as an attachment[/color][/b]). [b]Note the file size limits![/b] ([size=8pt][i]Please log in to see the attached image.[/i][/size])

There is a maximum of 500KB for any one image, or 1500Kb total for one post. Please check the size of the files you are trying to attach. Most modern digital cameras will probably produce images that are larger than this. You can host them on an image hosting site (e.g. Flickr) and post links to/embed the images here, or else you will need to compress your images with some software before you try to upload them as attachments. (Google "image compression software" for suggestions, and add "free" to that search term if you are skint!).

Suggested example:
If you have a jpg that is 4.5MB, and 4320x2880 pixels,
A. Reduce the resolution to 72 dots per inch (dpi), then
B. Reduce the scale to 800x533pixels, and then compress (Save As..) again as a jpg, at say, 87%.
Your new image will only ~53KB, and will fit easily on a computer screen, but will "look the same". (Exact numbers will vary, depending on your files/software.)

Edit: Here's a walk-through for compressing on an iOS device with a cheap app:
[url=http://www.idownloadblog.com/2014/02/22/how-to-reduce-pictures-file-size-on-iphone/]http://www.idownloadblog.com/2014/02/22/how-to-reduce-pictures-file-size-on-iphone/[/url]
Here's an alternative cheap app: [url=https://itunes.apple.com/gb/app/idownsize/id541063049?mt=8]https://itunes.apple.com/gb/app/idownsize/id541063049?mt=8[/url]

...and here's a free iOS app that we haven't tried:
[url=https://itunes.apple.com/gb/app/file-aid/id889655915?mt=8]https://itunes.apple.com/gb/app/file-aid/id889655915?mt=8[/url]

...and Fit2Web is simple and works well too:
Fit2Web Free by TwentySix TwentyEight
[url=https://appsto.re/gb/wwvcO.i]https://appsto.re/gb/wwvcO.i[/url]


As you can see, the forum had previously auto [ u r l ] 'd some of the links (pre-dating me installing your mods), so I thought that might be adding to the excess load of tags, so I thinned it out to.....

Like this
1. ([b][color=purple]as an embedded image[/color][/b])
[c o d e][img] http :// kendama.co.uk/ images/ WatchmenKendama_sm .jpg [/img] (without spaces)[/ c o d e]
(You can click the little "Mona Lisa" button to get the [ img ] tags.)
..which will give you...
[img width=600 height=800]http://kendama.co.uk/images/WatchmenKendama_sm.jpg[/img]

NOTE: the URL you use must be a direct link to the [i]image file itself[/i], and not to a web page that the image [i]is on[/i].

If your image is on a website page that doesn't allow you to easily share the direct image URL (like Twitter or Instagram, for example), then just type the page URL into your post, without using any code tags. e.g.
"Copy link to tweet" from Twitter, and it will automatically embed, like this:
https://twitter.com/britishkendama/status/409024472771870720
Or "Copy Share URL" from Instagram, and it will automatically embed, like this:
http://instagram.com/p/i1AI5wiHk0/





Also, we have a Facebook auto-embed for facebook [b]posts[/b] (not images). Copy the link from the timestamp of the post, and paste it in your reply here.
https://instagram.com/p/72tOPQCHvl/

...and you get:

https://www.facebook.com/BritishKendamaAssociation/posts/1003599909691776

OR...

2. Like this ([b][color=purple]as an attachment[/color][/b]). [b]Note the file size limits![/b] ([size=8pt][i]Please log in to see the attached image.[/i][/size])

There is a maximum of 500KB for any one image, or 1500Kb total for one post. Please check the size of the files you are trying to attach. Most modern digital cameras will probably produce images that are larger than this. You can host them on an image hosting site (e.g. Flickr) and post links to/embed the images here, or else you will need to compress your images with some software before you try to upload them as attachments. (Google "image compression software" for suggestions, and add "free" to that search term if you are skint!).

Suggested example:
If you have a jpg that is 4.5MB, and 4320x2880 pixels,
A. Reduce the resolution to 72 dots per inch (dpi), then
B. Reduce the scale to 800x533pixels, and then compress (Save As..) again as a jpg, at say, 87%.
Your new image will only ~53KB, and will fit easily on a computer screen, but will "look the same". (Exact numbers will vary, depending on your files/software.)

Edit: Here's a walk-through for compressing on an iOS device with a cheap app:
http://www.idownloadblog.com/2014/02/22/how-to-reduce-pictures-file-size-on-iphone/
Here's an alternative cheap app: https://itunes.apple.com/gb/app/idownsize/id541063049?mt=8

...and here's a free iOS app that we haven't tried:
https://itunes.apple.com/gb/app/file-aid/id889655915?mt=8

...and Fit2Web is simple and works well too:
Fit2Web Free by TwentySix TwentyEight
https://appsto.re/gb/wwvcO.i


.... but still no joy.

Those files are attached, although I did get past the problem of upgrading your mods. Have not yet tried to upgrade again to your latest versions of FB and IG embeds....

Thanks very much for your help.


dougiefresh

Uploaded v1.12 - October 17th, 2015
o Fixed auto-embedding code so that it embeds the URL if no tags are around it.




@Everybody: I'm working long hours and haven't been able to answer questions in a timely manner.  This may go on for the next month or so.  Please be patient, as I don't even have time for myself, much less these mods....  Thanks for understand.

@TLMB: I modified the auto-embedding code from another mod to serve this mod's purpose.  No longer will it improperly auto-embed URLs if there are tags around it, such as the url tag like in the previous post....  I apologize if this breaks anybody's forum....

Ninja ZX-10RR

*critical issue*
This mod along with the other embed Tumblr (and perhaps any others from you with similar coding) // Embed Instagram URLs in the instagram bbcode tags:
BBCode_Instagram_Embed($message);

// Embed Tumblr URLs in the Tumblr bbcode tags:
BBCode_Tumblr_Embed($message);
breaks the admin BBC interface at action=admin;area=postsettings;sa=bbc; please fix this.
Thanks in advance.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dougiefresh

I'm guessing that you have mod version 1.8 installed, because this issue was addressed in version 1.9.  I would recommend upgrading to the latest version.

natcip

I just noticed that when I embed the URL with "www", the result adds "[/instagram]" as text right after the embedded iframe.

dougiefresh

@natcip: I assume you aren't running the latest release.  Please update your mod to the latest version (v1.13), which was released on October 17th, 2015.  Thank you!

natcip

Quote from: dougiefresh on November 14, 2015, 11:53:47 AM
@natcip: I assume you aren't running the latest release.  Please update your mod to the latest version (v1.13), which was released on October 17th, 2015.  Thank you!
I have the version v1.12 installed. I downloaded it yesterday.

dougiefresh

Hmmm.... I'll look at it again.  However, can you provide me with a link that is causing you an issue?  It would be appreciated!

natcip

Quote from: dougiefresh on November 14, 2015, 01:02:50 PM
Hmmm.... I'll look at it again.  However, can you provide me with a link that is causing you an issue?  It would be appreciated!
Thanks!

Here's a post which I just edited with the "www" in the URL to give you an example.
http://brandy.4fans.net/index.php?topic=4420.msg176103#msg176103

And when the Instagram-URL has the "?taken-by=xxxx" parameter attached, it adds this as a text too.
Like this:
?taken-by=gwenstefani[/instagram]

dougiefresh

@natcip:   :o Sigh....  First, I'm not a Brandy fan.  Second, I'm not signing up to your website just to see what the contents of your post is.  Third I see the results of the post message, but I NEED the contents in order to attempt to duplicate the problem.

All of this being said, I copied the comment link (right-click on Comment, then select Copy), which got me this:
https://instagram.com/p/-DO_iGtvPv
Changed it to this:
https://www.instagram.com/p/-DO_iGtvPv
And no visible change that I can see.  This just means I don't have the information that I need to look into the problem yet......  :o

natcip

Like I already said it's a regular link with www.

[instagram]https://www.instagram.com/p/-DO_iGtvPv/[/instagram]
[instagram]https://www.instagram.com/p/85aSlTuLbq/?taken-by=gwenstefani[/instagram]


Also, you said the newest version is v1.13, but the download page has v.1.12. ???

dougiefresh

Uploaded v1.13 - November 15th, 2015
o Modified validation pattern to recognize URLs without the "/p" part as valid.
o Modified auto-embed regex pattern to require the "http" or "https" part of the URL.




@natcip:  Thank you for the bug report.  This update should solve this particular report!

natcip

Awesome, it works now. Thank you! :)

dougiefresh

Uploaded v1.14 - November 30th, 2015
o Modified auto-embed function for use as a hook with SMF 2.1.

Advertisement: