-
Posts
286 -
Joined
-
Last visited
-
Days Won
8
Everything posted by ukyo
-
Thanks for quick response. It look like ok now. I tested it with default (3) ready to use fields.
-
I have problem with image field inside repeater. Firstly i think its caused from ProcessWire core but ryan checked issue and issue cause from this module. You can see issue details in here : https://github.com/ryancramerdesign/ProcessWire/issues/1541
-
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.
-
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.
-
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 !
-
Sorry i am to busy with work and i know the issue. I think this issue appear, because fonticonpicker js library changing the processwire field attributes. I will do one more hidden field for fonticonpicker js attributes and after done i will update processwire field. Started to work on it. Thanks for interest !
-
Both (with your module and with my module) used default quality option "90" and GD library used. Didn't test "Imagick" Library yet but it must work, if extension is installed. I checked difference between "Imagick" and "GD" there not much difference about file sizes. Comments about "Imagick" quality is much better for compression than "GD".
-
I wrote my own module. Because, I have a project need to finish it quickly. On my side file sizes are important. With your module. if you apply watermark file sizes going up (this is normal but x2 size up, not normal) On the screenshots you can see the results. If you want have a look to my module here is a link : https://processwire.com/talk/topic/11318-avbimage/ And on attachment you can see my module result :
-
Use an images field on your template and if you have a field with ckeditor there is an image icon click it and you will see uploaded images to your page. Select image and make your align left, right or center. Save the page After you did these steps add class to your css file about alignments you can find sample css codes here : https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/templates-admin/styles/main.css#L432 Also if you add description on your uploaded image, alt tag will be appear with your description.
-
uikit Dropdown "Navbar modifier" menu converted to ProcessWire
ukyo replied to Christophe's topic in General Support
Can you try this : /** * Uikit Navbar Navigation * * @param $items * @param array $templates * @param string $tag * @param int $maxDepth * @return string */ function renderNavigation($items, $templates=[], $tag="", $maxDepth=0) { $templates = (!empty($templates)) ? $templates : []; $currentPage = wire('page'); $output = ($tag!="") ? "\n<div class='uk-dropdown uk-dropdown-navbar'><$tag class='uk-nav uk-nav-navbar'>" : ""; foreach($items as $item) { $class = []; $dropdown = ""; $hasChild = FALSE; $url = $item->url; $caret = ""; $filter = ""; if(! empty($templates) && !in_array($item->template, $templates) && $maxDepth) { $filter = "template!="; $x=1; foreach($templates as $template) { $i=$x++; $separator = ($i!=count($templates)) ? "|" : ""; $filter .= $template.$separator; } if($item->numChildren($filter) > 0) { $hasChild = TRUE; $class[] = 'uk-parent'; $url = '#'; $dropdown = " data-uk-dropdown"; $caret = " <span class='uk-icon-angle-down'></span>"; } } // Set Active Class ! if($currentPage->id == $item->id || $currentPage->parents("id=$item->id,template!=home")->count() > 0) $class[] = 'uk-active'; $class = (!empty($class)) ? " class='" . implode(' ', $class) . "'" : ""; $output .= "\n<li{$class}{$dropdown}><a href='{$url}' title='{$item->title}'>{$item->title}{$caret}</a>"; if($hasChild) $output .= renderNavigation($item->children($filter), $templates, "ul", $maxDepth-1); $output .= "\n</li>"; } $output .= ($tag!="") ? "\n</$tag></div>" : ""; return $output; } // Usage : $homepage = $pages->get(1); $navigation = renderNavigation($homepage->and($homepage->children), array("don't", "display", "these templates", "children"), "", 1); echo "\n<nav class='uk-navbar'> \n\t<ul class='uk-navbar-nav uk-hidden-small'> \n\t\t{$navigation} \n\t</ul> \n</nav>"; -
Check example codes on profiles come with ProcessWire. Here is an example about getting language code from homepage url : https://github.com/ryancramerdesign/ProcessWire/blob/dev/site-languages/templates/_main.php#L53
-
AvbImage - Image Manipulator Module for ProcessWire This module using Intervention Image PHP image handling and manipulation library. Update Status Module and InterventionImage Library update - 10-12-2015 More performance imporements - 18-11-2015 Module Update and Performance Improvements - 17-11-2015 First Commit - 28-10-2015 RequirementsProcessWire >= 2.5.11 PHP >=5.4 Fileinfo Extension Supported Image LibrariesGD Library (>=2.0) Imagick PHP extension (>=6.5.7) For usage and methods please look githup repo : README.md > For issues and fix and corrections please use Githup Repo
-
On my side, i tested some methods for add resized or watermarked images to variations for admin panel : If i change your suffix and if i use variation name like ProcessWire (width x height) : // From $suffix = "-pim2-{$suffix}"; // To $suffix = ".pim2.{$suffix}"; // And making watermarking by use variation like ProcessWire // Watermark from original $dImage = $image->pim2Load("{$image->width}x{$image->height}")->watermarkLogo($wmPath, 'c', '2')->pimSave(); // Create medium size from original with watermark $mImg = $image->pim2Load("1130x500")->resize(1130, 500)->watermarkLogo($wmPath, 'c', '2')->pimSave(); // Use medium size for resize (will be watermarked making only resize) $mImg = $mImg->size(750, 300); Created files on disk : Here created variations : Original Size Watermarked Medium Size Watermarked I am not displaying original image. Displaying watermarked and sized images. Like this if i delete images from admin panel delete image and variations, clean work. Now the problem is file sizes as you see on my screen shot. Order : Original Image - Watermarked from Original image - Resized from watermarked original image Edited: File sizes screenshot added.
-
You are right but I can't see variations on admin panel. This is why i am resizing original image again with same width.
-
Thank you for this Great Module ! I stuck with variations. Without resize image by using ProcessWire api variations not working. If i use ProcessWire sizing api with pim2Load function there are many files (no need them). What i want to do : 1- Make a duplicate from original and keep original 2- Apply watermark to duplicated image 3- If result is fine for resize size, use this image for resizing (OR) resize from original and apply watermark, but don't make duplicates (for better watermark result) 4- See variations on admin panel, if i delete all images or specified image, delete all variations. (Deletion not working with below codes, if i delete image on filesystem i can see all watermarked images) // Also i tried with pim2Load('wmi')->stepResize(image->width)->watermarkLogo($wmPath, 'c', '2')->pimSave(); $duplicateAndWatermarkOriginal = $image->pim2Load('wmi')->watermarkLogo($wmPath, 'c', '2')->pimSave(); // Create a small sized 1130x500px // Also i tried with pim2Load('wmi')->stepResize(1130, 500)->watermarkLogo($wmPath, 'c', '2')->pimSave(); $smallFromDuplicated = $duplicateAndWatermarkOriginal->size(1130, 500); Watermarked images is working and not regenerating them. Also i added a log message to your class. For check whats happened. if('page'==$this->entryItem) { $this->message("pageImage setFilename, setOriginal, targetFilename :: {$targetFilename}", Notice::log); $pageimage = clone $this->pageimage; $pageimage->setFilename($targetFilename); $pageimage->setOriginal($this->pageimage); return $pageimage; } And i can have logs messages. Sometimes i can see variations count going up (from 2 variations to 4 variations) on list view of images but when i click variations its going down (from 4 variations to 2 variation) and on the list created images not appear. Now i am running script like this and variations are working : // Duplicated from original (same size), and apply watermark (here we have 2 original size without watermark and 1 with watermark) $dImage = $image->size($image->width)->pim2Load('wmi')->watermarkLogo($wmPath, 'c', '2')->pimSave(); // Create small size from $dImage already watermarked (not have a duplicate ) $sSizeImage = $dImage->size(1130, 500); // If i want to create from original again (we have one more duplicate) $sSizeFromOriginal = $image->size(1130, 500)->pim2Load('wmismall')->watermarkLogo($wmPath, 'c', '2')->pimSave();
-
After several years use Twitter Bootstrap changed my front-end framework. What i tried : - Materializecss - Google Web Starter Kit - Foundation - Yahoo Purecss - Some other frameworks and some of other twitter bootstrap things I found Uikit, it's has simple and effective solutions. Many time you don't need extra js libraries and design is clean (this is important for me).
-
Thanks, I will check this.
-
Nice work @Mike Rockett ! I am using my own FormBuilder generally, a config file based form builder Six months ago i created a git repo uploaded files but can't finalize it. If you interest and want to check it maybe you can use some useful things : https://github.com/trk/AvbFormBuilder It has a validation library and google re-captcha support. Some of features : - Form generation - Mail send - Validation - Re-captcha support - Template support for custom input elements - etc.. Its working on my side but need to make it better.
-
I am busy with other projects and didn't check it again but i will check it. For the moment i don't have a solution.
-
Module FrontendUser: login, logout and register users / members
ukyo replied to pwFoo's topic in Modules/Plugins
You can test recacptcha also on localhost ! But be sure you are using virtual host or when you create a key be sure there is your local domain also added. -
Module FrontendUser: login, logout and register users / members
ukyo replied to pwFoo's topic in Modules/Plugins
Can you try it like : wire('modules')->get('FrontendUser')->form->fhSubmitBtn->error('reCAPTCHA validation not ok!'); And also you can use loaded modules or variables like this : $form->addHookAfter('processInput', function() use($fu, $recaptcha, $input) { $recaptchaverify = $recaptcha->verifyResponse($input->post('g-recaptcha-response')); if(!$recaptchaverify) { $fu->form->fhSubmitBtn->error('reCAPTCHA validation not ok!'); } }); -
Module FrontendUser: login, logout and register users / members
ukyo replied to pwFoo's topic in Modules/Plugins
I see hook function now, its ok but be sure there is wire('modules')->get('FrontendUser')->fhSubmitBtn->error(); function exist. -
Module FrontendUser: login, logout and register users / members
ukyo replied to pwFoo's topic in Modules/Plugins
You loaded recacptcha module : $recaptcha = $modules->get('Recaptcha'); No need to reload module : $recaptchaverify = wire('modules')->get('Recaptcha')->verifyResponse(wire('input')->post('g-recaptcha-response')); You can use it like : $recaptchaverify = $recaptcha->verifyResponse(wire('input')->post('g-recaptcha-response')); and same for frontenduser module is there a funtion $fu->fhSubmitBtn->error() ? I didn't use and check module codes or usages be sure there is a function exist... Error mean there is no function exist ! -
ProCache is a paid version cache module ! Do not compare this free module with paid modules but if you know how to extend module you can do it like ProCache or better than it ! Build-in cache module is only support database cache, on the templates side its support files cache but you can't use it for custom uses. I used both of them there is no place for expire time set option, cached data info or clear cache section etc.. If you check phpfastcache offical website you will see advantages of using this module. For example you can use multiple cache drivers in same time with different options or you can set a default options for use any where. You can set expire date, you can clear cached data (for files, sqllite drivers), and you can set the what need to do after a page modified etc..... Here is my website : http://altivebir.com/ using this cache module.
-
I updated Hook for ProcessPageSort::execute function and added some useful options. Now you have options for sorted pages.