-
Posts
4,088 -
Joined
-
Last visited
-
Days Won
88
Everything posted by horst
-
Ivan, you should have a look into the sites/assets/cache folder. If you can find a file there called LazyCronLock.cache, it is a sign that LazyCron once has started, but get not finished. To see when it has started, you may have a look to file date lastmodified, or look into it, it only contains a unixtimestamp. The reason(s) why it doesn't get finished could be that a script gots crashed / interrupted badly, - that a script is running in an endless loop, - or something that like.
-
. Hhm, hard to believe. It uses the same functions and params as you can use with the core ImageSizer. . . . . The PiM is a bit outdated. The function you suggested is missing, I know. But I have no time at the moment to work on this. . . . . The core ImageSizer does not support canvas. But there is one other API-level ImageTool available: Pia. With it you can use $image->contain(), what reduces both sizes (width and height) to fit into given boundaries. .
-
Maybe you should post also into that module thread to put recognition on it. Maybe a post as a summarize from here or only just linking to this thread here: https://processwire.com/talk/topic/2074-module-page-edit-field-permission/
-
Hhm, the modules page does not have the flag for PW 2.5: http://mods.pw/34
-
The Question is why do you have two classes with the same name: "PageEditFieldPermissionConfig"? One in the sites module directory and now there seems to be one in the core too? Can you have a look to this? Ah, I have edited your error and wrapped it into different lines, Now we can read it better: It isn't about two classes, it seems to have two methods with the same name: Compile Error: Cannot redeclare PageEditFieldPermissionConfig() (previously declared in /home/.sites/24/site1275/web/site/modules/PageEditFieldPermission/PageEditFieldPermissionConfig.php:8) (line 69 of /home/.sites/24/site1275/web/site/modules/PageEditFieldPermission/PageEditFieldPermissionConfig.php) Please have a look into site/modules/PageEditFieldPermission/PageEditFieldPermissionConfig.php at line 8 and at line 69, it seems that those lines both want to declare a method (or class) with the same name: PageEditFieldPermissionConfig.
-
, many thanks! This is fixed now in the Github repo.
-
Unexpected behaviour of field dependency and checkbox field
horst replied to Juergen's topic in General Support
I believe the CheckboxFields can have a different value than 1. When building Forms with the API I can set $field->value => 2, if I want or need it. You should check which value your Field really has when checked. -
Ah, thanks. https://processwire.com/talk/topic/5040-events-fieldtype-inputfield-how-to-make-a-table-fieldtypeinputfield/
-
I do not update older installations with new releases until I want to add some of the newer features. I today run sites with PW 2.3. There is no security reason to update those.
-
I don't know the "event-example". What is it? Where is it? (hyperlink?)
-
The processwire way is in 95% to use the API, and not to write directly to the DB. (Using direct access is for rare edge cases or maybe sometimes when create a module) PS: Ah, it is your first post here. Welcome!
-
wireshell - an extendable ProcessWire command line interface
horst replied to marcus's topic in API & Templates
@Richard: Hari KT said in his post he will send a PR (Pull Request) to WireShell. So it will be a one click step installer for WireShell, I think. -
So, when looking to all that pro sites that were published here the last time, I first thought better not to post this site. But second thought was: "Oh what the heck, they can not all be professionals here." So here it is, a small site for a little but very fine Italian Restaurant driven by a nice family. They wanted to have something like a webcard that holds their address, telephone number and opening times plus some impressions. http://bella-italia-aachen.de/ The site is build using pocketgrid css framework, less, flexslider.js, superbgimage.js and these modules: Spex & AIOM and CroppableImage & Pia.
- 3 replies
-
- 16
-
-
Now you have two more
- 4 replies
-
- 1
-
-
- website
- kindergarten
-
(and 1 more)
Tagged with:
-
WOW! Would you like to also submit it to the sites directory?
-
I think it is called $nativeNamesSystems and can be found in the core/Fields.php
- 1 reply
-
- 6
-
-
- reserved words
- protected fieldnames
-
(and 2 more)
Tagged with:
-
Hi phippu, interesting post. Maybe I can come back to this later, (im in hurry now), but want to note that you can use different sharpening methods with ImageSizer. It has 3 of those imageconvolution matrixes that only rely on the GD library. The values are: "soft", "medium" and "strong". and it has a USM implementation based on pur PHP-Code what is on by default and also uses those 3 paramnames. You can switch between them per global setting $config->imageSizerOptions["useUSM"] = true | false, or add it to your $options array on a per image base. You also can force the recreation on a per image base with adding "forceNew" = true | false to your $options array. (No need to delete variations manually or in an extra step) Ah, not to forget that the use of "defaultGamma" also affects the result: $options["defaultGamma"] = [0.4-4.0 | -1] (-1 is to disable it) You can add suffixes to image variation names per $options array: $options["suffix"] = [a-z0-9_-] By using suffixes you are able to create variations with different values for the same param avoiding overwriting them each other. A test setup for visual comparision of the possible sharpening outputs could be like that: $options = array('quality' => 100, 'upscaling' => false, 'forceNew' => true); $defaultGamma = array('dg0' => -1, 'dg1' => 2.2); $useUSM = array('usm1' => true, 'usm0' => false); $tests = array('s0' => 'none', 's1' => 'soft', 's2' => 'medium', 's3' => 'strong'); $image = $page->images->first(); foreach($defaultGamma as $k1 => $v1) { $options['defaultGamma'] = $v1; foreach($useUSM as $k2 => $v2) { $options['useUSM'] = $v2; foreach($tests as $k3 => $v3) { $options['sharpening'] = $v3; $options['suffix'] = $k1 . $k2 . $k3; $variation = $image->width(intval($image->width / 2), $options); echo "<p><img src='{$variation->url}' alt='{$variation->name}' /><br />{$variation->name}</p>"; } } } // (written in browser, not tested!)
-
At least you have to give them the permission "user-admin". And maybe other permissions like page-edit is needed too, but this I don't know for sure. But you can try it out.
-
@Neeks: Please add the link to this post, so that others can read it in full and also can get aware of the original context, authors etc.! https://processwire.com/talk/topic/9376-mysterious-white-line-wiretabs/
-
I would not use the $user var to get the saved value. I think it should be possible to call this: (but have not tested it yet) $id = $user->id; $savedLanguage = $users->get($id)->language->name;
-
Where is it done, the change on runtime?
-
ProcessWire does change the $user->language? What kind of language switcher you are using? A pointing link or code example would be helpful, or is it some example that comes with a PW site profile?
-
Exactly! That's what I have to do too. (First I will try to trick it by embedding the JS content in the head tag, not linking to it as external resource. If this will not bump up the result, I try to put it 10% beneath the body tag. If it will not bump up, I try to put it 20% beneath, etc. etc.) (what a bullshit!)
-
Ah, thanks for the explanation. It is very useful to analyze code or test it against scenarios, also if done staticly. But it also can do a lot of harm or result in the wrong direction. I give you a real live example about static analysis that happens to me right a few days ago: Google analyzes websites due to the user experiences with mobile devices. They have sent me a message with their analyzis result where they say that I have to change some things to full fit their requirements, otherwise they don't list those pages in search results requested from mobiles. One of their usefull tips and requirements is: I should avoid calling a JS-resource in the html head, I should not call external resources above the fold! Otherwise it would be not mobile friendly. (Tada!) But in fact, the resource I call there is a very little JS file that don't use dependencies, it just checks if the site is viewed by a mobile device. And if it detects a mobile device it sets some things to avoid overhead and loading of to many resources etc. (like limiting infinite adding to only 2 items instaed of 16 with a desktop, fetching way smaller images, adds a mobile class to the body tag to derive the correct mobile friendly CSS styles from it, etc.) You also should know that all other resources the page needs are: one google-fonts call, one minified css file, and one minified js file which is called just before the body close tag. Also this site uses ProCache and is responding quick like hell. As I can see, in this case it is pretty stupid and useless to follow some static rules, it results exactly in the opposite direction. (If I would call the mobile checker beneath the fold! it could be that there were already to much items (pre)loaded; that the content needs to be rebuilded, rearranged according to the to late added mobile class to the body tag; the fetched images were to big, etc. etc) In fact, the whole users experiences, including those on tablets and desktops (not only those on mobiles), depends on calling this little JS early! If they simply would have built in some logic, it could be a helpful initiative, but how it is used now it is dumb and ignorant.
-
You have answered your question by yourself already $user->language->name will not change, you said you switch the value of $currentUserLanguage, so you can query every time for $user->language->name again.