-
Posts
4,088 -
Joined
-
Last visited
-
Days Won
88
Everything posted by horst
-
Is the template name of your single blog posts really "home-single"? If not, you also have to change "home-single" in your pages->find selector to the real name of its template (in @diogos code example). Ah, - and welcome to the forums @Mijo.
-
Hi @Gazley, you are speaking of the new core (PW 3) ImageSizerEngineIMagick.module? (Better do not use the old IMagick Sizer module, or, if so, do you stuck with PW 2.7 ?) But to your question: The hirarchy of options is this way, lowest to highest: (higher ones overwrite lower ones) module default (is only there if all others are missing) global setting in wire/config.php (is the distribution default) global setting in site/config.php (can be set to overwrite the distribution default per site) setting in array options, passed to pageimage (overwrites all others) with methods width, height, size If the module has a default of 80, the wire/config.php has 90, the result is 90. If you pass an option with 75 to size(), the resulting quality is 75. Pia is only a wrapper around pageimage, so any option passed to Pia (pageimage), overwrite all other (hirarchically previous) options.
-
PW 3.0.12: Support for extended (UTF8) page names/URLs
horst replied to ryan's topic in News & Announcements
Also, every time if something weird is going on, having a look into the AdminDebugTools Hook-Section is useful (I believe you can call it from within TracyDebug too). Here you may spot if multiple / different modules hook into the same methods, or into "nearly" the same methods, what always has potential to interfere. -
Some of you may have read about it: there are a new core images field in the works for the PW 3 branch. I want to wait until this is released and then update the Croppableimages to sit upon that. I think it will become a new version for PW 3+ only, as there is the current version available for the PW 2 branch. Besides some PW 3 namespace issues there should be implemented changes to work with the new images field in that way, that it only enhances this with the cropbuttons but leave the other UI as is (reuse it). I'm not very good with this UI stuff, so, if I will not be able to do this myself, I will ask here for help on that. If this will be the case, I will provide an intermediate version that works with the PW3 and new image field first. Everyone who can't wait until then should use the slightly hacky upgrade procedure provided by @KentBrockmann and @noodles, two posts above this one.
-
Hhm, for me it is working: D:/ProcessWire/PW-DEV/pw30/htdocs/site/assets/files/1/nikon2208.jpg D:/ProcessWire/PW-DEV/pw30/htdocs/site/assets/files/1/nikon2208.-pim2-pxtd.jpg I used PW 3.0.10 You may look at other modules that work with files and images. Maybe you can create a siteprofile with the exporter or are you able to temporarily disable site-modules in the original site? So, your code is working, the Pim2 is working, but not in your setup. If possible, I would disable all (autoload and file/image-related) modules, and try if it works then. If yes, enable one module after the other, and check if it is working or if it breaks again. Or the other way round: disable one module, check if it changes, if not disable the next one, ..., ... YOu may also first have a look to the Hooks-Section of the Debug Mode Tools in the admin footer to get an overview which modules hook into what, maybe this way you can spot primarily candidates very fast. It all depends on your setup I believe.
-
Oh, sorry! --- --- --- Is $pic->image an imagefield set to hold multiple images or only one image? Please, can you, for debug purposes, output the filename of the variation, instead of adding it to the imagefield? $options = array('outputFormat'=>'jpg','quality'=>70); $originalImage = $pic->image->first(); $pixelateVersion = $originalImage->pim2Load('pxtd',true)->setOptions($options)->width(700)->pixelate(30)->pimSave(); echo "<p>{$originalImage->filename}<br />{$pixelateVersion->filename}</p>";
-
There are no prefixes supported in PW 3. (but suffixes) I assume, you use Pim1? If so, you need to switch to Pim2. Have a read here: https://processwire.com/talk/topic/9982-page-image-manipulator-2/ If this is not the case, please post again.
-
PW 3.0.12: Support for extended (UTF8) page names/URLs
horst replied to ryan's topic in News & Announcements
How do the both templates differ? (besides the names) I haven't used it myself and don't know, but: is there anything that need to be checked in templates to use utf-8 names? -
You mean, if my DBs are different, I cannot use it for syncing without caution? But is it safe if I want to replicate, for example, my local DB to a public site? Or would this only be safe, if I insert the sql dump after I have completly emptied the target DB? That's (something) what you mean, right?
-
for help with the native resizing methods, there is also PIA available
-
The owner of the site is a professional photographer, who needs to show (his) images at its best. And I suppose that his main clients are agencies / artdirectors who uses 30" monitors. Any regular "webimageshrinkingtool" is counterproductive here, I believe.
-
Recommendation: http://modules.processwire.com/modules/process-database-backups/
-
you might not need jquery
-
The dir is 755, but does the owner match the PHP / apache user too? If it is not writeable, you need to make it writeable. This has to do with your servers filesystem settings.
-
modifying $config property (e.g. siteSettings) from ready.php
horst replied to Macrura's topic in General Support
@bernhard: I use SPEX module that has support for this sort of things (and more). If the above really does not work for you, you may have a look into SPEX, how it is done there. It uses two hooks: https://github.com/jdart/Spex/blob/master/Spex.module#L150 & https://github.com/jdart/Spex/blob/master/Spex.module#L170 The relevant parts in the first hook for you are in line 155 157 and 164-165 (the rest is related to a profiler / logging, it is not relevant for you in the initial regard) If you want to try it out or build something own that need to rely on the method getTemplateVars(), please refer to its support thread (or better to the solution here) for a necessary code change when using it with PW 3.0+ -
Module: Spex: An asset and template management module
horst replied to Jonathan Dart's topic in Modules/Plugins
For all followers: A single line (250) needs to be changed to work with PW 3+. $include_fuel ? wire('all')->getArray() : array(), ( see this post: https://processwire.com/talk/topic/12298-update-273-to-308-processwiregetarray-does-not-exist/#entry114410 ) -
It does: $mail = wireMail(); $mail->attachment($filename); // string $filename or array $filenames what means: you can add any single file path as a string with the attachment() method, or you can add multiple files at once with its pathes stored in an array. Everything else, e.g. how you submit your form and / or upload the files, does not belong to WireMailSmtp. For this, you may find information and examples on php.net.
-
@kiennguyen1101: Very good findings! Looks good. And thanks for sharing!
-
You are calling $sanitizer in the scope of a custom function. There you need to call it with wire("sanitizer")->pageName(), or, if you need it multiple times in your function: $sanitizer = wire("sanitizer"); and afterwards you can use $sanitizer->pageName(). This behaves the same with all PW template vars, like: $config, $pages, $templates, $sanitizer, $session, ...
-
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP/1.1 200 OK Date: Thu, 24 Mar 2016 01:50:48 GMT Content-Type: text/html; charset=UTF-8
- 29 replies
-
- 1
-
-
- issues
- processwire forum
-
(and 4 more)
Tagged with:
-
you may look here: https://processwire.com/talk/topic/7850-user-admin-rolesthat-can-only-add-new-users-with-certain-roles/ You will need hook into before page::save and check if it should be a new user page, and if yes, if the current user has the right permissions or role.
-
For what do they have the permission user-admin-customer?
-
Looks like the server overwrite your setting after wiremail sends it. You need to refer to your server settings and change them.
-
If you haven't, you can read a bit in the docs here: https://processwire.com/api/modules/ Depending on what your module / class has extended, you may also use $this->pages->find() And if you use procedural functions, you can use function myFunction() { $pages = wire('pages'); $pages->find(); ...
-
The future: grid layout and flexbox (use it today with polyfill)