Convert image by domain

Convert image by domain [Paid] 2.3

No permission to buy ($35.00)
In my hosting I don't have Imagemagick PECL extension can I use PHP built-in GD image library ?
 
Hi Andy,

I found a regular expression bug. If two image tags are side by side, even with a space between them, like this:

Code:
[img]https://www.domain.com/image1.jpg[/img] [img]https://www.domain.com/image2.jpg[/img]

The add-on will try to fetch:
Code:
https://www.domain.com/image1.jpg%5B/img%5D%20%5Bimg%5Dhttps://www.domain.com/image2.jpg

The longer the sequence of tags, the longer the url.

I fixed it for my installation, but it's specific to my needs. My fix will not work with urls that have [ in them.
 
Utilizzo "Allegati mirror dai forum". Le foto convertite vanno anche nella categoria Galleria?
Thanks
 
Had an error today but was able to correct it. The image that was linked had a .jpg extension but was actually a .png file. Might want to look at the file type by the header instead of the extension. @AndyB

Code:
Server error log
ErrorException: [E_WARNING] imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with 0x89 0x50 src/addons/Andy/ConvertImageByDomain/Job/ConvertImageByDomain.php:408
Generated by: CJ Jan 10, 2025 at 9:01 PM
Stack trace
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] ima...', '/home/jeepcj/pu...', 408)
#1 src/addons/Andy/ConvertImageByDomain/Job/ConvertImageByDomain.php(408): imagecreatefromjpeg('/home/jeepcj/pu...')
#2 src/XF/Job/AbstractRebuildJob.php(42): Andy\ConvertImageByDomain\Job\ConvertImageByDomain->rebuildById(590597)
#3 src/XF/Job/Manager.php(275): XF\Job\AbstractRebuildJob->run(8)
#4 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#5 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 8)
#6 src/XF/Admin/Controller/ToolsController.php(165): XF\Job\Manager->runQueue(true, 8)
#7 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(Hampel\KnownBots\XF\Admin\Controller\Tools), NULL)
#9 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Hampel\KnownBots\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#12 src/XF.php(806): XF\App->run()
#13 admin.php(15): XF::runApp('XF\\Admin\\App')
#14 {main}
Request state
array(4) {
  ["url"] => string(34) "/community/admin.php?tools/run-job"
  ["referrer"] => string(53) "https://jeep-cj.com/community/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(39) "https://jeep-cj.com/community/admin.php"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(0) ""
  }
}
 
Really not an "Convert image by domain" bug because XF has no control over linked extensions. Easy fix, download and reembed the image then delete the xf_andy_convert_image_by_domain DB entry (or you will have an orphaned manual run task).
This app saves me from fixing all my crazy TapaTalk links. (y)
 
Back
Top Bottom