Leaderboard
Popular Content
Showing content with the highest reputation on 02/07/2022 in all areas
-
5 points
-
Hi everyone ?? I hope everyone is doing well here. @ryan It's something I have in mind for months, even if am not actively participating to the community (?), I am still using this tool for quite everything and I know that we can support the project by buying license of Pro Modules. That's said, personnaly I am not using them as I mostly build custom modules, or even use it as is. I would like to have the ability to financially support you and people whish maintain this tool. Eventually, Github's Sponsors could be a good choice; You could choose a one-time payment or a recuring one. What do you think about it ?4 points
-
This week we have some great performance and scalability improvements in the core that enable lazy-loading of fields, templates and fieldgroups, thanks to @thetuningspoon — https://processwire.com/blog/posts/field-and-template-scalability-improvements/2 points
-
We already have the TextTags field that is great for picking files: I'm just not showing the extension, but those are .php files ? https://processwire.com/blog/posts/pw-3.0.177/2 points
-
Hello @fruid, is your selector finding any pages? I think you have to add "include=hidden" to your selector: https://processwire.com/docs/selectors/#access_control Edit: Reading further, I think your selector should work. I have never used a selector with "status", so sorry I don't have a clue. ? Regards, Andreas2 points
-
Hello everyone! First of all I am relatively new to Processwire. I am currently a member of this forum, I think since 3 years or so. I have build several projects with Processwire and I need to say "Dev things" and Webdesign is only a part time job for me. The main thing I want to ask you is: I am currently thinking of to build a small marketplace for themes build on UIkit 3 and/or TailwindCSS (Themes should be sold on ThemeForest) and templates for Processwire. As Processwire is only a developer CMS, not like Wordpress that is for non Developers too, I want to ask you. Is there any need for you for a theme market? Do you build the most themes from scratch or do you buy themes and customize them - if needed? If you buy themes - Where do you buy theme? Are there any needs for you to have a solid starting point with predefined fields in Processwire or is it better for you to build everything from scratch? What is your preferred CSS Framework? I am looking forward for your replys! Gerald from MateThemes1 point
-
Yes, that update was likely the booster: https://nextcloud.com/blog/nextcloud-faster-than-ever-introducing-files-high-performance-back-end/ Where/how do you store TBs of data? I want to love it as well, but it always makes me super happy to come back to ProcessWire. Everything looks great at first sight, but then you realize that either things do not work at all or they do not work as one would expect and have lots of limitations which make the apps almost useless... This seems the case for both customizations (we are so blessed with our hooks!) or with developing apps, which is really too complicated for me and which makes me love the easy of PW even more. Nonetheless the file syncing and - if it works - collaboration features are cool. And I've talked with a friend recently why there is no central media manager for PW... as I was working with NextCloud the next day I thought I'd try to run NextCloud from within PW and it just worked! We'll see how far I come with NextCloud this time until I get annoyed...1 point
-
@kongondo It could but I would guess your bottleneck is quantity of pages, not fields or templates (?). So unless you literally mean hundreds-of-repeater-fields, for your case I think you'd want to enable the ajax loading features of the repeater (if not already) as that would make a big difference. It was a one-off thing that I used and deleted. Writing in the browser so it may need adjustment, but here's something similar (though a bit simpler than what I used): $fieldtype = $modules->get('FieldtypeText'); $title = $fields->get('title'); for($n = 0; $n < 1000; $n++) { $field = new Field(); $field->type = $fieldtype; $field->name = "test_$n"; $field->label = "Test field $n"; $fields->save($field); $fieldgroup = new Fieldgroup(); $fieldgroup->name = "test-$n"; $fieldgroup->add($title); $fieldgroup->add($field); $fieldgroups->save($fieldgroup); $template = new Template(); $template->name = "test-$n"; $template->label = "Test template $n"; $template->fieldgroup = $fieldgroup; $templates->save($template); } @ErikMH I'm not aware of any recent changes that would affect pages in that manner. But for your code, I would drop the $me = wire($this); there is no $me, there is only $this. ? And rather than referring to $me->parent; refer to $this->parent(); with the parenthesis, so that it is a method call rather than a direct access property. Since you are "inside" of the Page class here, the interface is a little lower level than if you are outside of it. Usually it doesn't matter but in this case of things like "parent" I think it might be safer to method calls rather than properties, because these things are dynamically loaded and so accessing the method ensures that happens.1 point
-
Yeah, it's been a while since I updated. I just updated again and the error went away. As always, thanks for fixing this so quickly!1 point
-
Just tried the update. Unfortunately, I'm seeing some errors in Tracy's Processwire Logs Panel that I thought I should report. Saving Tracy's settings page, clearing the compiled files and refreshing the modules didn't seem to help.1 point
-
What happens when you run that code? The delete() method returns a boolean, try logging it to narrow down the problem. Btw, you don’t need to pass $pages to your function. This should work too: $hidden = $pages->find("template=cast, status=hidden"); deleteHidden($hidden); function deleteHidden($hidden) { foreach ($hidden as $item) { $item->delete(); } } Do these pages have children by any chance? In that case you should get an exception unless you move them away first, or specify that you want to delete them as well, using $item->delete(true).1 point
-
@Pete - in case it helps, I had to do something with processing incoming emails recently and given the abandones status of the flourish library, I went with pure PHP. $inbox = imap_open('{imap.gmail.com:993/imap/ssl/novalidate-cert}', 'me@gmail.com', 'password'); $msgnos = imap_search($inbox, 'UNSEEN'); if($msgnos) { foreach($msgnos as $msgno) { imap_setflag_full($inbox, $msgno, "\\Seen \\Flagged", ST_UID); $header = imap_headerinfo($inbox, $msgno); $bodyText = imap_fetchbody($inbox, $msgno, 1.2); if(!strlen($bodyText) > 0) { $bodyText = imap_fetchbody($inbox, $msgno, 1); } $timestamp = strtotime($header->date); $toObj = $header->to[0]; $fromObj = $header->from[0]; $to = $toObj->mailbox.'@'.$toObj->host; $from = $fromObj->mailbox.'@'.$fromObj->host; $u = $users->get('email='.$from); if($u->id) { // process contents $bodyText here } } } I had this all ready to use and then decided to actually switch to using Mailgun's incoming callback feature - if you have access to it, I think it's much nicer because they will ping your site via a webhook callback, rather than you needing to regularly ping your email via imap.1 point
-
What do you expect $s->cast_language->title to be here? $s->of(false); $s->cast_language = $s->cast_language->title.'|'.$language; $s->save('cast_language'); As I understand it, cast_language allows multiple selection, so it’s nonsensical to access an option’s title without determining a singular option first. Multiple selection options fields have WireArray values, so I feel like this might work: $s->of(false); $s->cast_language = $s->cast_language->implode('|', 'title') . '|' .$language; $s->save('cast_language'); I agree that’s a bit ugly, but there is probably a better way. I’m guessing $s->cast_language->add($language) won’t work because it’s not a WireArray of strings. Probably only works if you pass a SelectableOption. Honestly, just always use $page->save() (in this case $s->save()), unless you have a specific reason not to.1 point
-
Hey - cool suggestion; Since Selectize.js is part of the core, this seems like a job for a new module (or hook) – the module/hook would basically initiate the selectize.js assets to be added to the page, as well as a custom js file that would initialize selectize on that field. If I have some time I'll take a look at it..1 point
-
Hi @astock, No problem. You just need to check for the new page's parent in the selector, something like this: $wire->addHookBefore("ProcessPageEdit::buildForm", function (HookEvent $event) { $page = $event->object->getPage(); $myTemplate = "logbook"; //or whatever your template is called if ($page->template != $myTemplate) return; if ($page->startMileage) return; //not if the start Mileage is present $parent = $page->parent; //get the current page's parent //get the most recent logbook with an endMileage value for the current parent $prevPage = wire('pages')->get("template=$myTemplate,endMileage!=,parent=$parent,sort=-created"); if ($prevPage->id) { $page->startMileage = $prevPage->endMileage; } });1 point
-
I did something like you want. Add this hook to ready.php: $wire->addHookBefore('ProcessPageSearchLive::execute', function(HookEvent $event) { $event->wire()->addHookAfter('FieldtypePageTitle::wakeupValue', function(HookEvent $event) { $page = $event->arguments(0); // specify your template if($page->template == 'tool') { // get the fields you like $prefix = $page->pre; $suffix = $page->suf; // add your data to the list $event->return .= " | {$prefix} {$suffix}"; } }); });1 point
-
1 point
-
1 point
-
I think that PW could have a stronger GDPR support out of the box, including comments. There are already some consent plugins available (one of those pretty good), but there is still much efforts needed (like the unnecessary complicated recommendations for fixing comments). For us Europeans, it is so important, to have things right there from the beginning, and GDPR should not be rocket science to fully implement.1 point
-
1 point