Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/22/2020 in all areas

  1. Interesting, on my side for every project, it's : TracyDebugger because coding without it it's like masochism AutocompleteModuleClassName super-man backend module BreadcrumbDropdowns super-man backend module VersionControl for versioning page's content Migrations to keep control between dev and prod sites Duplicator for backups and migrations @JeevanisM you should give a try to the last one ???
    9 points
  2. This is my very first module, and I'm sure it needs a lot of improvements, so I'd like to get some feedback. I've kept it as simple as possible to fit my basic needs. Adapted from Ryan Cramer's TextformatterVideoEmbed, this TextFormatter module replaces plain YouTube links pasted in a CKEditor field with Paul Irish's blazing fast Lite YouTube Embed script: https://github.com/jacmaes/TextformatterLiteYouTubeEmbed Why? The Lite YouTube Embed script is indeed a lot faster than the standard iframe embed. The difference is pretty spectacular when you need to embed a series of videos. It's also more private as it uses youtube-nocookie.com (so no need for a cookie banner).
    8 points
  3. It would be interesting to know more than "everything crashed" ? Different strokes for different folks. PW is not designed for the same developers as Wordpress. Wordpress works easily to a point, then it's really painful. PW is maybe a little too techie for some folks initially, but has so much more flexibility than WP. So "not user friendly" really depends on who the user is - wouldn't you agree ?
    7 points
  4. Yes, it happened to me too, and twice!! ... but the third time I started to understand ... I'm a graphic designer, but I knew something about php, however you need to understand how PW is going first, if not, you are shooting blindly . When you reach that stage, then you discover how easy it was! I must admit that for me the selection of the names for the components of the system does not help at all in the learning curve. Because we arrives here with names learned elsewhere and here it's not used for the same thing (Pages, Templates, Template files, etc.) For me the new concepts was the most difficult side.
    6 points
  5. Hi @SeriousUser OK, the core ship what's needed FormBuilder again FormBuilder SEOMaestro MediaManager RepeaterMatrix ProCache Backup it with Duplicator ? Thanks, you too ??
    6 points
  6. I actually built something like a comic reader a few years ago (actually while learning processwire!) ! Running rock solid in a few years old version most likely ? http://losrenegadoscomic.com/comic/capitulo-1/cover/ PW is like the perfect tool to build something like this! But if you are very new to programming in general, it's not going to be that easy unfortunately, ProcessWire is just not that type of tool although you can get VERY far with very little, hang in there if you can!
    5 points
  7. Hey All, Which module you use most of the time per every work you do in ProcessWire ? For me its ProcessExportProfile because I use this to mgrate my localhost development to the Live server. Easy as peach, I use this for every work I do. I personally feel this should be in the stock. What about you all ? any modules you use a lot ?
    3 points
  8. Exactly what @flydev ?? said, but for 5.) you alternatively may use core image fields with the lately added functionality of adding custom fields to them. So it depends on how you want to structure that part. And additionally, also if you haven't asked for it yet, but maybe the question arises later: 9) Search = https://modules.processwire.com/modules/search-engine/ 10) Privacy & Cookies = https://modules.processwire.com/modules/privacy-wire/ ?
    3 points
  9. This guy really helped me a lot. Once you understand the working structure of Page - Field - Template, then eveything easy, unless its super annoying..
    3 points
  10. Hi, I would post an issue on GitHub, but I’d like to understand the problem better. Because us Germans are very diligent and conscientious about that sort of thing, my users do things like upload images containing a copyright symbol in the file name… ProcessWire wants to sanitize this and puts it through, among other things, Sanitizer->nameFilter(). This is called with Sanitizer::translate in the $beautify argument (what is beautify?), so it puts the file name through mb_strtolower() (why is it only lowercased if Sanitizer::translate is passed and multibyte support is on?). After that, because the $beautify argument was anything, not necessarily Sanitizer::translate, the file name is also put through iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", $value). That’s the point at which “©” is converted to “(C)”, capital C. More things happen, but the capital C stays and becomes part of the file name in the page’s assets dir. Then a bunch of other things happen and later PW wants to check the file with filemtime(), looks for the name in all lower and throws because it doesn’t find it. So somewhere in the process, PW handled the file name or path in two seperate ways, one time resulting in an all lower case version and one time still containing the C. Now I’d just make a pull request where I do another mb_strtolower() after iconv, but I figure there is a reason why those things happen in separate code paths. Obviously the nameFilter() method is not expected to only ever give all-lower results. Here is the snippet: if($beautify && $needsWork) { if($beautify === self::translate && $this->multibyteSupport) { $value = mb_strtolower($value); if(empty($replacements)) { $configData = $this->wire('modules')->getModuleConfigData('InputfieldPageName'); $replacements = empty($configData['replacements']) ? InputfieldPageName::$defaultReplacements : $configData['replacements']; } foreach($replacements as $from => $to) { if(mb_strpos($value, $from) !== false) { $value = mb_eregi_replace($from, $to, $value); } } } //this happens independently of the lowercasing if(function_exists("\\iconv")) { $v = iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", $value); if($v) $value = $v; } $needsWork = strlen(str_replace($allowed, '', $value)); } So, maybe the iconv() business should go inside the preceding if block? Maybe it should just go above? Maybe the capital C is expected from this method and the fix is somewhere else entirely. I’ve also tested ®, ™ and ℗. ℗ actually works because it’s just stripped at some point. ® and ™ both end up in caps and throw. Thanks for reading ;‍)
    2 points
  11. Thx for sharing your experience @psy ? mPdf is unfortunately not really a pleasure to work with ? It feels a bit like designing websites 20 years ago with lots of custom table layouts, custom styles, paddings, margins etc... But as you said: I also got there almost everytime and I didn't find a better solution yet. Writing your styles as LESS can be helpful because you can create simple custom classes for any element and to the complex styling in CSS. Using LESS ensures that your style stays easy to maintain because you can use class inheritance and variables. RockPdf plays really well together with RockLESS. I added an example to the readme: Combine RockPdf and RockLESS $pdf = $modules->get('RockPdf'); $less = $modules->get('RockLESS'); $style = " @padding-s: 10pt; .border { border: 1pt solid #afafaf; } .hello { .border; color: blue; padding-top: @padding-s; } .world { .border; color: red; padding-top: @padding-s * 2; } "; $css = "\n".$less->parse($style); $pdf->write("<style>$css</style>"); $pdf->write("<div class='hello'>hello</div>"); $pdf->write("<div class='world'>world</div>"); d($pdf->save()); This is the result of $pdf->html() <style> .border { border: 1pt solid #afafaf; } .hello { border: 1pt solid #afafaf; color: blue; padding-top: 10pt; } .world { border: 1pt solid #afafaf; color: red; padding-top: 20pt; } </style> <div class='hello'>hello</div> <div class='world'>world</div>
    2 points
  12. Thanks for another great module @bernhard Wanted to share my experiences changing from Pages2PDF to RockPdf. Wasn't quite as straightforward as I'd hoped. Such is life, but I got there. Pages2Pdf uses mPDFv5+ while RockPdf uses mPDFv7+ and I needed some of the newer features. Things Iearned along the way: 1. If you need to use @page, you lose everything in the template $pdf->set('header', '...'); settings. This has nothing to do with RockPdf but a 'feature' of mPDF 2. It's much easier to add custom fonts to RockPdf than Pages2PDF 3. You can display images in a circle using background-image but they don't print so that's not helpful, LOL This is NOT a full tutorial but hopefully will give you some pointers on how I got RockPdf working for a fairly specific PDF design. RockPdf template settings: <?php $pdf = $modules->get('RockPdf'); $pdf->settings([ 'fontdata' => (new \Mpdf\Config\FontVariables())->getDefaults()['fontdata'] + [ "montserrat" => [ 'R' => "montserrat-regular.ttf", 'B' => "montserrat-bold.ttf", ], "montserratlight" =>[ 'R' => "montserrat-light.ttf" ], "montserratthin" => [ 'R' => "montserrat-thin.ttf" ] ], 'defaultheaderline' => 0, 'font_size' => 9, 'mode' => 'utf-8', 'font' => 'montserrat', 'page_format' => 'A4', ]); $css = wireRenderFile($config->paths->templates . 'RockPdf/styles-v3.css'); $pdf->write("<style>" . $css . "</style>"); $body = wireRenderFile($config->paths->templates . 'RockPdf/profile_pdf_cv-v3.php'); $pdf->write($body); $pdfFile = $sanitizer->pageName($profile->title) . "-" . $profile->id . ".pdf"; $pdf->show($pdfFile); die(); // Remove old Pages2PDF settings // $mpdf->markupMain = $config->paths->templates . 'RockPdf/profile_pdf_cv-v3.php'; // $mpdf->markupHeader = $config->paths->templates . 'RockPdf/_header-v3.php'; // $mpdf->markupFooter = $config->paths->templates . 'pages2pdf/_footer-v2.php'; // $mpdf->cssFile = $config->paths->templates . 'RockPdf/styles-v3.css'; // $mpdf->pageOrientation = 'P'; // $mpdf->pageFormat = 'A4'; // $mpdf->topMargin = 9.5; // $mpdf->rightMargin = 0; // $mpdf->bottomMargin = 9; // $mpdf->leftMargin = 0; // $mpdf->headerMargin = 0; // $mpdf->footerMargin = 0; // $mpdf->fontSize = 9; // $mpdf->mode = 's'; // $mpdf->font = 'montserrat'; Header code: <div style=" background-color: #007ee5; height: 10mm; margin: 0; top: 0; left: 0; right: 0; width: 100%; "> </div> Page layout code: <?php // header is the same on all pages but need more spacing on all pages except the first $header = wireRenderFile($config->paths->templates . 'RockPdf/_header-v3.php'); ?> <htmlpageheader name="myHeaderFirst" style="display:none"> <?=$header?> </htmlpageheader> <htmlpageheader name="myHeader" style="display:none"> <?=$header?> </htmlpageheader> <sethtmlpageheader name="myHeaderFirst" value="on" show-this-page="1" /> <sethtmlpageheader name="myHeader" value="on" /> <div class="user-dets"> CSS: /* Additional fonts added to: site/assets/RockPdf/fonts */ @page { margin: 15mm 0 0 0; /* <any of the usual CSS values for margins> */ /*(% of page-box width for LR, of height for TB) */ margin-header: 0; /* <any of the usual CSS values for margins> */ margin-footer: 9mm; /* <any of the usual CSS values for margins> */ marks: none;/*crop | cross | none*/ header: html_myHeader; } @page :first { margin: 9.5mm 0 0 0; /* <any of the usual CSS values for margins> */ /*(% of page-box width for LR, of height for TB) */ margin-header: 0; /* <any of the usual CSS values for margins> */ margin-footer: 9mm; /* <any of the usual CSS values for margins> */ marks: none;/*crop | cross | none*/ header: html_myHeaderFirst; } Hope this is useful. Cheers psy
    2 points
  13. I am sure you need some knowledges to make something nice without spending a buck in an already built-in theme. Stable ? for a vanilla blog, the core might be green depending the version, the plugins eco-system is red. Intuitive ? ... Booooooo to me, I fall into a troll ! ?
    2 points
  14. This one is because you cannot use case sensitive filenames on systems like windows. If you would have myFileName.jpg and then you would get and save MYfileNAME.JPG, the latter would overwrite the first. And for the issue in general, I would file an issue on Github, so that Ryan get recognition of it. Maybe he than knows what is the best place to fix that.
    2 points
  15. I recently published a new PW module called SnipWire which fully integrates the Snipcart shopping cart system + full features PW dashboard: Depending on you needs, Snipcart could be a good choice. With SnipWire the implementation into your ProcessWire driven site is very easy. Snipcart takes 2% fees per transaction, which seems to be odd, but if you calculate the cost of developing and implementing another shop-system, the costs are quickly relativised.
    2 points
  16. Have you also installed the FieldtypeToggle module?
    2 points
  17. Hi all, I've been practicing with Processwire. I was wondering at the moment what were the best modules to realize my project. I would like to ask your advice for the following problems: multi-language (for now i use: Languages Support, Languages Support - Fields, Languages Support - Page Names, Languages Support - Tabs) contact form (Form Builder?) form inside a product sheet (Form Builder?) seo tool for page (title, description, opengraph, json ld, ecc) meta data management for images (e.g.: image's tag "title" in the gallery developed with a Repeater) associations (intended as the best module to create associations for example between product and categories or tags) cache + css-js minify tool (ProCache ?) ps: I checked some posts in the forum but I found very old posts so I wonder if there are any new ones introduced over time. Thank you in advance, have a nice day!
    1 point
  18. I am not a web developer pro, but I understand that a (piece of) code or a (programming) concept can be "beautiful". If you make yourself familiar with Processwire, you will find such very often.
    1 point
  19. You hook Page::path - see Ryan's case study example: You might be reinventing the wheel... https://processwire.com/docs/more/multi-site-support/ https://github.com/somatonic/Multisite/
    1 point
  20. @snck Maybe you want take my fork for a spin: https://github.com/JanRomero/AdminPageFieldEditLinks I’ve only done rudimentary tests, but those seemed fine. It just adds a span around the locked inputfield’s value that tells the module’s javascript part what to do. edit: the fork is gone since @thetuningspoon was so kind as to merge the changes. please blame me if I broke anything!
    1 point
  21. will try with Duplicator then, thanx for the suggestion ?
    1 point
  22. If you install the fieldtype first, it’ll actually install the inputfield automatically, but not the other way around ?
    1 point
  23. Sounds like you never used / tried on wordpress below listed activities. 1. try to create / delete menu items and add sub menu items 2. try to create few extra fields which are not with the packed theme 3. try to update a plugin because its not updated with wordpress version, right after you updated the plugin, your entire website is down 4. try to explain the difference between PAGE and POST to your client - believe me, I was fed up with my clients 5. try visual editor of wordpress ( what they call wp bakery some stuff ) well, if you drive a car, you need to follow some rules. You cannot push Break and Accelerator at a time then complain, "look what a rubbish machine this is ". I suggest you to learn the relationship between Fields / Pages / Templates. A normal user should read the user manual of whichever application / tool / machine . I was also pissed off with PW on my first try but after I got the knack with Fields / Pages / Templates then everything is awesome. best wishes
    1 point
  24. Can you show the structure of your data in PW? E.g. where and how is “April 10” stored? I gotta say, I do not like that site. Why does the navigation disappear when I choose a date?! Why does resetting the navigation require a full page reload when everything is still on the page, just hidden?! As I understand it, it’s a collection of links in which each link has a url, a description, a date and a category. Initially all links are displayed, grouped by category, sorted by date (desc). Each link’s date is stored as a class on its list item in the form “d2020-03-31”. The sidebar is just all dates and if you click one it hides everything that doesn’t have the corresponding class using Javascript. The reset could just be: document.querySelectorAll('h3, li, .nav').forEach(li => {li.style.display = null}); (or something extremely similar) If I were going to replicate this frontend I would probably put the dates into data attributes instead of classes. And I’d make a fallback for people without javascript where the sidebar links to a urlSegment and the list is filtered on the server unless JS hijacks the click events. I might also think about ways not to load everything every time, although there are pros and cons. The bandwidth is negligible, but users might be intimidated by the long page and browsers might struggle to keep up, but on the other hand I love a site that is complete and searchable as soon as it’s done loading…
    1 point
  25. @Pete From this side, my wife's job is one that requires her to be on phone/video meetings most of the day, so she's got to lock herself away from us to focus on that, and the kids are mostly with me during the day. I'm good at focused attention, but not great at changing gears, so I'm still learning. My days used to be just coffee and code. Now things are much more diverse, here's a typical day: wakeup, breakfast, coffee, code, kids wakeup, resolve dispute, make breakfast, coffee, code, hear that TV is on, check in to make sure kids are doing school work, turn off TV, say “get back to school work”, try to figure out something with google classroom, worry about whether I'm doing enough to keep kids focused on school, code, get icloud request to approve download of some game on iPad, tell kids to “get back to work”, explain why several times, answer questions about school work, hear music from some game and decide to let it slide, 1 email, cycle power on router because wife says she can't connect to important video call, code, resolve kids dispute, put 1 kid in timeout, legos, clean up spill, 1 email, slack message, cook lunch, coffee, code, worry about whether kids are spending too much time on screens, phone call, reset wifi because daughter says Roblox won't connect, then work a little more, click the "snooze" button on a dozen emails so they return tomorrow, take kids outside to play while I work on house or yard, ride bikes, cook dinner, eat, netflix, cleanup dinner, go to bed, feel thankful to be healthy, sleep well. I'm definitely still adapting here, but I can't complain about the new normal because having everyone under one roof is comforting, especially at times like this. And while it's harder to get work done, it's mostly still getting done and I just feel thankful to be staying busy. Also, knowing there's nowhere to go but home, life is simpler in many ways.
    1 point
  26. Actually you can directly use the $session->redirect() method for sending any 30X status code, by taking advantage of its second parameter 'http301'. When this parameter is set to false, ProcessWire uses PHP default behavior regarding location headers (PHP Manual says: […] "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless the 201 or a 3xx status code has already been set.) Therefore, to send a 303 status code, you can simply write: header("HTTP/1.1 303 See Other"); $session->redirect ($someUrl, /*$http301=*/false);
    1 point
  27. https://www.pluralsight.com/ "#FREEapril Stay home. Skill up. Build in-demand tech skills without leaving your house. Get free access to 7,000+ expert-led video courses and more all month long." Note: last September's free week was OK, it WAS free of charge, really.
    1 point
  28. Finally got back to investigating this. In case anyone else comes across this, it's due to the ukComment* methods that come with the PW "Regular" profile. The approval process when clicking the "Approve" link in the notification email doesn't work at all.
    1 point
  29. Turns out getNext() works on the pageField whereas next isn’t contextually aware (so it gets the next item in the parent rather than in the pageField)
    1 point
  30. Don't forget that Tracy's Module Disabler panel can quickly disable all autoload modules and includes a restore feature if those changes break things.
    1 point
  31. Where exactly? "on the admin page" is a bit vague... In the top menu? In a particular page when in page-edit mode? In the page-tree? elsewhere? For use-case 2, you could try https://modules.processwire.com/modules/fieldtype-runtime-markup/ Another very useful module is https://modules.processwire.com/modules/page-field-info/ - especially if you need to provide contextual information based on your selection (checkboxes, radio buttons, page fields, options...).
    1 point
  32. So long as you don't have a custom sort setting on the parent template or parent page (i.e. the pages are just sorted according to the default which is "Manual drag-n-drop") then you can compare the "sort" value of the pages. if($sibling_1->sort > $sibling_2->sort) { // $sibling_1 is after $sibling_2 in the page tree }
    1 point
  33. Another loose approach to MVC like the last few posts above, is how I usually do things. Pages API is the model, template files are controllers, and separate files for views: <?php namespace ProcessWire; // templates/home.php region('breadcrumbs', false); region('content', wireRenderFile('views/home/hero')); region('content+', wireRenderFile('views/home/testimonials')); region('content+', wireRenderFile('views/home/benefits')); $meta['name']['twitter:description'] = $settings->site_tagline; $meta['property']['og:description'] = $settings->site_tagline; <?php namespace ProcessWire; // templates/register.php require_once("./_forms.php"); $status = processRegisterForm(); if ($status && $status['success']) { wire('session')->redirect($page->url . 'success/'); } $view = [ 'status' => $status, ]; if (wire('input')->urlSegment(1) == 'success') { region('pageTitle', 'Registration complete'); $page->summary = ''; $viewName = 'views/register/success'; } else { $viewName = 'views/register/form'; } region('content', wireRenderFile($viewName, $view)); wireRenderFile() is an alias of the PW Files API 'render' function and takes a path to a file and an optional array of data/variables. I also use the Markup Regions functionality. The examples above are taken from this GitHub repo for one of my sites.
    1 point
  34. I treat things similar to this, except that the separation between "view" and "controller" is created by PW's "Prepend file" feature possible via the template settings. The procedural code of the "controller" is placed into a file article-control.php, for example, while the "view" is in article.php, which is the standard template file with PHP's "alternative" syntax, just as originally intended by Rasmus Lerdorf. To keep files organized, I put this into /site/init.php for each template that needs code: $templates->get('article')->filename = $config->paths->templates . 'pages/articles/article.php'; While the location of the prepended "controller" is set in the admin like this: pages/articles/article-control.php This way I can put any article/articles related files into the pages/articles/ directory, and not just these two ones but files like included template partials, JavaScript files only required by article pages, etc.
    1 point
  35. Another perspective: The API acts as the model, with the $page / Page class giving you access to page data through a generic interface. By default, the PHP template file for the current content type / template acts as Controller and View, though you can easily seperate Controller and View by using, for example, a frontend templating library like twig. That's close to my usual setup: View: Twig acts as a View layer, since it gets pretty privileged access to API variables, you can get anything done you'd usually do in a PHP View class. Controller: The PHP template file acts as the Controller, for example processing input and rendering the correct Twig template. Usually, I just keep the template logic procedural, because ProcessWire already does a lot of work in determining the correct template file and setting up API variables. Though you could also use a custom Controller class and just use the template file to instantiate it. Model: As mentioned above, the $page API variable is already a kind of generic model for your data, and for sites that are mostly brochure sites / presentational in nature, this is really all you need. But if you want to go further, you can create custom page classes by extending the Page class and set your template to use that, this way you can make your model as smart as it need to be. I have written two tutorials on how to integrate Twig if you're interested ? Part 1: Extendible template structures Part 2: Custom functionality and integrations
    1 point
  36. Hello, Recommend @teppo's module:
    1 point
  37. I saw this slide on Twitter : Apparently PHP8 will throw Errors instead of Warnings for many instances. So perhaps it is adviceable to already start preparing your code for the upgrade.
    1 point
  38. You can get the page directly by calling $module->getProcessPage()
    1 point
  39. I think this is hard to say when we don't know the exact setup. I could think of these options: Prevent uninstall (as you said). Convert the fieldtype (as you said). Move the dependencies out of SnipWire into the Fieldtype. This means SnipWire could not live without the Fieldtype but the Fieldtype could live without SnipWire. Move the helper functions in a separate module that both SnipWire and the Fieldtype can use as a dependency. Maybe static methods are an option? https://www.php.net/manual/en/language.oop5.static.php Though I think you can't access the $wire object in static methods, so that might not be the easiest option, because you can't use all of PW's internal tools.
    1 point
  40. Almost every time I find one of these interesting ML/AI/Science based Python projects I want to include in my own work, I run in major compatibility issues. Either a bound C library has changed its signature too much, or the Python lib never got adapted to version 3 (or 3.7 and another lib needs native types). To me it seems like Python is partly a graveyard of university projects nobody cared to continue. Not that Python is bad in general. When Google app engine support for Python came out I implemented a service together with two other devs (extending in-game functionality of a virtual world) that took up to a few million hits per day and was lots of fun to build. But developing in Python can easily become a package version nightmare, and most tutorials out there just ignore that, which adds a steep learning curve if you want to do complex projects in Python. pyenv and pipenv, which came out last year, only address parts of that. This xkcd is quite fitting I think ? I for one also have a (subjective) aversion to languages where whitespace has too much meaning. If you ever learned Cobol, you probably know what I mean...
    1 point
  41. Meanwhile most stuff has been fixed and we're going to clean up and upgrade ProcessWire with proper multilingual set-up in one installation.
    1 point
  42. @FlorianA, you can probably achieve what you want by using hooks. ProcessForgotPassword::renderEmailBody is hookable and includes the link URL as an argument, to which you could add the verification code (which is also an argument) as a GET parameter. Then you could hook before InputfieldText::render and if the field name is "verify" (you could do additional checks if needed) you could check $input and set the value from the GET parameter.
    1 point
  43. First of all: for feature requests you might want to open an issue at https://github.com/processwire/processwire-requests. This is how it'll have the best likelihood of gaining the attention of Ryan ? I do agree that a sufficiently complex and rapidly expiring initial key embedded within an URL should be enough, but saying that the verification key wouldn't add any extra security isn't, in my opinion, completely fair. The longer the key the more secure it should be, and a second verification method (particularly one that user has to enter separately) adds another layer of safety. Technically it could also a) force the user to actually read the message, and b) prevent attacks where the user is somehow fooled into clicking an URL — though I'm not sure how common attack vector this would be. The way I see it, current implementation trades some ease of use to some extra safety, and personally I'm fine with that: password reset process should be a relatively rare occurrence, and attacks targeting such features are a common problem. (But you do make a good argument here; perhaps this should actually be a configurable setting for the module?) Again I think this depends a bit on your of view: on one hand current implementation makes sure that if one just gains access to a reset link they won't be able to change the password (particularly if you ask them to confirm something other than the email field), but on the other hand some experts recommend that this step should occur before sending the reset message (exactly for the same reason — security). Seems like another potential module setting to me, perhaps even so that both options (confirmation before and confirmation after) would be available. Just a quick note on this one: you don't actually have to force the users to go through the password reset procedure. In a case like this it'd be relatively simple to set up a custom process to handle the initial password reset — create and send the links to your users and process them through your own code. I've done that a few times during large scale migrations, and it's not that hard to do — though in most cases I would still recommend going through the password reset feature. Personally I don't think that the process is that hard on users. Just an idea — again I get that you're hoping to change things in general, but if you need to get this done on a timely manner, it would probably be best not to wait for a core level change. Especially since it isn't necessarily a complete no-brainer how this feature should work ?
    1 point
  44. try has() $segment = $sanitizer->int($input->urlSegment1); if($allguests->has($pages->get($segment))) { echo "yep"; }
    1 point
  45. Thanks again for this great module. I enjoy working with it. Found a small bug, though. The MatrixArray->getValue() method retrieves the value from a matrix field on wire('page'). So it tries to get the matrix field of the page the code is executed on. This isn't always the page we want to process and where the matrix field actually lives on. I changed MatrixArray.php, line 157 to $value = $this->page->$n->get("$rowSel, $colSel"); // instaed of $value = wire('page')->$n->get("$rowSel, $colSel"); Now it is working fine.
    1 point
  46. It's not quite that simple for a few reasons. Repeater pages are not directly accessible for non-superusers meaning that selector won't work for guests. So you'd need to specify "include=all", but then you'd also need to exclude any unpublished or "ready" repeater pages with "status!=unpublished". Also, the selector would match all repeater items from that field from all pages, when probably what is wanted is only items from one page. So then you'd need to match repeater pages under only one parent, maybe by building the name of the parent from "for-page-" plus the ID of the page you want the repeater items from. But the simplest way and only marginally less efficient is to match by the IDs of the repeater pages in the field value: $results = $pages->find("id=$page->feedback_repeat, include=all, limit=10");
    1 point
  47. So I started on the project I spoke of earlier and already got most things signed off. With the search function and some video's I was able to build the site. I got a couple of things to work on like a contactform. I guess that shouldn't be to hard. PW seems to be very intuitive and it feels very mature and well thought of. I used the Page Fieldtype (thanks Diogo and others from my first thread) to link pages to each other and it works like a charm. The thing is I would to see the relation two ways in the backend. Example: I link page A to page B1 and page B2. When I edit page A in the backend I see B1 and B2. But I'd like to see page A when I edit page B1 (or B2). I tried to put the same field in the other template, but that (perhaps obviously) did not work. What kind of field do I need to put in the template? Is this possible? Thanks!
    1 point
  48. Yep @ryan's method working perfect. $config->imageSizerOptions('cropping', 'north'); $config->imageSizerOptions('sharpening', 'none'); $config->imageSizerOptions('quality', 80); $config->imageSizerOptions('defaultGamma', -1);
    1 point
  49. We should just be able to add white-space: nowrap; to the css. Or inline-block. I'll take a look at it.
    1 point
  50. My first question is why would you need to do that (I originally wanted to do the same thing)? You can already use selectors via the API in templates to find pages in the other direction. For example, on one site I link news to companies, so the Pagefield for the company is available in the news template (call that field related_company) and I can therefore show some company info with that news article. On the company page via the company template, I can still pull news articles for that company (the reverse of the above) by using something like $news = $pages->find('template=news, related_company=$page'); I would say that unless you have a real need to do this, try not to over complicate it. Of course, your scenario could be very different
    1 point
×
×
  • Create New...