Let me know if anything is missing in the list above and should be added.
(This post was last modified: 08 Jun 2022, 21:46 by Like Ra.)
[UPDATED] feature - Media Auto-embedding
33 Replies, 5908 Views
Added instagram embedding.
(This post was last modified: 08 Jul 2022, 02:04 by Like Ra.)
See the second post in this thread for the list of supported sites.
Some sites updated their scripts, so they are breaking out from iframes (e.g. hypnotube). I'm currently tweaking the plugin to run all iframes in sandboxes with limited features.
(This post was last modified: 05 Dec 2022, 17:00 by Like Ra.)
Edit: I blocked pop-ups too. Please let me know if you notice any broken embeddings.
Youtube time codes still do not work. Can anybody spot the error?
(This post was last modified: 12 Mar 2023, 16:57 by Like Ra.)
Code: // Youtube https://шшш.youtube.com/watch?v=e8WuGzXyO7Y&t=132s
Right now, I don't have a PHP-environment set up, so I tested this on regex101.com with PCRE2, which should be close enough. It turns out that what looks like a "w" in your test-url is in fact a cyrillic sha. If I replace "шшш" with "www" the regex and the url-part of the replacement work just fine.
(This post was last modified: 12 Mar 2023, 23:38 by Thegolor.)
(12 Mar 2023, 23:35 )Thegolor Wrote: It turns out that what looks like a "w" in your test-url is in fact a cyrillic sha. If I replace "шшш" with "www" the regex and the url-part of the replacement work just fine.It's done intentionally for the post above, because otherwise it would be replaced with a video in the post. So, I just used whatever looks like "w". In any case, it's in the comment 😊 (12 Mar 2023, 23:35 )Thegolor Wrote: the url-part of the replacement work just fine.The problem is - it does not in work in the forum... I wonder if it's related to "&". See, for example, this post: https://www.likera.com/forum/mybb/Thread...3#pid65713 (13 Mar 2023, 00:34 )Like Ra Wrote:Ah. I almost thought that was a bit too easy. 😐(12 Mar 2023, 23:35 )Thegolor Wrote: It turns out that what looks like a "w" in your test-url is in fact a cyrillic sha. If I replace "шшш" with "www" the regex and the url-part of the replacement work just fine.It's done intentionally for the post above, because otherwise it would be replaced with a video in the post. So, I just used whatever looks like "w". In any case, it's in the comment 😊 (13 Mar 2023, 00:34 )Like Ra Wrote:Which version of PHP is the forum running on? Then I could try running it locally tomorrow evening.(12 Mar 2023, 23:35 )Thegolor Wrote: the url-part of the replacement work just fine.The problem is - it does not in work in the forum... I wonder if it's related to "&". And it probably doesn't help too much, but in any case this is my test on regex101.com: https://regex101.com/r/ceeALI/1. I had to remove the percent signs and escape the forward slahes instead. But that can't really be a problem, since it works fine for most of the url and if it were a problem it probably wouldn't work at all. (13 Mar 2023, 01:05 )Thegolor Wrote: Which version of PHP is the forum running on?7.4.33 - still can't migrate to 8.x -- some plugins are abandoned 😕 (13 Mar 2023, 01:05 )Thegolor Wrote: since it works fine for most of the urlExactly... No idea why the &.* part is ignored.
So. I set up a PHP-installation on my computer and tried running your piece of code against that. The bad news? It works. Which leads me to believe that the regex itself is working as intended and something else is causing the problem. But since I'm not at all familiar with myBB and its inner workings, I can only take vague guesses. Sorry that I can't be of more help.
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
[UPDATED] profile picture | Like Ra | 1 | 1,025 |
14 Jul 2024, 01:31 Last Post: Like Ra |
|
[UPDATED] Thank you/Like | Like Ra | 11 | 4,775 |
14 Jul 2024, 01:21 Last Post: Like Ra |
|
[UPDATED] Game section | Like Ra | 53 | 36,530 |
19 Jun 2024, 00:16 Last Post: Like Ra |
|
[UPDATED] feature: list of contributors | Like Ra | 3 | 1,048 |
10 Jun 2023, 23:19 Last Post: Like Ra |
|
[UPDATED] feature - attachment slide show | Like Ra | 22 | 7,549 |
09 Jan 2023, 01:53 Last Post: Bound Whore |