Jump to content

horst

PW-Moderators
  • Posts

    4,088
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by horst

  1. Hi, I haven't followed to the end here, but saw something above what I want to mention: using <?php if($page->numChildren) { counts hidden / unpublished / protected pages too, per default. This is implemented in $page to give a quick "overview" of totals, but unrelated to their states. This is useful and was implemented for cases where you have lots (thousands!) of children, to give an raw overview. But in your case, with only a few or NO children, you want to query the exact visible / accessible children for guests. You need to use <?php if($page->numChildren(true)) { see: http://cheatsheet.processwire.com/page/built-in-methods-reference/page-numchildren-bool/ TLDR Before Ryan introduced numChildren(false|true), only $page->children()->count() was available, what needed to read / open all childpages and results into much memory and cpu usage and execution time. With numChildren(false|true) we have a much faster alternative. I think the fasted case is with the param set to false, the default. (Thats why it is the default . But this is only my guessing.)
  2. what modules / third party modules are runnin in this installation?
  3. I have skim-read it. Best sentence I found somewhere in the middle: Keeping things simple for now Very good resolution.
  4. @LostKobrakai: Nice and much better solution! This way, one can use it for all WireMail modules out there!
  5. To be correct: Install pim, what installs pim1, go to modules / site, install pim2 and use pim2load(). It needs a rewrite someday for recent PW versions (2.8+ & 3.0+)
  6. Hi, no, it isn't possible currently out of the box. You can hook into the ___send() method, and add / change the line 705, where the message normally will be send. Don't know if this is an easy task, as the method is really huge. I find this useful too, and add it to the feature request list of the module, but don't expect an early release.
  7. Hi. There are no plans to update Pim2. And if it will be updated, the version number from Pim1 will be bumped up, so that it shows up in the update modules list. (Pim2 is handled as submodule of Pim, Pim1)
  8. I don't know homebrew, but to me it looks like the ini setting for "always_populate_raw_post_data" isn't (finally) set to -1. Have you checked it on runtime? The issue simply is, that you get a PHP warning as return of an ajax request, what then breaks your app (PW), as it expects another return, (a json object, and not a PHP server warning). You need to disable all php warning output, other then logfile, you need to check your ini settings for the mentioned setting on runtime, and / or you should set the mentioned setting on runtime too. Sometimes there are multiple php.ini files on a system, and it isn't quite obvious which one(s) are involved. So, additionally you may scan your filesystem for all php.ini files and explicitly set "always_populate_raw_post_data" to -1 in every file, if the runtime check shows that it isn't set to this.
  9. If I understand you right, you simply need to create all fields you need. (In PW, all fields are custom fields!) Put your desired fields together in a template, and use this template when importing external data into pages. imported-data: - import 1: extid = 1, text = bla, amount = 10, ... - import 2: extid = 7, text = blu, amount = 7, ... - import 3: extid = 21, text = blo, amount = 0, ... Does this help?
  10. you can do it after the install, if you have installed a single language site profile. Most of us have created their personal starter site profile, I think. It has all settings for default language (inkl.language pack), and the modules, one never can miss, etc. To export a site profile is easy with the site profile exporter module.
  11. default is default, it is required by the system for every other language that has no content in a field. But you are not forced to use english as default. You can make every thing you want as default, - with only one language or with multiple. For example you can use nl as default and fr as additional language.
  12. If you get an error json parse error, you need to check what data is returned from the server. You can see it with the network tab of e.g. Firefox. When selected the ajax call there, you have additional tabs from which one is called server answer or something that like. What does it contain?
  13. Nice, now you have found it. I have posted a link to another explanation for the rescue. But you don't need it anymore.
  14. here is a post with another detailed step by step explanation:
  15. I think it should be ok: https://en.wikipedia.org/wiki/HTTP_301#Search_engines When sending with a 301, search engines should update their index. At least it is how I have learned it
  16. additionally to the family settings described above, you can enable / disable "add to new" (... something). It is enabled by default, but better you check this for the child template.
  17. Hi tom0360, @flydev has created and shared a siteprofile for bootstrap. If this is something for you, you may use it. But you are totally free in how you define, organize and use your markup, and with wich profile you starts.
  18. 1) The main keyword seems to be: access as a procedural function and not only as class instance.
  19. But don't forget to play with code too. ... and welcome to the forums, @SamC
  20. which PW version you are using and what is the code in the templates file line that raises the error? Also of interest maybe a few lines of code before that line raisng the error
  21. mystery dissolution:
  22. With my last attempt to croppable images I also had tried out some configurable settings. One of them was the background color for the thumbs, sitewide in the images module! No overhead, fully visual control for the admin, etc. Another point is, that the checkerbox (only) is much to hard in contrast. I had used a way more soft one. PNG with alpha transparency too. It should not dominate, it only should be a bit visible through the transparent parts. Using black white / medium gray is not very useful. I also don't want to switch around when I come to an images side. I want get my images presented in a less distracted way, that lets me focus on the relevant things just from the start. Now, as we are at it, there are some other parts that I really would see to be solved too: These are mainly the thumbs displayed in different sizes in regard of orientation and aspect ratio. Often the simplest solutions are the best. I suggest a solution like with css property CONTAIN in a given box (fe. 280x280). Following is a screenshot. Please tell me (or tell yourself) what information you get from the thumb overview. If you have no clue what may be of interest when screening 100 images, think about: pixel dimensions or min height / min width image format? (png jpg gif) Another question: Which one distracts you more from the images? first or second? --------------------------------------------------------------------------------------------- Here is another comparision. Which one is more distracting and which one guides you visually faster to the relevant information? This one is without any question Keep in mind that we are talking about the last 10% to become nearly perfect ( for all cases ). <= is this possible? for all cases? I'm not blaming anything, I'm fighting for the last 10%.
  23. For me, it goes here: // condition <?php if ($config->debug) { ?> // condition as variable <?php $skipMinify = $config->debug || $user->isSuperuser(); if ($skipMinify) { ?> // or, if you have only one occurence in your code where you check this condition, // ommit the temorary variable and write it direct into the condition <?php if ($config->debug || $user->isSuperuser()) { ?> $config->debug is true when developing, and additionally I use superuser condition for later, when in production mode!
  24. OMG. I shouldn't post in the morning before the first cup of coffee.
  25. I assume you are speaking of the default admin thumb? If yes, there is no way I know about to avoid this with image fields. It is a requirement to display each image in the admin. But if you don't need the thumbnails, just a list with filenames, you can use a file field instead of an image field. The image field is based upon file field, it only has additonal methods and properties related to images.
×
×
  • Create New...