ABBC3 editor not in some extenstions - Advanced BBCode Box
ABBC3 editor not in some extenstions
Thanks!
- nhseacoast
- Registered User
- Posts: 625
- Joined: Sun Sep 22, 2002 10:31 pm
- Location: NH, USA
- Contact:
Re: ABBC3 editor not in some extenstions
I've tested this extention in combination with my download extension and can see all icons after modify the bbcode-display-controller with the following small but quick and dirty fix.
Please do not use "global" in live boards! Better modify the service.yml to add the phpbb_container object here!
To fix thie error for testing find in /ext/vse/abbc3/core/bbcodes_display.php
Code: Select all
if (empty($icons))
{
$finder = $this->extension_manager->get_finder();
$icons = $finder
->set_extensions(['vse/abbc3'])
->suffix(".{$this->config['abbc3_icons_type']}")
->extension_directory('/images/icons')
->core_path('images/abbc3/icons/')
->get_files();
// Rewrite the image array with img names as keys and paths as values
foreach ($icons as $key => $path)
{
$icons[basename($path, ".{$this->config['abbc3_icons_type']}")] = $path;
unset($icons[$key]);
}
}
return $icons;
}
Code: Select all
if (empty($icons))
{
global $phpbb_container; // <<- DO NOT USE THIS IN LIVE BOARDS! THIS IS JUST FOR TESTING AT THIS POINT!!
$ext_path = $this->extension_manager->get_extension_path('vse/abbc3', true);
$ext_path_web = $phpbb_container->get('path_helper')->update_web_root_path($ext_path);
$finder = $this->extension_manager->get_finder();
$icons = $finder
->set_extensions(['vse/abbc3'])
->suffix(".{$this->config['abbc3_icons_type']}")
->extension_directory('/images/icons')
->core_path('images/abbc3/icons/')
->get_files();
// Rewrite the image array with img names as keys and paths as values
foreach ($icons as $key => $path)
{
$path = $ext_path_web . 'images/icons/' . basename($path);
$icons[basename($path, ".{$this->config['abbc3_icons_type']}")] = $path;
- oxpus
- Registered User
- Posts: 25
- Joined: Mon Feb 03, 2003 11:43 am
- Location: D - Bad Wildungen
- Name: Karsten Ude
- Contact: