-
Posts
248 -
Joined
-
Last visited
-
Days Won
5
Everything posted by ukyo
-
Today we have 2 covid-19 case. I live in Turkey (Marmaris). Everything normal at the moment. I work from office.
-
Follow these steps for solve duplicate problem :
-
@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.
-
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
-
Copy / Paste files enough
-
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.
-
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.
-
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.
-
@MilenKo and @LAPS What is your operation system ? Windows ?
-
@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; } }
-
Webhosting in Germany -Any recommendation for Processwire site
ukyo replied to Knubbi's topic in Getting Started
I am using Contabo VPS (Germany) services since 2015 and i can recommend this company to you. -
Where do I store arbitrary data like global info or settings?
ukyo replied to Vigilante's topic in Getting Started
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 -
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 !
-
@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.
-
@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/
-
@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>"; } ?>