Leaderboard
Popular Content
Showing content with the highest reputation on 07/04/2016 in all areas
-
There's also something similar in the core. If you look here https://processwire.com/blog/posts/new-module-configuration-options/#using-an-array-to-define-module-configuration you'll see that module configuration inputfields can be defined by an array. This is also possible for custom created forms, as it's mentioned to the end of the text.5 points
-
Here my friends at Jumpitt Labs used Processwire as the Main Framework for their website (because I recommend it to them) http://labs.jumpitt.com They are nice folks and make mobile apps and applications in Valparaíso, Chile. I didn´t make their website, I´m just post it to show it here Verification http://isit.pw/?url=http%3A%2F%2Flabs.jumpitt.com Image4 points
-
$pages->find("!my_repeater.my_checkbox<1"); This should work. It means find all pages where NOT at least one repeater does have an unchecked checkbox.3 points
-
Hi, I was just browsing cmscritic.com and noticed that it felt quite slow. Looking at the source it seems that they moved back to WordPress? Does anyone know what motivated this move?2 points
-
And you'll probably want to add something to make sure you only match pages containing my_repeater: $pages->find("my_repeater.count>0, !my_repeater.my_checkbox<1");2 points
-
http://modules.processwire.com/categories/premium/ I agree, that "one shop to rule them all" would be best for everyone. Even better, if it would be integrated into ProcessWire somehow.2 points
-
2 points
-
@Robin S Have a look in the PageTraversal class (/wire/core/PageTraversal.php), and the _next() method. It's all in there. The gist of it is that it works roughly the same as before, with one big difference: rather than loading all the sibling pages (Page objects), it loads all the IDs instead (integers), in order. It doesn't always have to load them all either, just enough to determine relative positions. Once its found the needed ID(s), it converts them to Page object(s). It also involved upgrades to the PageFinder class so that it could support startAfterID and stopBeforeID options. If you look at the end of the PageTraversal class, you'll see an earlier implementation that I worked with for a couple of days before coming across a couple of situations I just could not get it to work in (and became clear it never could), so ultimately had to abandon it. However, since it relies on how sibling pages are sorted (rather than relative positions), it doesn't have to load near as many, making it potentially faster (and more memory efficient) if there are thousands or millions of siblings. Though in my own testing, it was always slower until the scale got really large. Not to mention, it's a whole lot more complex, and can't cover all situations. But I'm leaving it commented out in there for a little while (for reference) since so much work went into it before finding a much simpler solution.2 points
-
No need for repeaters here. Pages are the most common solution for most things and are a right choice for this case too. Make a dog template, create all the fields you need, assign fields to dog template. Place all dog pages under same root (something like dogs). You can configure all dog pages to be automatically placed under the dogs page on creation. If you got the budget get ListerPro for admin - it will make finding the right page in the admin a breeze. If you don't, you can create a custom Process module for that. For the frontend filtering take a look at skyscrapers profile (live demo here).1 point
-
Update: Version 009 Changelog Changed behaviour if no base image found; display friendly message instead of field error. Thx @Macrura for request.1 point
-
Makes sense. I have updated the module to: Show a field error (a) if base image field NOT specified, (b) if specified base image field is of WRONG type or (c) does NOT exist; Render a friendly message in the output of the inputfield itself about 'a base image not found, please upload one and save page to use the field blah blah'. Please update to version 009 and let me know if it works for you, thanks.1 point
-
So, it's a PW 3.xx issue. Once we have an official stable release of PW 3.xx I'll test all my modules to ensure they are version 3.xx-compatible.1 point
-
Hi Nukro, I tried working with your ProcessForm class and I ran into a few problems. I am using the code from ProcessForm.php . I would like to know if maybe the example code you listed is out of sync with the actual class's code ? One reason I ask this is that the class's code references what I believe is an associative array, that is supposed to be passed to the addInput method. For example, the method definition contains ' function addInput ( $opts = array() , $fieldset ) ... and within addInput, there is code such as if ($opts['columnWidth'] != "") { $field->columnWidth = $opts['columnWidth'] ; } . Also, the example code calls addInputfield but in the class the method name is addInput. I could probably use the class definition itself and get something working but I just wanted to run these questions past you and maybe save myself and anyone else some time. So if i am missing something, please let me know if you have a chance , and thanks for sharing this class. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Later that evening.... lol Hey again Nukro, yeah I think I just should have worked with the class file and figured it out for myself, which is what I did after my first post. I was able to create two fields and a submit button , for example, with the following code.... (see attachment below) $example = new ProcessForm($wire); // had to pass the $wire variable to the class $example->addInput( array('type'=>"InputfieldText",'label'=>"Name") ); $example->addInput( array('type'=>"InputfieldText",'label'=>"Address") ); $example->addInput( array('type'=>"InputfieldSubmit",'value'=>"Submit") ); $out .= $example->render(); echo($out); ------------------------------------------------------------------------ As mentioned in the comment I needed to make a change to give the class access to $wire. I tested this code out in a single php file. I included index.php in it to get access to $wire and then I passed $wire to the constructor for the ProcessForm class. I made $wire a private variable in the class and then I only had to change lines like $field = wire('modules')->get($type); to $field = $this->wire('modules')->get($type); So anyway, thank you again for the code Nukro. It was a good learning experience. The class offers more options than I used in my simple example, and I intend to play around with them and learn more. And thanks @Soma too for his original post... And lastly, sorry for the HUGE post guys, I tried to trim down the original post by Nukro in my post but didn't have much luck. Bill1 point
-
There are various small modules to start from, which include the few basics and everything else is really up to what's needed for your module. There's Helloworld.module in each installation as a plain module (with opt. external config here), ProcessHello as starting point for custom backend modules and FieldtypeEvents for Fieldtype/Inputfield development. If you have those the best followup docs are probably processwire itself. Almost everything beyond the core is a module. You want to have a table rendered in an admin page – Take a look at e.g. ProcessField or ProcessTemplate, which both use such a table. You'll soon notice MarkupAdminDataTable with is another module just for rendering these tables. Basically everything with module infos and a way to tell it own classname is a module. It's described more detailed here: https://processwire.com/api/ref/module/. It can only get more detailed if one is asking for a module doing specific things, e.g. hooks, process modules, textformatters, error messages, table rendering and such.1 point
-
Echoing a comment from Matjazp on the blog: it would be great to hear how these traversal problems were solved. Maybe we could have a blog post some time that takes an advanced programming challenge like this, or the findMany() method introduced in 3.0.19, and walks through the process of how it was approached. The initial problem/challenge, the hypothesis of how it could be solved, any missteps or changes in direction that happened along the way, and the resolution. It would be super-interesting to learn how you tackle these things!1 point
-
No it's powerful and fast and dangerous ... With one "L"? It's more efficient... No I don't know your obsession. Well I don't know what MenuBuilder contents are. Why? Does MenuBuilder not have any render functions? Aligator and MSN only work with Pages.1 point
-
Thanks @tpr - I have decided to remove that setMaxAllowedPacket method in the latest version - it's most likely not going to work for a standard SQL user on most shared hosts anyway. So, the message for everyone out there is if the debug bar isn't working and you have the PW core SessionHandlerDB module installed, you have three options: Uninstall SessionHandlerDB Increase your SQL max_allowed_packet setting (in your my.ini or my.cnf file, or via SET GLOBAL max_allowed_packet) - http://stackoverflow.com/a/5688506/1524576 Use the "Legacy" option for the Tracy core setting in the module config (not really recommended as you'll be missing out on core updates)1 point
-
Haven't used it now, but already like it! (have had a look to the readme!) Below an example of a root parent and a first level child:1 point
-
Hi and welcome to processwire. You should go through the forum channels and their posts because these questions are already answered many times. Processwire is a decoupled system, build around the concept that everything in the backend is "a page". You can use any css grid or php framework that you want to speed up your work. If you are new to these things I would suggest to start with the pocketgrid css as it is very easy to understand and work with. Flydev has made 2 nice templates available lately for processwire, one is based on bootstrap and the second one is based on foundation: I have setup a preview of these templates here http://dev9.pe.hu and here http://dev8.pe.hu Processwire gives you the highest freedom and power to build websites but like you mentioned you need to know html, css, javascript and php, and above all: the api of processwire. If you don't know this you will only be able to make simple websites with processwire. There are no professional templates for processwire like there are for wordpress. Why do you think wordpress has become so popular: pick a professional template, click it together and in only a few days you have a professional looking website. But this comes also with a price: wordpress isn't the safest system as it gets hacked a lot and wordpress needs a lot of plugins to get things to work. A good example is a multi-language website with wordpress. You need the wpml plugin for this to translate text strings. Not really functional as this solution causes a lot of database calls. You have to use the wpml search option to find the text strings in the database that you need to translate. And wpml is the best you can get for wordpress. That makes you rethink about wordpress. Processwire has multi-language already build in the core, a breeze to use and a real functional solution like it should be. Drop down menus and sliders are the least problems you have to get them in processwire. Right now I am putting the camera slider in a processwire website. http://www.pixedelic.com/plugins/camera/ This is only a matter of pulling the pictures from the processwire backend into the slider html/css. More effort you have to do for setting up your own forms because you need to know the api and php and a bit of abstract thinking. The good thing of processwire is that it makes you completely independent in making a website in any possible way you want or need. But for a non coder it takes time to get there.1 point
-
I've just gone ahead and added such a repo to GitHub: https://github.com/LostKobrakai/MigrationSnippets. Maybe this can also serve as a resource for people, who are not sure they understand what this module does provide. I've already added 2 example cases. I think over time I'll add some more, but everyone is welcome to add their files as well.1 point
-
@saml: Have a look at the documentation. It's listed as an option and a basic example is available as well.1 point
-
1 point