ukyo Posted December 3, 2015 Author Share Posted December 3, 2015 Hi! Awesome Module (pun intended) This would turn out very usefull for my next project, However I get some strange behaviour when leaving an edit page without changing anything on the icon. It gives me a confirm box saying there is unsaved content (see attachment). Does anybody have the same behaviour or knows what I do wrong here? Thanks for any suggestion. Sascha Hi ukyo, did you find anything? Great extension! Very useful for a project of mine, thank you! I have the same problem as saschapi. I save my page. Next I want to leave, I get a browser message (firefox) telling me that I have unsaved data. Google translation from German: "This page asks you to confirm that you want to leave the page - data you have entered will not be saved under certain circumstances." I updated module, on my side i don't have this issue anymore ! Updated many things and changed methods for loading icon list etc.. Next step is use other font icons ! 3 Link to comment Share on other sites More sharing options...
gebeer Posted December 4, 2015 Share Posted December 4, 2015 @ukyo Thank you for updating your great module. The update is not visible in ProcessUpgrade module so I would have to update manually. Is this intended? My installed version is 0.0.7. Your github commit message for the module file itself says "FontAwesome updated to 4.4.0 and module updated to 0.0.7". Shouldn't this be updated to 0.0.8 so that the ProcessUpgrade module can know that a new version is available? Link to comment Share on other sites More sharing options...
ukyo Posted December 4, 2015 Author Share Posted December 4, 2015 @ukyo Thank you for updating your great module. The update is not visible in ProcessUpgrade module so I would have to update manually. Is this intended? My installed version is 0.0.7. Your github commit message for the module file itself says "FontAwesome updated to 4.4.0 and module updated to 0.0.7". Shouldn't this be updated to 0.0.8 so that the ProcessUpgrade module can know that a new version is available? Sorry i missed to update Fieldtype and Markup versions. But you need to wait for PorcesswireModuleDirectory update repos or you can make update by downloading files from github. 1 Link to comment Share on other sites More sharing options...
adrian Posted December 4, 2015 Share Posted December 4, 2015 Sorry i missed to update Fieldtype and Markup versions. But you need to wait for PorcesswireModuleDirectory update repos or you can make update by downloading files from github. You can always edit your module in the modules directory - simply open the edit mode and save - it will query Github and update the version number which will then make it available via the Upgrade module instantly. 1 Link to comment Share on other sites More sharing options...
ukyo Posted December 4, 2015 Author Share Posted December 4, 2015 Updated module on dev branch.New features for v.0.0.9 dev branch : Added hook method ___beforeRender(), you can check hook example for usage Added multiple icons library use option Added Ionicons Library Now module using cdn for load icon fonts Also if you need custom icon font options you can use berforeRender hook ! After some test i will update also master branch. if you want to make test, you need to download and update it manually. 3 Link to comment Share on other sites More sharing options...
saschapi Posted December 5, 2015 Share Posted December 5, 2015 The 0.0.8 version works well for me! The error mentioned above is gone! Thank you very much!!! Link to comment Share on other sites More sharing options...
gebeer Posted December 6, 2015 Share Posted December 6, 2015 I can also confirm that the error is gone with 0.0.8 on PW 2.7.0. Thank you very much Link to comment Share on other sites More sharing options...
videokid Posted December 22, 2015 Share Posted December 22, 2015 Hi, I thought I'd try this module, but I got the following error: Parse Error: syntax error, unexpected '[' (line 157 of /public_html/dev/site/modules/FieldtypeFontIconPicker/InputfieldFontIconPicker.module) PW 2.7.1 ------------------ Edit: sorry, read the whole thread, seems dev-branche is working... Kind regards. Link to comment Share on other sites More sharing options...
ukyo Posted December 22, 2015 Author Share Posted December 22, 2015 Your PHP version not supporting new array syntax, this is why you have this error message. I updated module to ve 0.1.0 now i think module fully supporting old php versions. New features for v.0.1.0 : Custom CSS file url support Added hook method ___beforeRender(), you can check hook example for usage Added multiple icons library use option Added Ionicons Library Now module using cdn for load icon fonts 1 Link to comment Share on other sites More sharing options...
jploch Posted August 25, 2016 Share Posted August 25, 2016 Hi! Thx for this cool module! I want to use this with a costum Icon-Set and need some help. I did put an URL in the custom css field, but my Icons dont show up in the backend. Is there anything else I have to do to get this to work? Link to comment Share on other sites More sharing options...
ukyo Posted August 25, 2016 Author Share Posted August 25, 2016 37 minutes ago, jploch said: Hi! Thx for this cool module! I want to use this with a costum Icon-Set and need some help. I did put an URL in the custom css field, but my Icons dont show up in the backend. Is there anything else I have to do to get this to work? css section is only for styling, you need to tell module what is your list of icons names ? You need hook beforeRender event like on example. https://github.com/trk/FieldtypeFontIconPicker You can create a file like : https://github.com/trk/FieldtypeFontIconPicker/blob/master/Icons/Ionicons.php and you can include this file in your hook function, after include you can return your custom icons. Link to comment Share on other sites More sharing options...
jploch Posted August 25, 2016 Share Posted August 25, 2016 Thx for your quick reply! I made a custom.php file in MarkupFontIconPicker/Icons/ Now I have this in the admin.php in templates folder: wire()->addHook('InputfieldFontIconPicker::beforeRender', function($event) { if(!$event->return) return; // Get Input Name (For specified input hook, if you want apply all InputfieldFontIconPicker remove inputName check) $inputName = ""; if(isset($event->object->attributes['name'])) $inputName = $event->object->attributes['name']; // Get Input Name (For specified input hook, if you want apply all InputfieldFontIconPicker remove inputName check) if($inputName == 'icon_picker') { /** * Load your custom icons function file * Your array need to be same format with Icons/FontAwesome.php or Icons/Ionicons.php * Also you can pass directly an array */ wireIncludeFile('http://projekte.janploch.de/fabricius/site/modules/MarkupFontIconPicker/Icons/custom.php'); // Set icons as $icons variable $icons = MyCustomIconsArray(); // Set your options $return = array( 'attributes' => array( 'category' => '', 'theme' => 'fip-grey', 'empty-icon' => 1, 'empty-icon-value' => '', 'icons-per-page' => 20, 'has-search' => 1 ), 'icons' => $icons ); // Return the event $event->return = $return; } $event->return; }); In the Backend only the FontAwesome and Ionicicons library is showing. Custom File looks like this: <?php function InputfieldFontIconPickerIcons() { $icons = array( 'title' => 'Custom', 'version' => '2.0.1', 'css' => 'http://projekte.janploch.de/fabricius/site/templates/fonts/icomoon/style.css', 'categorised' => false, 'prefix' => 'icon-icon-', 'icons' => array( 'doctor', 'kita' ) ); return $icons; } Link to comment Share on other sites More sharing options...
blackeye1987 Posted November 14, 2016 Share Posted November 14, 2016 hey there great module, but i have kind of an issue with it: on creating a repeaterMatrix element with an icon-picker, i get a dropdown (create.PNG) after closing the element and reopening it (with the little arrow on the right side) i get the icon picker. (closeReopen.PNG) it seems so random, that i can't find an explanation for it. ever got this issue ? Link to comment Share on other sites More sharing options...
ukyo Posted February 1, 2017 Author Share Posted February 1, 2017 v.0.1.3 : FontAwesome updated to 4.7.0 Link to comment Share on other sites More sharing options...
ukyo Posted February 1, 2017 Author Share Posted February 1, 2017 v.0.1.4 : Fix issue FontIconPicker inside repeater 1 Link to comment Share on other sites More sharing options...
ukyo Posted April 19, 2017 Author Share Posted April 19, 2017 After @ryan broke my hearth here i added uikit icon support to my font icon picker module v.0.1.6 Fix FieldtypeFontIconPicker sanitizeValue() v.0.1.5 Added uikit icon select support (required AdminThemeUikit), because uikit icons not working standalone. 3 Link to comment Share on other sites More sharing options...
Roych Posted August 12, 2017 Share Posted August 12, 2017 Hello, I'm having this z-index problem within repeater any ideas how to solve this? I searched the forum but no luck. Outside repeater it works fine! Thank you R Link to comment Share on other sites More sharing options...
mr-fan Posted June 30, 2018 Share Posted June 30, 2018 Hi ukyo, thank you very much for this one - works like a charm! I've set an additional library direct in the module, and all settings loaded right. Is it possible to use a relative own CSS path...i've a icomoon set of licensed IconMind Icons...so i have to host them selve... Kind Regards mr-fan Link to comment Share on other sites More sharing options...
mr-fan Posted June 30, 2018 Share Posted June 30, 2018 All things sorted... everything is working fine! Got this working with icomoon iconset - Thank you for your work on this! Link to comment Share on other sites More sharing options...
mr-fan Posted June 30, 2018 Share Posted June 30, 2018 One Thing is missing . This Fieldtype is not working with RepeaterMatrix. Could anybody jump in and could point me what i've to change that RepeaterMatrix could show the inputfield right...or is this something related to RepeaterMatrix itself? Issue is that while adding a new item the scripts are not loaded...if i save all works again... Link to comment Share on other sites More sharing options...
Brian Scramlin Posted March 12, 2019 Share Posted March 12, 2019 I am getting an error on line 21 for PW version 3.0.89 upon install. Something about the method needing the abstract keyword. Link to comment Share on other sites More sharing options...
RicknRoller Posted May 15, 2019 Share Posted May 15, 2019 On 8/25/2016 at 5:52 PM, jploch said: In the Backend only the FontAwesome and Ionicicons library is showing. I am struggling at the exact same spot. How did you get further? @jploch did you figure it out? Link to comment Share on other sites More sharing options...
ukyo Posted November 25, 2019 Author Share Posted November 25, 2019 Module update to v2. Now it's possible to add or extend existing icon library via config file. Please check first post for example usage. Note: Hook method removed ! 2 Link to comment Share on other sites More sharing options...
MilenKo Posted January 11, 2020 Share Posted January 11, 2020 Hello @ukyo I've been using your module for a project that I gradually develop and it was working great up until today when I upgraded to version 2.0 through the module upgrade checker and upgrader. After the upgrade while trying to return to the admin page, I got this error: Compile Error: Cannot declare class MarkupFontIconPicker, because the name is already in use (line 10 of ..\site\assets\cache\FileCompiler\site\modules\MarkupFontIconPicker\MarkupFontIconPicker.module) This error message was shown because: site is in debug mode. ($config->debug = true; => /site/config.php). Error has been logged. As soon as I disable the module, the admin is back to normal again. I've tried to re-install the module manually and it seems to be working but I did not test it yet extensively so will do and report back. Link to comment Share on other sites More sharing options...
LAPS Posted February 20, 2020 Share Posted February 20, 2020 Hi @ukyo, I've upgraded to ProcessWire 3.0.148. Now, in the Edit Field > Input > Icon library select field the libraries (IconPicker.*.php) are not more loaded. In the error logs, similarly to @MilenKo, I get: Compile Error: Cannot declare class MarkupFontIconPicker, because the name is already in use (line 10 of /.../home/site/assets/cache/FileCompiler/site/modules/FieldtypeFontIconPicker/MarkupFontIconPicker.module) I tried to re-install the module without success: things do not work anymore. So, I had to disable the module. Any help? Any news? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now