Leaderboard
Popular Content
Showing content with the highest reputation on 01/18/2020 in all areas
-
ProcessWire 3.0.149 on the dev branch includes various improvements and a few minor fixes. Here are the most significant differences relative to 3.0.148 master: There have been several improvements to the $notices API variable as well as a significant refactoring of the code. Several new flags are now supported and can be specified by name rather than just by bit mask. While these updates won’t matter much for front-end site work, they are going to be helpful for the admin as well as potentially in other modules that work in the admin. Some of the updates are still a work in progress, so more will likely be added in the near future. (Commit) The Comments Fieldtype and related classes have received upgrades as well. (Commit) Several new API methods have been added for handling the parent/child relationships involved in threaded comments. The ProcessCommentsManager has also received major upgrades and it puts these new API functions to use by now allowing you to change which page a comment lives on (move a comment from one page to another), as well as change which comment another one replies to. Lots of refactoring was done in this module as well. (Commit) A minor but useful detail in AdminThemeUikit: if you click in the search box (top right corner) and don’t immediately start typing, it now suggests that you try typing “help” for options. Since this is an English word, the “help” term can also be translated in the AdminThemeUikit files (_search-form.php file). PW’s admin search engine can do quite a bit more than I think people realize at first, so I thought this was one way to help more people see what the options are with it, at least in AdminThemeUikit. (Commit) There were several other minor updates as well, but the above are the ones that I thought were the most interesting. Thanks for reading and have a great weekend!7 points
-
The machine names of system fields are always in english, so you need to access the description like this: $description = $download->Datei->description(); By the way, there's also a utility method for the file extension: $extension = $download->Datei->ext(); Also, if your Repeater only contains the file field, you could also get rid of the Repeater altogether and just allow multiple files on the "Datei" field. Then you could iterate it directly: foreach ($page->Datei as $file) { $url = $file->url(); $ext = $file->ext(); $description = $file->description(); // output download links here ... } Look up the Pagefile API documentation for a list of all available utility methods.3 points
-
Hi everyone, Introducing my first module https://github.com/christophengelmayer/StaticWire It's a simple way to convert your ProcessWire site to static HTML files via CLI or the admin interface. Useful in CI/CD scripts or to use ProcessWire as a simple static site generator.1 point
-
Hi all. Just thought I'd add the updated site I made for the Judo/BJJ club I run. For some odd reason I decided I wanted to try making a single-page website but still use ProcessWire's great page management tools. The site uses the excellent Template Engine Twig module (slightly modified to work with Twig 3) and dynamically builds itself using the page tree (no hard-coded sections). I'm no great designer, but using the above along with Bootstrap 4 and some probably-excessive animate-on-scroll effects I think it looks clean enough to differentiate itself from more standard martial arts websites. Anyways, you can visit the site at http://jkma.club and hopefully enjoy!1 point
-
It does, it's just not documented unfortunately. I linked to information about it in my earlier post above. Here is a demo... Page structure: Field settings for subcategory field: "page.category" will be replaced with the ID of the page selected in the Category inputfield in Page Edit, whenever that field changes. The "has_parent" part is just to avoid unwanted pages appearing in the Subcategory inputfield if the Category inputfield is changed to empty (no page selected). Result:1 point
-
1 point
-
@teppo, that's what I do on my production sites. But on test environment, I try a lot of things and so there are some "test functions" just lying around... That's why I said that this is not a problem of the module (or the author of the module). But yes, the word "problem" is not quite adequate, thank you for the clarification.1 point
-
I guess you followed your instructions so... I'm quite clueless as well. I just stumbled across this: https://stackoverflow.com/a/26336358 - maybe it helps to check if it actually works at all.1 point
-
I wouldn't really call this a problem, though ? Page::render() is not an isolated process, and this is by design. If you define functions in template files – or files you potentially include multiple times – you should always wrap them in "if (!function_exists('your-function') { ... }". Or, alternatively, split them into a separate file that gets included only once per execution with include_once or require_once.1 point
-
Great so see the comments field get an update. Would it be possible to add some modern needs (options? hooks?) for the comments form to be able to include a mandatory GDPR checkbox with some legal text decide which fields from the form are mandatory and which not saving or not saving the IP address with a setting how long to keep those make it easier go apply UIKIT3 to the layout There are existing workarounds in this forum (by modifying a field clone in /site/) but that is a bit hacky i.m.h.o. for those common needs. Also the documentation linked to from the field admin feels a bit dated for all the extra stuff available...1 point
-
I just relased an update (0.0.5) which maybe fixes this issue. The problem was, that the module also tried to export the admin pages. This is now prevented. I tested it with the demo site packages (beginner, blank, classic, default, languages, regular) and it worked on all of them.1 point
-
thank you @rick it works! here the code: // event ID $eventID = $input->get('eventID','int'); $event = $pages->get($eventID); // config $testEmail = $event->event_mail_test_adress; $fromEmail = $event->event_mail_from; $fromName = $event->event_mail_from_name; $emailSubject = $event->event_mail_subject; $filenameDate = strftime('%d-%m-%Y', $event->date_start); // filename $filename = "{$event->name}_{$filenameDate}"; // create ics file $file = fopen('ics/'.$filename.'.ics', 'w') or die('File can not be saved!'); // fetch start date $event_start_ts = $event->getUnformatted("date_start"); // build the .ics data $ical_data = "\r\n"; $ical_data .= 'BEGIN:VCALENDAR'; … … … $ical_data .= "\r\n"; $ical_data .= 'END:VCALENDAR'; fwrite($file, $ical_data); fclose($file); // HTML BODY ob_start(); include('./_inc/emailbody.inc'); $emailBody = ob_get_clean(); // send email $m = new WireMail(); $m->to($testEmail); $m->from($fromEmail, $fromName); $m->subject($emailSubject); $m->bodyHTML($emailBody); $m->attachment('ics/'.$filename.'.ics'); $m->send();1 point
-
Seems like the _() function encodes entities only on multi-language installs. I have a working fix for this, but it's not yet on GitHub. I'll throw it in with the next release ?1 point
-
Sorry, but couldn't even find any business address for "m3server" on their webpage. I experimented with setting up our own server and during our failure trying to do that we found a recommendation for php-friends.de which offers managed vServer and was recommended for being very helpful and flexible. I keep you posted about the result.1 point
-
1 point
-
v0.2.0 released, which makes the stubs directory path configurable and includes a checkbox in the module config to manually regenerate all stub files if needed (thanks @teppo).1 point
-
Hi @Noel Boss, Thank you so much for the plugin! I'm still trying to figure out how to make it do precisely what I need it to do, so I just have a quick question about formatting. Basically I'm trying to get this kind of json output: [ { "title": "Paul Rand", "year": [ "1993" ], "authors": [ "Abrams, Janet" ], "categories": [ "Criticism", "Design", "Design Histories" ] } ] But I'm getting this instead: { paul-rand: { title: "Paul Rand", year: [ "1993" ], authors: [ "Abrams, Janet" ], categories: [ "Criticism", "Design", "Design Histories" ] } } This is the query I'm currently using: header("Content-type: application/json"); $modules->get('PageQueryBoss')->debug = true; $query = [ 'title', 'year.title#year', 'authors.title#authors', 'categories.title#categories' ]; echo $pages->find('template=book, sort=authors.title')->pageQueryJson($query); Is there some setting I'm missing, or is the problem with how I'm structuring the query?1 point