AbanteCart Community
AbanteCart Development => Extensions and Add-Ons => General Extensions => Topic started by: natdroid on July 04, 2014, 12:47:19 AM
-
in install.php we have
$rm->setType('fonts');
$this->db->query("INSERT INTO ".DB_PREFIX."resource_types (`type_id`, `type_name`, `default_directory`, `default_icon`, `file_types`) VALUES ('10', 'fonts', 'fonts/', 'icon_resource_font.png', '/.+(ttf)$/i');");
in config.xml we have Setting upload font
<item id="text_font">
<type>resource</type>
<resource_type>fonts</resource_type>
</item>
when we try to upload new font image setting show and offcouse Filetype not allowed error >:(
https://www.anonimg.com/img/6318cf615ee29fb1065185354899055f.jpg
HELPPP Final Step to a Great Addon
PS
caching disabled
UPDATE
Bug Report
file admin/controller/pages/extension/extensions.php line 397
array('type' => 'image',
Script HARDCODED :-X
-
you have restriction by filetype inside your database. table resource_types. see the mask? column file_types
-
table got updated. Type fonts added. read the post above and I'm sure you'll understand
in install.php we have
$rm->setType('fonts');
$this->db->query("INSERT INTO ".DB_PREFIX."resource_types (`type_id`, `type_name`, `default_directory`, `default_icon`, `file_types`) VALUES ('10', 'fonts', 'fonts/', 'icon_resource_font.png', '/.+(ttf)$/i');");
-
oh.. you found bug in a core
public_html/admin/controller/pages/extension/extensions.php line 408
there hardcode of type
array('type' => 'image',
as solution i can propose to you use custom setting tpl (look into default_pp_pro config.xml)
<custom_settings_template>pages/extension/default_pp_pro_settings.tpl</custom_settings_template>
inside your own tpl you can set all html-elements what you want including RL
p.s. do not forget to add this tpl into main.php