Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Zeka last won the day on September 23

Zeka had the most liked content!

About Zeka

  • Birthday 04/12/1989

Profile Information

  • Gender
  • Location
    Kiev, Ukraine

Recent Profile Visitors

3,743 profile views

Zeka's Achievements

Hero Member

Hero Member (6/6)




Community Answers

  1. Hi @manlio Have you seen this module? https://github.com/teppokoivula/ProcessLoginHistory Also you can use Google Analytics for tracking logged in users https://phppot.com/php/track-individual-logged-in-users-using-google-analytics/
  2. Hi @rastographics "task_status" is select options field? Have you try to 'task.task_status.title=finished' ?
  3. Hi @Crowdland Technology There has been a lot of changes in 3.0.185 that relative to ML support and other part of request handling so it's better to stay for some time on the stable 3.0.184. There is already an opened issue https://github.com/processwire/processwire-issues/issues/1447 So you can describe your case there
  4. Hi @prestoav Just find your selected page in the page tree and there will be 'Unselect' option. See screenshot at the thread
  5. Hi @PascalKonings You can use page refference field by implementing custom fields for you image field https://processwire.com/blog/posts/pw-3.0.142/
  6. // requeire https://processwire.com/modules/file-validator-svg-sanitizer/ and $svgSanitizer = $this->wire()->modules->get('FileValidatorSvgSanitizer')->getSvgSanitizer(); $svgSanitizer->minify(true); $svgSanitizer->removeXMLTag(true); $data->setArray([ 'inline_svg' => $svgSanitizer->sanitize($this->wire()->files->fileGetContents($category->get('svg')->filename)), ]);
  7. Hi @ryan Thank you for the updates and new module. I have used $session a lot in custom modules in the admin area, but not so much on the frontend (except areas where logged-in users could interact with site and basic $session redirects); I just checked the 'assets/sessions' folder which contains 115711 files (462.92 Mb) on one of the sites that have 50k visitors per day and I think that I would benefit if I disallow session for the guest visitors on the fronted, but I'm not sure about what I should consider in this case. Will $session->redirect etc work?
  8. Hi @horst. RewriteCond %{HTTP_HOST} ^(www\.)?example-b\.com$ [NC] RewriteRule ^(.*)$ http://www.example-a.com/subpage5/$1 [L,R=301] Maybe it's cache issue? 301 redirects are cached hard by the browser. For testing it's better to set 302 or test with browser tools open and cache disabled.
  9. Hi @sebr As for the first point. You can copy LanguageTabs module to the site/modules folder and adopt for you needs. As for the second point. There is no ready to use solutions but it doable by hooks. I've been working on the two module. One that allows to disable default language and the second one that add reuquirement for non default langauges of multilangauge fields and check if they are filled. They are site specific but you can use them as starting point and try to addot for your needs.
  10. Hi. You can try to use $page->if() https://processwire.com/api/ref/page/if/ if($page->if('image')) { // ... } $page->if('image', function($image) { // ... })
  11. Hi. I've never used this feature by from this thread I can assume that it meens that user has page-view permission for the corresponding template.
  12. @fbg13 The link is dead, where I can download your module? @eelkenet maybe you have an copy?
  13. Hi. https://github.com/processwire/processwire/blob/master/wire/core/Templates.php#L303 So it looks like cloning of the template doesn't clone fields context for template fieldgroup. You can do it by api like $sourceFieldgroup = $fieldgroups->get('service'); $newFieldgroup = $fieldgroups->get('test'); foreach ($sourceFieldgroup as $field) { if($sourceFieldgroup->hasFieldContext($field) && $newFieldgroup->hasField($field)) { $contextArray = $sourceFieldgroup->getFieldContextArray($field->id); $newFieldgroup->setFieldContextArray($field->id, $contextArray); } } $newFieldgroup->saveContext(); Probably there is better way but it worked for my case.
  14. Hi @millipedia. Nice write-up. How did you get forcing of PDF downloading? Recently I was working on the project where they had a large amount of science articles in PDFs and they wanted to force downloading of these files with settings custom file names (user provided). There is the code that I use, but for some reason some of PDFs files still open 'inline' in Chrome. $wire->addHook('/download/{pageid}/{basename}/', function ($event) { $page = $this->wire()->pages->get($event->pageid); if ($page->id) { $file = $page->filesManager->getFile($event->basename); $filename = $file->description ? $file->description . '.' . $file->ext : $file->basename; wireSendFile($file->filename, [ 'downloadFilename' => $filename, 'forceDownload' => true, 'exit' => true, ]); } else { wire404(); } });
  • Create New...