Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Oh, oh. Someone forgot to set limits to upload sizes and/or client-side image resizing . Good question. I'm not sure whether the code below will work. I don't know whether such images are counted by ProcessWire as uploaded or it is just their resizing that is an issue. I don't have a test image to use but try the below please in a Tracy console and let me know. It is just checking for empties. If it doesn't work maybe we can search by image size (0x260) instead. $empties = $pages->find("template=media-manager-image,media_manager_image.count=0"); d($empties,'EMPTIES');
  3. Thx for sharing and congratulations for the great site! Interesting approach for the menu! I tested it on mobile and found this little hickup (and spacings could also be removed): Also I'd suggest to list all children at the bottom of those pages: https://mawsonshuts.antarctica.gov.au/preparation/australia-and-antarctica/ (not only next and previous). For me it was not clear that the two links at the bottom belong to one parent (as seen very well in the menu). You can have a look how I did it here: https://www.maletschek.at/segelmacherei/persenning/cockpitpersenning/
  4. @flydev could you please share some screenshots or screencasts? @NorbertH did you try my module? It's exactly built for such backend modifications without having to build a whole new admin theme (and I'd be happy to have a more condensed version as well, but CSS is not my strongest skill):
  5. I can't work on the backend without this module Just sent a pull request to be able to use this module inside a custom admin theme. I just added an option where we can set our custom hooks. https://github.com/Toutouwai/BreadcrumbDropdowns/pull/5
  6. Hello, In /site/config.php look for: /** * Installer: Unix timestamp of date/time installed * * This is used to detect which when certain behaviors must be backwards compatible. * Please leave this value as-is. * */ $config->installed = INSTALLED_TIME_TIMESTAMP_SHOULD_BE_HERE You can find converters online eg.: https://www.epochconverter.com/ As for the core version of ProcessWire, you can find it at the beginning of this file: /wire/core/ProcessWire.php
  7. nfil


    yes it is enabled! Thank you dimitrios I will try again later.
  8. Hello @buster808, you seem to have empty links inside your slider without any purpose. Maybe you should remove them. In my opinion it is good, that the slider doesn't have a adaptive height. Because then the slider navigation and content flow would be disrupted on every slider change. You could always choose a different component for your quotes than a slider on mobile. Just create two components with the same content and hide/show them on different viewports with the visibility component. And don't worry about search engines, because this is not considered duplicate content as far as I know. Regards, Andreas
  9. Wow, that sounds nice as well! And fairly easy to implement too. You know what they say, work smart, not hard!
  10. Hi Guys I have an Formbuilder Form which I am rendering on the frontend and also processing myself (I have checked the option "Submit to another URL (bypassing Form Builder processing)". I am also injecting a InputfieldFile Field "manually" with the form api to the fieldset object. The code looks like this: <?php namespace ProcessWire; $form = $forms->load("schaden-melden"); $inputfieldsform = $form->processor()->getInputfieldsForm(); $fieldsetSachverhalt = $inputfieldsform->find("name=sachverhalt"); $tempDir = wire()->files->tempDir('userUploads')->get(); $field = $modules->get("InputfieldFile"); $field->label = "Dateien hochladen"; $field->notes = "Maximal 10 Dateien, maximal 20 MB"; $field->required = 1; $field->attr("name+id", 'dateien'); $field->noCollapseItem = 1; $field->destinationPath = $tempDir; $field->extensions = "jpg jpeg gif png tif pdf"; $field->maxFiles = 10; $field->maxFilesize = 20*1024*1024; // 20mb foreach($fieldsetSachverhalt as $f) { $f->append($field); } $formFormBuilder = $forms->render($form); if($form->processor()->isSubmitted()){ $values = $form->processor()->getValues(); if($values['s_email'] == ""){ $p = new Page(); $p->template = 'damage-report-data'; $p->parent = $pages->get(1159); $p->name = session_id()."_".date("d-m-Y-H-i-s"); $p->sessionid = session_id(); $p->pd_anrede = $sanitizer->text($values['anrede']); $p->pd_vorname = $sanitizer->text($values['vorname']); $p->pd_nachname = $sanitizer->text($values['nachname']); $p->pd_strasse = $sanitizer->text($values['strasse']); $p->pd_hausnummer = $sanitizer->text($values['hausnummer']); $p->pd_plz = $sanitizer->int($values['plz']); $p->pd_ort = $sanitizer->text($values['ort']); $p->pd_telefon = $sanitizer->text($values['telefon']); $p->pd_policenummer = $sanitizer->text($values['policen_nr']); $p->pd_email = $sanitizer->email($values['e_mail']); $p->pd_eintrittsdatum = $sanitizer->text($values['eintrittsdatum_beginn_der_streitigkeit']); $p->pd_sachverhalt = $sanitizer->textarea($values['schadenmeldung_sachverhalt']); $p->pd_gegenpartei_adresse = $sanitizer->textarea($values['informationen_name_adresse_tel_etc']); $p->pd_reachable = $sanitizer->textarea($values['am_besten_erreichbar']); $p->contract_accepted = 1; $p->save(); $files = explode("|",$values['dateien']); foreach($files as $file){ if($file && file_exists($tempDir . $file)){ $currentSessionData->pd_files->add($tempDir . $file); } } $p->save(); session_regenerate_id(); $session->redirect($page->child("template=basic-page")->url); }else{ $out .= "Thank you, your form has been submitted."; $log->save("spams", json_encode(print_r($values, true))); } } else { $section = new \Sections($page); $section->injectForm($formFormBuilder); $out .= $section->renderSections(); } The Form itself is working and the files are also added to the pages I am creating. But the file field is not really user friendly at the moment. For example: 1. There is no option to delete the files when you have selected them from the disk: 2. When I select multiple files at once it only shows the first filename: 3. Lets say I send the form now and there are still errors in some other fields. The File Field is the rendered like in the processwire backend and the images are also lost (the files are linking to the page where the form/code itself is residing): 4. The valid extension property of the InputfieldFile is only working server side (means when form is send the files with the wrong filetype are just removed, but on the client side you can still upload for exmaple .doc files etc... When uploading file with false type nothing happens: When sending it removes the file: How can I adjust the File Field, that I can make the stuff above working just to my needs? I already needed to duplicate the InputfieldFile Module to the site folder because of some js error I was getting. I needed to make a change inside the InputfieldFile.js: I also must say that I don't know if the change above is also affecting the processwire backend in some way... I hope you can help me here out. PS: I know that the Formbuilder has it's own File Fieldtype but that File Fieldtype only works when the processing of the form is handled by the Formbuilder.
  11. Hi all, I thought that you'd be interested to know we've now launched our third ProcessWire site, called Home of the Blizzard - The Australasian Antarctic Expedition. It's about Douglas Mawson's famous expedition of 1911-1914. As a part of the move to ProcessWire from our previous CMS it has undergone a redesign as well. It has been done completely in-house. https://mawsonshuts.antarctica.gov.au/ It uses Fancybox for the image galleries and modal menu, Plyr for video, and Modernizr (primarily to check for CSS Grid compatibility). It was actually the first PW site we started working on, but then the SCAR COMNAP and Antarctic Jobs sites became priorities so it got pushed back. It's great to have it live at last. The next PW site we launch should be our main site (http://www.antarctica.gov.au)! That's still a work in progress.
  12. I think there is a feature request for this at the moment. https://github.com/uikit/uikit/issues/3812
  13. Yesterday
  14. I set up some local development processwire sites some time ago, moved on to some other stuff. Now many months later I'm revisiting some of those old sites but I don't remember how I installed them. Does the processwire installer save somewhere the site profile used during installation (and the date, and the pw version)? I looked over the log files from some of those sites and didn't see any such information.
  15. In theory yes, but in practice you will hit PHP memory and timeout limits at some point. Just try it and see how you get on.
  16. Not stated on each product page but this seems to apply to each product of Ryan: "7 days of purchase and we will refund your money in full." see: https://processwire.com/store/pro-drafts/#warranty-support-refunds I'd recommend purchasing it on Thursday, and spending the weekend on evaluating it. Also note that usually Ryan has time to promptly reply to support questions around weekends (form Friday to Sunday), which is worth taking into account if you also want to ask questions while evaluating.
  17. On mobile right now, sorry. Take a look at this section of the docs. It looks like a possibile solution.
  18. Hi, Dragan, I tried the CSS but didn't work. My template code 3 fingers is below. I have an example at https://mfconservatorycleaning.co.uk/ (What people say about us) where the height is fixed. Thanks for your help. <?php $feed= $pages->get("template=feedback"); $feedback .= '<div class=" uk-box-shadow-bottom uk-width-1-1@l uk-margin-medium-top uk-margin-medium-bottom">'; $feedback .= '<div class="uk-background-default uk-padding-large">'; $feedback .= '<h1 class="main-heading-size"><span class="car-door"></span>What People Say About Us</h1>'; $feedback .= "<div class='uk-slider-container uk-visible-toggle' tabindex='-1' uk-slider>"; $feedback .= "<ul class='uk-slider-items'>"; foreach($feed->feedback_repeat as $feedentry ) { $feedback .= "<li class='uk-width-1-1 inner_feed'><a href=''></a>"; $feedback .= "<div class='uk-panel'>"; $feedback .= "<h2>{$feedentry->title}</h2>"; $feedback .= "<p>{$feedentry->feedback_body}</p>"; $feedback .= "</div>"; $feedback .= "</li>"; } $feedback .= "</ul>"; // arrows $feedback .= "<a class='uk-position-center-left uk-position-small' href='#' uk-icon='icon: chevron-left; ratio: 3' uk-slider-item='previous'></a>"; $feedback .= "<a class='uk-position-center-right uk-position-small ' href='#' uk-icon='icon: chevron-right; ratio: 3' uk-slider-item='next'></a>"; // dot nav $feedback .= "<ul class='uk-slider-nav uk-dotnav uk-flex-center uk-margin'></ul>"; $feedback .= "</div>"; $feedback .= "</div>"; $feedback .= "</div>";
  19. Is this code applicable no matter how many images you have?
  20. Sorry, I don't get what you are saying BTW: Of course you can just show a simple grid without modifying it via javascript. That's explained in the quickstart: https://github.com/BernhardBaumrock/FieldtypeRockGrid/wiki/Quickstart (actually there is nothing to explain if you don't use any javascript modifications). But as soon as you want to style or tweak your grid (eg custom Headernames) you need javascript. Would be happy to see some screenshots so maybe others do also get inspired by your work
  21. Thanks for fast reply! Well in this case i would want the export to csv which would be convenient since the project uses RockGrid for many of the listings. I could save the form to a own template which would only be updated on submit, then i would get the export feature too
  22. @flydev Thank a lot. You brought me to mind that I have been testing the performance of some queries and declared in the config. $config->dbCache = false;
  23. Hi @gottberg glad to hear that. Sometimes I feel that the potential of this or similar modules is underestimated. If you only need a HTML grid (table) then you might be better off using MarkupAdminDataTable. RockGrid is by design a grid with user input like filtering and sorting and custom colorizations based on cell values. If you don't need all that just create a plain html table. Does that help?
  24. Another (rather lo-fi) setup could be: Use dev template files, as alternative templates. For testing out new content, you can leave pages unpublished and still preview them when logged in. If your client (role) has permissions to switch templates with Tracy Debugger, there the template switcher panel you could use. https://processwire.com/blog/posts/introducing-tracy-debugger/#template-path-panel https://processwire-recipes.com/recipes/use-different-sets-of-template-files/
  25. Hi @cjx2240 I am pretty sure that your $user->get() call return an NullPage, and that is what confuse you. Try this : if($users->get("$newuser->userid")->id) { // user exist } else { // user DO NOT exist }
  26. @bernhard Thanks for the great module! Just started to use in in a project and it has helped me save a ton of time! Is it possible to create a grid just by PHP? Saw that there was a Javascript possibility but i would need to create grid from a form submit.
  27. This must be really simple, I don't know what I'm doing wrong I'm trying to create a simple import for users, but it's not working. I want to check if they exist already, because I'll update their details if they do, and create them if they don't. Can someone tell me why this is returning true for $users->get("username") when the user definitely doesn't exist? I have tried various combos, with or without quotes, using "name=", but that shouldn't matter because it should be returning false either way.... Truthfully I think you're going to point out something really stupid/basic logic I'm missing which I'm blaming on sleep deprivation $users = wire('users'); foreach($newusers as $newuser) { if($users->get("$newuser->userid")) { echo $newuser->userid." already exists<br>"; } else { // create the user } } Edit: Why is it I frequently work these things out minutes after asking on here... The answer is that $users->get(name) returns a PageArray object regardless of whether it matches a user. You have to check if that user has an ID or such instead.
  1. Load more activity
  • Create New...