s9e Media BBCodes pack

s9e Media BBCodes pack 20231102

No permission to download
Oh, thanks for the explanation. I'll go play with this some more.
I added the code blocks so you could see the actual link I was pasting. The links were pasted outside of code blocks below.

I really love this and appreciate your efforts and speedy responses!
 
Giphy is not supported? :D

I posted about Giphy a little while ago. Their API has some requirements that may be impossible to fulfill reasonably. I tried to contact them by mail but they never responded. I guess I could implement it without using their API, I'm not sure what's best.

I must be installing this incorrectly. It keeps bombing out entirely. I can't embed any links whatsoever, including YouTube.

Had to revert. Any suggestions, @JoshyPHP

Do you receive any PHP errors? Are there any errors in your server logs? Do you have a recent version of XenForo and PHP? Did you upload the PHP file to the correct directory before installing with the XML file? Did you install manually or using a third-party installer? I recommend installing it manually.
 
I posted about Giphy a little while ago. Their API has some requirements that may be impossible to fulfill reasonably. I tried to contact them by mail but they never responded. I guess I could implement it without using their API, I'm not sure what's best.



Do you receive any PHP errors? Are there any errors in your server logs? Do you have a recent version of XenForo and PHP? Did you upload the PHP file to the correct directory before installing with the XML file? Did you install manually or using a third-party installer? I recommend installing it manually.

heres the error and trace:

ErrorException: preg_match(): Compilation failed: unrecognized character after (? at offset 22 - library/XenForo/Helper/Media.php:71

Code:
#0 [internal function]: XenForo_Application::handlePhpError(2, 'preg_match(): C...', '/html/library...', 71, Array)
#1 /html/library/XenForo/Helper/Media.php(71): preg_match('!8tracks\\.com/[...', 'https://www.you...', NULL)
#2 /html/library/XenForo/Helper/Media.php(39): XenForo_Helper_Media->_convertMediaLinkToEmbedHtml('https://www.you...', Array)
#3 /html/library/XenGallery/ControllerPublic/Media.php(2357): XenForo_Helper_Media::convertMediaLinkToEmbedHtml('https://www.you...')
#4 /html/library/XenForo/FrontController.php(351): XenGallery_ControllerPublic_Media->actionPreviewVideo()
#5 /html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /html/index.php(13): XenForo_FrontController->run()
#7 {main}
 
The PCRE version we're running is 6.6 (stuck on an older Centos 5.11 Box atm*, which was released around 2006 (yikes).

I think the minimum version required should be version 7.0 (19-Dec-06), the first one to support named groups using the Perl 5.10 syntax. The version of the add-on I attached above may work with PCRE as old as version 4.0 (17-Feb-03) although I have no way to verify this.

Let me know if that version works on your Centos box and if it does I'll keep those changes in future updates.
 
I think the minimum version required should be version 7.0 (19-Dec-06), the first one to support named groups using the Perl 5.10 syntax. The version of the add-on I attached above may work with PCRE as old as version 4.0 (17-Feb-03) although I have no way to verify this.

Let me know if that version works on your Centos box and if it does I'll keep those changes in future updates.

It looks stable for now. No errors being registered in XenForo and the embedding looks to work well.

The latest stable version of PCRE I could find for Centos 5.11 is 6.6.

http://rpmfind.net/linux/rpm2html/search.php?query=pcre&submit=Search+...&system=centos&arch=
 
Really appreciate the add in mate- top work.
I just updated the add in due to upgrade to latest Xenforo and everything except Imgur appears ok.
If i try and embed imgur i get this:

ErrorException: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set -library/s9e/MediaBBCodes.php:885


#0 [internal function]: XenForo_Application::handlePhpError(2, 'curl_setopt() [...', '/var/www/vhosts...', 885, Array)
#1 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/s9e/MediaBBCodes.php(885): curl_setopt(Resource id #11, 52, 1)
#2 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/s9e/MediaBBCodes.php(863): s9e_MediaBBCodes::wgetCurl('http://imgur.co...')
#3 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/s9e/MediaBBCodes.php(1002): s9e_MediaBBCodes::wget('http://imgur.co...')
#4 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/s9e/MediaBBCodes.php(736): s9e_MediaBBCodes::scrape('http://imgur.co...', Array, Array)
#5 [internal function]: s9e_MediaBBCodes::match('http://imgur.co...', 'P2q65', Array, 'imgur')
#6 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/XenForo/Helper/Media.php(107): call_user_func_array(Array, Array)
#7 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/XenForo/Helper/Media.php(73): XenForo_Helper_Media->_getMediaKeyFromCallback('http://imgur.co...', 'P2q65', Array, 'imgur')
#8 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/XenForo/Helper/Media.php(39): XenForo_Helper_Media->_convertMediaLinkToEmbedHtml('http://imgur.co...', Array)
#9 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/XenForo/ControllerPublic/Editor.php(32): XenForo_Helper_Media::convertMediaLinkToEmbedHtml('http://imgur.co...')
#10 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Editor->actionMedia()
#11 /var/www/vhosts/oigorgeous.com/httpdocs/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /var/www/vhosts/oigorgeous.com/httpdocs/forum/index.php(13): XenForo_FrontController->run()
#13 {main}
 
Top Bottom