Leaderboard
Popular Content
Showing content with the highest reputation on 12/27/2016 in all areas
-
Another approach using WireArray::and() which implicitly creates a copy of the Wire(or Page)Array: $precioschico = $page->get("planos"); $preciosgrande = $page->get("mapas"); $precios = $precioschico->and($preciosgrande); // Or all in one step: $precios = $page->get("planos")->and($page->get("mapas")); foreach( $precios as $precio ) { echo $precio . '<br/>'; }4 points
-
4 points
-
Sorry, was on mobile so couldn't add a code sample. $precioschico = $page->get("planos"); $preciosgrande = $page->get("mapas"); $precios = $precioschico->makeCopy(); // So we don't change the variable itself on the next line $precios->import($preciosgrande); foreach( $precios as $precio ) { echo $precio . '<br/>'; }3 points
-
Thanks for sharing your module with us. I use it to mark events which are booked up.2 points
-
I've just tagged 0.3.0-RC1 on Github. I've replaced league/climate with symfony/console to allow for more advanced parameter parsing => nicer commands. Documentation on the new cli commands by now can be found running migrate or migrate [command] -h. The commands migrate/rollback do now support multiple arguments from the cli as well as via the processwire module: integer: migrate/rollback that number of files filename (/path, but does fallback to filename comparison) classname * : migrate/rollback all ("*" in the terminal) In addition to that does migrate also have an option to only use "latest" migrations, which are the ones newer than the latest migrated file instead of all files not migrated. Other changes: Made the mysql table name lowercase to prevent issues with case sensitivity. Migration files are now managed via custom WireData/WireArray classes, which made the code quite a bit nicer than passing around just filenames. Custom migration templates can be put in /site/migrations/templates/. These can be created via migrate create:custom -t [type]. I'd appreciate it if some of you guys could take a look at it if there are any issues I've missed.2 points
-
2 points
-
2 points
-
// Array of template IDs that are allowed for children. Blank array indicates "any" $page->parent->template->childTemplates // Array of template IDs that are allowed for parents. Blank array indicates "any" $page->template->parentTemplates ...as per notes in core files...2 points
-
Christmas stockings are where you find the small gifts, while the big stuff goes wrapped up under the tree. Yet, looking back, it often seems like some of the most useful stuff ends up in those stockings… Swiss army knifes, digital tire gauges, flash drives, and so on. This week, the big stuff is between you and Santa, but what we do have are lots of useful stocking stuffers for you to enjoy in ProcessWire 3.0.46! https://processwire.com/blog/posts/pw-3.0.46-stocking-stuffers/2 points
-
For those of you who like using the SessionHandlerDB module, I have just implemented a fix (thanks to David Grudl over at Nette) for the whitescreen issue that was happening with a Modules > Refresh and some other actions when your php.ini had output_buffering set to off / 0 As far as I can tell the only outstanding issue with SessionHandlerDB is calling bd() from the Console panel - this still doesn't work, but in most cases d() is better from here anyway.1 point
-
There was a security alert on Christmas about PHPmailer (older than 2.5.18): https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html1 point
-
Yes, I think you are correct that it's only in 2.8 and 3. Personally I would recommend upgrading. You are missing out on lots of great functionality. If it's a legacy site without much of a budget for maintenance go with 2.8. Otherwise go with 3.x - I have upgraded many sites from 2.7 to 3.x without any problems.1 point
-
@lena In the module docs you can find instructions on how to apply your custom markup/classes: https://github.com/justb3a/processwire-simplecontactform/blob/master/doc/overwrite-classes-and-markup.md EDIT: and welcome to the forum!1 point
-
Yes it is... Instead of using composer just download the 2 libraries: Google recaptcha for validating the user is not a robot (https://github.com/google/recaptcha) Valitron validation library for validating the form fields (https://github.com/vlucas/valitron) unzip them inside a folder ...and replace the lines: include(dirname(__FILE__) . "/../../vendor/vlucas/valitron/src/Valitron/Validator.php"); include(dirname(__FILE__) . '/../../vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php'); with: include(dirname(__FILE__) . "yourfolder/vlucas/valitron/src/Valitron/Validator.php"); include(dirname(__FILE__) . 'yourfolder/google/recaptcha/src/ReCaptcha/ReCaptcha.php'); Hope it helps! Actually composer doesn't do any magic...it just downloads the libraries inside the vendor folder but you can always do it manually if you want.1 point
-
1 point
-
one thing i'm missing sometimes on the template editor is a shortcut for editing field widths. a slider from 10 - 100% instantly changing the fields width would be a great addition in my opinion often changing one field's width makes it necessary to change the other field's width as well (eg adding a field to a row of 4 fields with 25% makes it necessary to change all fields to 20% it would be great to add the field and drag all field's width from 25 to 20 without the need to open each fields settings, clicking on the display tab, changing value, saving field, closing modal... all other settings are fine being available behind one click.1 point
-
1 point
-
1 point
-
you could also copy the module into you site/modules/ directory, edit to your needs and then in processwire module settings of this inputfield select the one from your site/modules, just refresh module cash and it'll note about two possible files for this module anyway ;-) more about this in the blog https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-copies-of-the-same-module1 point
-
1 point
-
Looks like the latest version of TracyDebugger 3.5.1 always seems to show up in the backend even though it is unchecked in the TracyDebugger settings. PWDebugMode is off. 3.5.0 works fine. I'm on ProcessWire 3.0.45. Hope that helps1 point
-
Brilliant! Your code could be optimised further like so: $childrenIDs = implode('|', $oldchildrenids); foreach ($pages->find("id=$childrenIDs") as $child) { $child->delete(); $this->message("{$child->id} wurde gefunden und gelöscht"); $childRepeaterPage = $repeaterPage->child("name=for-page-{$child->id}"); // will also delete the repeat item pages, e.g. the '1234567890' if ($childRepeaterPage->id) $pages->delete($childRepeaterPage, true); } In the find, we only fetch the children whose IDs we saved earlier, rather than all children first, then checking their IDs.1 point
-
Merry christmas to all. If someone is missing some snowflakes, here you can create some: http://codepen.io/ToasterCo/full/gLBLrg/ <31 point
-
Merry Xmas Ryan and to all the PW community. Back in the day, I started collecting a wealth of knowledge on BB's and then to more recent forums here and there... and never have I been so welcomed and helped by this community since the Matrox forums... it really is a family here and I wish everyone a happy holiday!1 point
-
1 point
-
In recent PW3 versions you can prepend "http" and get absolute urls like this: $config->urls->httpTemplates1 point
-
Happy Christmas everyone! I had a bit of time to add tot his module It now has textareas (thanks @tpr) in it's config which means it can now add as many icons and field and/or template pairs as you like. This means you could add one icon for pages of the template basic-page, and also add another icon for all pages with a counter etc... Also... I've added a third textarea, allowing you to add a list of fields to show the data for IN the pagetree itself (see image below). In my example below I am able to show in the page tree by each page if they have a counter what the data is and whether the page has a field exclusive and its data. Thanks for peoples help and hope it is useful. (updated on github)1 point
-
1 point
-
Google is your friend, lots of results in there. Some of the more useful... Ben's beginner's tutorial on tuts+ Teppo's articles on textformatter modules and hooks (you'll need hooks if you are writing modules.) The example "Hello World" module that ships with PW. Other threads from the forum: A, B & C. Hope that helps!1 point
-
I made a few changes in my fork of the module. I added support for DateTimePicker, Recurring Events and DataTables. Here is it: https://github.com/blackberrymamba/FieldtypeEvents1 point