kixe

Members
  • Content count

    601
  • Joined

  • Last visited

  • Days Won

    4

kixe last won the day on June 4

kixe had the most liked content!

Community Reputation

822 Excellent

About kixe

  • Rank
    Hero Member

Contact Methods

  • Website URL
    http://qualyweb.com

Profile Information

  • Gender
    Male
  • Location
    Cologne, Germany
  1. ... and don't forget to read this
  2. ProcessWire is even more, it has capabilities to be a conventional CMS with highly configurable Administration Interfaces, Templatesystem, Database Mangement/ Access and render tools for the output of dynamic markup headless CMS providing content data via API (JSON, GraphQL) and optionally static HTML + JavaScript (HUGO/ Jekyll) WAF (Web Application Framework) a platform to build a headless CMS or other App/ SaaS on top of fit Make your choice!
  3. The task is to change a runtime property (visibility) of a field and setting/saving a page field value if certain conditions are met. Hooks are great but not needed to solve this task.
  4. /** * check & hide specific checkbox field if page being edited has no children */ if ($page->process == 'ProcessPageEdit' && $input->id) { $field = $fields->get('createevents'); $_page = $pages->get($input->id); if ($_page->template->fields->hasField('createevents')) { if ($page->hasChildren() == false) { $field->set('flags',160); $field->setRoles('edit',array()); // works for non superuser only $_page->setAndSave('createevents', true); } } }
  5. @kongondo $this inside any template file will return the TemplateFile object and inside ready.php the ProcessWire object. @Juergen If you need to disable fields for certain roles or make them view only take this as a starting point. Put the code in your ready.php foreach ($fields as $field) { if ($field->hasFlag(8) && $field->name !== 'title') continue; // skip system fields `Field::flagSystem` $field->addFlag(160); // Add flags `Field::flagAccess` = 32 + `Field::flagAccessEditor` = 128 // Applicable only if the `Field::flagAccess` is set to this field's flags. $field->editRoles = array(); // leave empty if you want to give access to superuser only $field->viewRoles = array(1026); // assign field view permission to specific roles (IDs) // save the field $field->save(); }
  6. Does the customer have view permission for template: shop-order? If not, try to add check_access=0 to your selector string. // Get the orders $orders = wire('pages')->find("template=shop-order, order_user_id=$customer, sort=-datetime, limit=10, check_access=0, include=all");
  7. @Karl_T I fixed this too but without publishing here. Sorry for this Furthermore I added options for the label etc. In the environments I use it (latest PW) everything works as expected, even single select. I forked now the original module and pushed my latest version on github. https://github.com/kixe/Processwire_FieldType_Templates
  8. Small CSS Border (left) issue using UIKit AdminTheme
  9. This is a translatable string. Not a message.
  10. If $widget is a page object it should be possible to put outputformatting on just to grab the value and switch it of after. If not you can use the formatValue() function from the module. You need a page and a field object as arguments. $page can be any page in this case but $field should be the one where the OF type is stored. $FieldtypeColor = wire('modules')->get('FieldtypeColor'); $field = new Field(); $unformattedColor = "ff5a01fd"; $page = new Page(); $field->type = $FieldtypeColor; $field->outputFormat = 0; $color = $FieldtypeColor->formatValue($page,$field,$unformattedColor); var_dump($color); // string(7) "#5a01fd"
  11. @Macrura Page output formatting? $page->of(false); var_dump($page->color); // string(8) "ff5a01fd" $page->of(true); var_dump($page->color); // string(7) "#5a01fd"
  12. If you need a quick solution try in config.php ini_set('memory_limit', '-1'); // unlimit memory
  13. I have a similar module in use. For security reasons I verify if only one single user has the login email address in use. Emails aren't unique in PW like user names! Furthermore its useful to log login failures. Keep the ProcessWire Login Process safe!
  14. @rafaoski thanks for the video. Unfortunately I cannot reproduce. Could you check if the value is changed in the database? It looks like the setting is falling back to a previous default value. Could you unset the default value and try again? I made a screenshop of the fieldsettings. Is it similar to yours? Did you try custom js code?
  15. @rafaoski Are you talking about the field settings? Could you please explain more detailed what happened that I can reproduce the issue. Thanks.