Jump to content

thausmann

Members
  • Posts

    27
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

thausmann's Achievements

Jr. Member

Jr. Member (3/6)

37

Reputation

  1. FYI I eventually merged the multievents into the main branch. So updating this module from 1.2 to 2.0 requires refactoring. All data is moved to the events property (WireArray), no matter if single or multiple events. // get the module $icsgen = wire()->modules->IcsGenerator; // create a new event using date strings $myEvent = new WireData([ 'summary' => 'Christmas 2033', 'dtstart' => '2033-12-24 18:00', 'dtend' => '2033-12-24 22:00' ]); // add to events $icsgen->events->add($myEvent);
  2. Dear ProcessWire community, Over the last years I created many small–medium websites for classic musicians among other things. I have grown to a point where I cannot support all projects in a timely manner, so I look for some support on code level. (Some websites are oldschool PHP templates, some are headless with a Svelte or Next.js frontend.) Tasks may involved Implementing new screens and features (designs provided by me) Refactoring oldish static fields to more flexible repeater layout Maintenance (Updating ProcessWire, PHP Versions) Requirements Experience with ProcessWire, HTML, Vanilla JS, jQuery, CSS, Sass, node.js build tools, Git, SFTP Ability to estimate tasks, plan and deliver on time Billed by the hour based on estimates Nice to have, but not required Experience with custom ProcessWire Modules, Docker, Svelte, React, Next.js, Typescript, THREE.js, R3F, GDPR complience Eye for design details Germany based / German speaking Please send me a DM if you are interested so we can discuss details.
  3. @ZAP hmm that's weird, can you search for MinifyPageRender in your project and see if it comes up twice, maybe delete the cache? Searching the forum for this yields some older reports of similar errors, but no definite solution.
  4. @Ralf alright I'm on it. The new approach is a WireArray events property, that can hold data for one or more events. // get the module $icsgen = wire()->modules->IcsGenerator; // add an event $icsgen->events->add([ 'summary' => 'Event Title 1', 'description' => 'Event body 1', 'dtstart' =>'2033-12-24 12:00', 'dtend' => '2033-12-24 14:00', ]); This is a breaking change, rest of the API stays the same. Here is a working prototype so you can already test it if you like. I aim for a new version that also supports most ICS event properties like last-modified etc. Edit: should be mostly done, just have to add some docs. Maybe someone can test it in Outlook.
  5. @Ralf Currently only one date per file is supported. Multiple events seems to be possible with multiple VEVENTS. I'm not sure if I should add it, because as mentioned there, Outlook doesn't seem to handle it well. Reoccuring events also come to mind, this should be easy to implement.
  6. I created a Pull Request with two fixes. Fixed a bug that formatted Hexcodes starting with 0E to 000000 (Issue #12) Added CSS to distinguish fields with no value (red strike through)
  7. The module isn't working for me aswell. I did some debugging and the issue seems to be having a <header> element in the HTML anywhere before an email address. This issue was mentioned earlier and allegedly fixed, but the problem I'm facing is gone when changing my <header> to a <div>. This obfuscate method should probably skip replacing addresses in the <head>, but cannot distinguish it from <header>. Adding a negative lookahead to the <head regex seems to fixes this issue. Here is a Git diff that's working for me. [Pull Request] Edit: just a conceptional thought, to support obfuscation everywhere, I could imagine a regex matching any email address in the entire HTML, and collect obfuscated attributes in a custom attribute, something like data-emo="title,value,innerHTML".
  8. Hey @jploch, oh yes, getFile() only creates temporary files, they are deleted automatically when ProcessWire is done with the request. That may sounds weird, but my use case was to send ICS via E-Mail. To permanently store the file somewhere, I could imagine something like this: // write ICS to a custom file // https://processwire.com/api/ref/wire-file-tools/file-put-contents/ $str = $icsgen->getString(); $files->filePutContents('/my/server/path/event.ics', $str); or // add the temporary file to a file field (field named "ics_files") // https://processwire.com/talk/topic/15928-adding-a-file-to-pagefiles-and-saving-to-database/ $path = $icsgen->getFile(); $page->of(false); $page->ics_files->add($path); $page->save('ics_files'); Both untested, let me know if this works.
  9. I looked at my HTML output today and all this chaotic whitespace triggered my OCD. This module simply hooks into Page::render and removes whitespaces from frontend HTML with a simple regex replace. I mostly put this together for cosmetics. I like my View source neat and tidy. This is not well tested yet, please open an issue if you run into problems. GitHub: https://github.com/timohausmann/MinifyPageRender
  10. I'm looking for a module that would allow me to change page urls and make sure that the old URLs would redirect to the new adresses. Mostly for SEO/Bots. Something like https://processwire.com/modules/process-redirects/ with a bit of magic. Wasn't there a module for this in the past or did I dream that?
  11. Just want to drop a line that I used CroppableImage 4 on a new project and ran into no problems so far. Okay, the issue Didjee mentioned persists, I just didn't run into it during dev phase. I applied your fix.
  12. The module can generate basic ICS calendar strings and files. Usage Example: $icsgen = wire()->modules->IcsGenerator; // set properties $icsgen->setArray(array( 'date' => new \DateTime('2033-12-24 12:00'), 'dateEnd' => new \DateTime('2033-12-24 13:00'), 'summary' => 'Event title', 'description' => 'Event description', )); // get path to a temporary .ics file // (using wire()->files->tempDir) $icspath = $icsgen->getFile(); // send email with ics file $mail = wireMail(); $mail->attachment($icspath, 'calendar.ics'); $mail->to($user->email); $mail->subject('ICS Demo'); $mail->body('This is a ICS demo.'); $numSent = $mail->send(); For more infos see GitHub Readme or Modules Page. If you experience reproducable issues please open a GitHub issue.
  13. Hello, I'm wondering if there is way to use $cache so it lasts exactly for one request, something like WireCache::expiresRequest? Edit: I didn't think right, I can simply delete the cache when I'm done. And cache is probably overkill, in memory should be fine. I wrote a cron php script that bootstraps ProcessWire and sends out some e-mails with an ICS file attached. I thought about caching the different files (the filepath to be precise) instead of generating the same over and over again.
  14. Hey @adrian, thanks a lot, I've tested your modified version. For me, subfields as top level options are totally fine, already adds a lot of possibilites for user references! I found that my columns have type pageAutocomplete and not pageSelect, I think that's why they were exported as IDs only. I added pageAutocomplete to the fieldType checks and this works! – unless I export both "User" and "User.email", then somehow the $subfields indexes are off (Undefined offset ...). So I made one more change where the main page "User" is not added as an option anymore. To cover all cases I also added id as a subfield option. I marked my edits with //@TH SUBFIELDS There is also pageAutocompleteMultiple, that seems to procude other problems I didn't dig into. TableCsvImportExportSubfieldsTH.zip
×
×
  • Create New...