Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/05/2019 in all areas

  1. PwQuickFixes This module is intended to serve as a collection of ProcessWire fixes that can easily be enabled via checkboxes in the module's config. It is NOT intended to be a replacement for github issue reports or pull requests! The idea is that we have a place where we can put fixes for issues that are not yet fixed in the core until they get properly fixed there. It is also not my intention to put pressure on Ryan to fix issues quicker. The idea is that we have a place where we can share our fixes across projects and across users and maybe get a better feeling on the "impact" of different issues. The module could also make it easier for Ryan to test issue reports and the solutions provided by the community: Intended Workflow Identify an issue Create the related files in the fixes folder of this module Create a PR so that I can merge the fix and everybody can use/test/improve it Create an issue in the official PW issues repo and link the fix in your description Usage Just add your fixes in the fixes folder and activate them in the config of this module (via checkbox). See the Foo example module how to add JS and CSS. https://github.com/BernhardBaumrock/PwQuickFixes
    2 points
  2. In you home template, you could do something like: <?php $newsArticles = $pages->find('template=your_news_templates'); foreach ($newsArticles as $newsArticle) { echo "<a href=\"" . $newsArticle->url . "\">" . $newsArticle->title . "</a>"; } ?> This would output each article's title (as well as a url to the article). Obviously you can change the markup to whatever you would need.
    2 points
  3. Hey, @Macaco! This very question has been asked a trillion of times on the forums. And here is the way to find the answers already given: go here and search. The forum search does not work well. The closest to what you desire is probably the Duplicator module, but I never used it in production. I suggest you make yourself comfortable with moving you site here and there "with bare hands" anyway. It is not that hard. You just need to: Copy files. Backup database and restore it where you want the site to be moved to (probably some local dev env like xampp or laragon). Adjust site/config.php (or better use config-dev.php - look here at the very botoom). There is a lot to it only the 1st time)
    2 points
  4. Maybe it is art, but you know what would be logical and efficient ? ..... fixing issues via PRs ?
    1 point
  5. IMHO... I see your concern and fear here but... this module isn't for the average user as they aren't that deep into the core details of ProcessWire. Mentioning an issue is easy, reporting an issue is work, fixing an issue with this module is art.
    1 point
  6. From what I have researched (not an expert by any means), Outlook itself does not limit the # of recipients itself. However, you could do a mailmerge with outlook which might work for you: https://www.howto-outlook.com/howto/mailmerge.htm
    1 point
  7. @OllieMackJames Okay, well I honestly don't think there's much more I can do here (unless I'm missing something staring at me in the face ?). Hoping to find time soon to continue work on v2 (starting writing the frontend a little while back), which will keep track of these things a little differently (a migration table). Scary to think how long it's been around, and how long I've taken to get v2 anywhere ?
    1 point
  8. From what I understand, you have to have the specific image prior to setting any property. $yourPage->of(false); // turn off output formatting $yourImage = $yourPage->yourImageField->last(); // get the last image // $yourImage = $yourPage->yourImageField->eq($index); // or, get specific image by array index $yourImage->yourCustomField = 'yourValue'; // Set value of custom field $yourPage->save(); // save the changes
    1 point
  9. I added $config->sessionExpireSeconds = 120; to my config.php deleted all cookies and sessions (/site/assets/sessions/) opened a private window and logged in waited 2+ minutes clicked a link and was redirected to the login page It works in the backend. How and why there might be a difference in an application or frontend... I don't know. Maybe caching, maybing something that keeps the session alive. Another thing is session()->isLoggedin where did you find that? All I know is $user->isLoggedin(). Maybe you could try: if(!$user()->isLoggedin) session()->redirect(config()->loginUrl);
    1 point
  10. Ok I found this codepen: multiple sortBy and through rearranging and cleaning up my code a bit, as well as making the sort order static and not changeable via a page field this sortBy: ['featured', 'date'], actually works, where the items get first sorted by the value of featured and if that is the same they get sorted by date.
    1 point
  11. You're nearly answering your own question there. The key is the position number in the field (zero-indexed like all arrays). Using this field as an example... The key is the position:
    1 point
  12. Kids are, - hmm, well, - mysterious. Many, many years back, when I bought my first pelican case, you could read something in the warranty description like: :-)
    1 point
  13. Sorry for the confusion ? There are several issues with the PW core. Some of them get fixed quickly, some don't. All those issues exist on every project and one has to fix them on every project. This module makes it easy to place fixes in a central place and activate them one by one. It was just a quick idea when I read this comment today: https://github.com/processwire/processwire-issues/issues/802 I've just added a fix for the annoying 404 error: https://github.com/BernhardBaumrock/PwCoreFixes/commit/c4fa410654d0d4a4f8a50c53315a350cdf60d347
    1 point
  14. Even though I feel pretty confident in using and working with Processwire and building lots and lots of different projects with it... your task/idea would be still a challenge for me - in some kind. There is so much more involved than just a registration form, all those fields, user restrictions, notifications, and whatsoever. To be fair... you will have to code and customize a lot here. Installing a few (more) modules wouldn't do the trick. If this is kind of a long-term or fun project to get more into coding and challenging yourself: just start, try and break things, rebuild your code, do whatever is needed. If this is a paid job or something you really want to share with others: well... maybe look for something that already exists, that is tested and maintained. Like this forum. It's a super solid piece of software. Not that cheap but robust, tested and maintained.
    1 point
  15. @OllieMackJames - hmm, something weird is going on here as this is not the first time this has come up (I don't think)... I wonder if it's something related to the module config. The schema version is set there, and it will iterate through the schema updates until it matches the current version. That particular column is way back in schema v3, which is why I think there might be a config issue going on here... Was this a new install or an upgrade?
    1 point
  16. Hi @VeiJari Thanks! ? It seems that my "fix" to support german umlauts in meta tags breaks letters in other languages. ? Can you change the code according to this issue? https://github.com/wanze/SeoMaestro/issues/15 I'll release a version 1.0.1 which fixes this as soon as possible. Cheers
    1 point
  17. You can do this with the undocumented dependent selects feature, which AJAX loads the selectable pages in a Page Reference field based on the value of another Page Reference field in the same page being edited. Your "homes_in_neighborhood" field would use this as the "Selector string" setting: neighborhood=page.neighborhood, neighborhood!='' You can limit by template, parent, etc too if you want. Based on my previous experience: Both Page Reference fields must use a Select, Select Multiple or AsmSelect inputfield. Dependent selects do not work inside Repeater fields. When changing the "source" Page Reference field you sometimes randomly get an option preselected in the "target" Page Reference field. Not a major problem but just something to keep an eye on to avoid accidentally saving an unintended value. If these limitations are a problem and you don't mind having to save the page after changing the "neighborhood" field then you can use the "Custom PHP code" option for selectable pages instead.
    1 point
  18. Hello Everyone. This is not Strictly just about Processwire, but its something i use with a Processwire website that i created. It´s just a simple little Anti-spam protection system i use to make it more difficult for simple bots to mess around with a contact form on the said website. it seems to be working pretty well. The system is very simple, let me explain. Step 1 In the template file for the contact form have this code: <?PHP /* create a random integer.*/ $sendFormInteger = mt_rand(1000,9999); /* save the integer to session var using PW API or just go PHP vanilla */ $session->set('antispam_code', $sendFormInteger); ?> As you can see we just create a 4 digit integer and save it to a session var using Processwire $session API. https://processwire.com/api/variables/session/ Step two Also in your form have for example a label that display the code we created above, so the poster has to manually fill it out in a form field. For example like this: <label for="antispam_code">Anti spam code: <strong><?PHP echo($session->get('antispam_code')); ?></strong></label> <input type="text" name="antispam_code" value="" class="" placeholder="Fill in antispam code here" /> We simply echo out the code we saved in the session var into the label so the user can read it and then fill it out into our form field below the label. Step Three In the file or template that receives the form data put in a simple check like bellow: <?PHP /* sanitize our data and make sure its a integer */ $antispam_code = $sanitizer->int($input->post->antispam_code); /* check if the code we saved in the session var is equal to the one filled in the form and sent to us */ if($session->get('antispam_code') == $antispam_code) { /* if antispam code correct then delete it and go on */ $session->remove('antispam_code'); } else { /* if code is NOT correct then do something else */ } ?> More info on $sanitizer API: https://processwire.com/api/variables/sanitizer/ Just thought i share this technique with you all. I have no doubt that you could easily come up with something more advanced then a 4 digit integer that i use. My anti-spam system is set up so that it creates a new code everytime the form template is loaded. So it should be hard to guess unless they make the bot read the HTML and find the code in the label and make the bot fill out the correct form field before sending it. Happy coding.
    1 point
×
×
  • Create New...