Jump to content

ukyo

Members
  • Posts

    247
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by ukyo

  1. ukyo

    COVID-19

    Today we have 2 covid-19 case. I live in Turkey (Marmaris). Everything normal at the moment. I work from office.
  2. Follow these steps for solve duplicate problem :
  3. Next version merged with master branch. Image field removed from example 😞 sorry about that. Module updated.
  4. Image & File fields are not supported yet, i will check these fields later. Feel free to play with module for add support 🙂
  5. Thanks @bernhard, I updated module with same finder function used on FontIconPicker module. I am using dirname function for getting module or templates folder names from file path. "Example : Dive" is title of config, "(mystique)" is name of module folder
  6. @LAPS @J_Szwarga i updated config file finder and pushed new version of module. You can update your module ! Please let me know if you have same issue. @bernhard i updated finder https://github.com/trk/FieldtypeFontIconPicker/blob/master/FieldtypeFontIconPicker.module#L46 as your recommend, if it success on this module. i will apply same function for my Mystique module.
  7. I added prev brach on github repo, this repo is previous version of module, you can use it. I will try to fix your problem, but let me know your server or computer software versions. https://github.com/trk/FieldtypeFontIconPicker/tree/prev
  8. Module working, but not on your side 😞. I created a next branch on github repo can you download next branch and test it ? https://github.com/trk/FieldtypeFontIconPicker/tree/next After install module be sure, refresh modules and clear compiler cache.
  9. How to use core files()->find() function like php glob() function ? https://github.com/trk/FieldtypeFontIconPicker/blob/master/FieldtypeFontIconPicker.module#L50 If you don't have custom icons inside templates folder result look like ok.
  10. Can you check paths are true on your server ? on this line : https://github.com/trk/FieldtypeFontIconPicker/blob/master/FieldtypeFontIconPicker.module#L43 @bernhard have similar error with my other Mystique module Repo function line : https://github.com/trk/Mystique/blob/next/Mystique.module.php#L88 I can't find the issue. On my mac (macos mojave with valet (php 7.4.3)) and on my server (centos 7.7 with php (7.3)) i can't see this issue.
  11. @MilenKo and @LAPS What is your operation system ? Windows ?
  12. @bernhard i don't have a Windows PC and can't test it, Can you try to change ready function for next branch : public function ready() { $path = $this->wire("config")->paths->siteModules . "**/configs/Mystique.*.php"; $path .= "," . $this->wire("config")->paths->templates . "configs/Mystique.*.php"; foreach (glob("{" . $path . "}", GLOB_BRACE) as $file) { $dirname = dirname(dirname($file)); $base = strtolower(str_replace([dirname(dirname(dirname($file))), "/"], "", $dirname)); $name = str_replace([dirname($file), "/", "Mystique.", ".php"], "", $file); $this->resources[$base][$name] = $file; } } with public function ready() { $path = $this->wire("config")->paths->siteModules . "**" . DIRECTORY_SEPARATOR . "configs" . DIRECTORY_SEPARATOR . "Mystique.*.php"; $path .= "," . $this->wire("config")->paths->templates . "configs" . DIRECTORY_SEPARATOR . "Mystique.*.php"; foreach (glob("{" . $path . "}", GLOB_BRACE) as $file) { $dirname = dirname(dirname($file)); $base = strtolower(str_replace([dirname(dirname(dirname($file))), DIRECTORY_SEPARATOR], "", $dirname)); $name = str_replace([dirname($file), DIRECTORY_SEPARATOR, "Mystique.", ".php"], "", $file); $this->resources[$base][$name] = $file; } }
  13. Hi @bernhard Can you try @next branch https://github.com/trk/Mystique/tree/next, this will be next version.
  14. I am using Contabo VPS (Germany) services since 2015 and i can recommend this company to you.
  15. Yes, it's possible to do these kind of stuff. Create 1 Mystique field and do what you want with that field. Mystique config files Mystique seo configs Mystique admin edit for seo configs
  16. 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 !
  17. @bernhard Thank you ! I fixed repo and thread broken images. Module allow you to add custom icons via hook and maybe i can or someone can add support for config file support like my Mystique module. I didn't add Font Awesome 5 support, because when you load FontAwesome 5 assets, it's breaking admin icons.
  18. @bernhard Nice work ! But, in module directory i have a module for pick icons. I hope you see it, before writing an icon picker. https://modules.processwire.com/modules/fieldtype-font-icon-picker/
  19. @neophron Always using this method may cause headache for you. What about add this method as property for each image field and use it like $imageField->alt. We need to add a hook method. Add hook method to existing /site/ready.php or create new /site/ready.php, copy below code and paste it in to /site/ready.php : /site/ready.php <?php namespace ProcessWire; wire()->addHookProperty('Pageimage::alt', function(HookEvent $event) { /* @var $image Pageimage */ $image = $event->object; $event->return = $image->description ?: str_replace('.' . $image->ext, '', $image->basename); }); Usage ($imageField->alt) : <?php foreach($page->images_slider as $image) { $slide = $image->size(0,700); echo "<li class='uk-width-3-4'>"; echo "<img class='photo' src='{$slide->url}' alt='{$image->alt}' width='{$slide->width}' height='{$slide->height}' />"; echo "</li>"; } ?>
  20. @neophron A solution about using filename as image alt info. You can try code below : <?php foreach($page->images_slider as $image) { $slide = $image->size(0,700); $alt = $image->description ?: str_replace('.' . $image->ext, '', $image->basename); echo "<li class='uk-width-3-4'>"; echo "<img class='photo' src='{$slide->url}' alt='{$alt}' width='{$slide->width}' height='{$slide->height}' />"; echo "</li>"; } ?>
×
×
  • Create New...