Leaderboard
Popular Content
Showing content with the highest reputation on 05/21/2016 in all areas
-
ProcessWire 3.0.19 lets you work with thousands of pages at once, with a new $pages->findMany() API method! https://processwire.com/blog/posts/find-and-iterate-many-pages-at-once/4 points
-
I played with pixels and here is the concept. What bugged me the most were the green tick icons, they were too loud imho. Szabesz was right that they were confusing because the checkboxes are very similar (both meaning "checked"). Now I replaced them with an asterisk. Maybe this is not the best solution, but I think such signal is enough. "Once" orange icons went to the left, it's easier to overview them if they are under each other. My first idea was to put them to the far right, but then one couldn't see which panel they belong. The template file changer works great, though I use a template engine so I have to change the view file name inside home-dev.php. But I guess there is no general fix for this and I can live with it. Here are mainly design mods, to make more obvious where is what. I'm not entirely happy with the Once-Sticky buttons, but such differentiaton should make clear which one is active. There's also an error: if I check Toggle All, I get this: exception 'ErrorException' with message 'file_get_contents(http://...domain.com/?tracyValidating=1): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required ' in /....../public_html/...sitename.../site/assets/cache/FileCompiler/site/modules/TracyDebugger/ValidatorPanel.inc:344 points
-
Ryan, big thanks for putting this into core! This is all magic by sforsman. For us use cases are things like looping and sending newsletters, big exports etc. Really a big difference in performance, memory usage and code simplicity when working with more than 10 000 pages.4 points
-
That makes such a huge difference - I have a query (that I was obviously caching) which was taking around 4-5 minutes, that now happens in 45seconds! Obviously I still need to optimize some other components, but this is a huge improvement - thanks to everyone involved in this!4 points
-
@tpr - do you have apache authorization required for the website? I am trying to figure out that authorization error and that seems like the likely culprit. EDIT: http://www.hashbangcode.com/blog/using-authentication-and-filegetcontents - seems to be the cause, but maybe it's something else unrelated!2 points
-
Sorry about that Charles - I reverted a commit from last night that turned out to be a bit buggy, but I forgot to revert the version number in the modules directory. I have just recommitted a fixed version with that new version number, so hopefully your update should now work. The new version uses a <select> for choosing from available alternate template files. I think this makes it easier. It now also remembers different dev versions for different templates. Obviously you need to create the file in the templates directory first before it will be available from the select dropdown. You can now also reset just this template, or all templates on the site. @tpr - thanks for those great mockups - I haven't had time to incorporate your ideas yet, but will do hopefully shortly. The error you are getting is specifically with the validation panel - I am not completely sure why file_get_contents is giving that authorization required error. I am using wireHttp first and falling back to file_get_contents. I will look into this soon also, but in the meantime, disabling the Validator will gets things going for you. The latest version also includes some core Tracy updates which introduced lazy rendering of panel contents - this should speed up initial rendering of the debugger bar significantly.2 points
-
This could be modificated for the "Release Trailer" for PW 3....2 points
-
Well that's the main thing, figuring out a system that integrates well into PW and is simple enough. See the images below of my current newsletter page in the admin and the final outcome. There's a dedicated Newsletters page in the root page tree, newsletters are listed below them. This is useful because newsletters have their own URLs so "View in browser" is easy to implement. The subscribers have another page in the root, each subscriber is a page. They can be active or inactive, based on the page status published or not. I use simpe subscription, no confirmation emails. I do not use subscriber lists, this should be also implemented somehow. I use wireMail() for sending (with MailGun), but queing would be also nice. It would be nicer to have a new nav item in the admin "Newsletter", and move the newsletters and subscribers there. Anyway, this is what I've got, maybe these can generate some ideas.2 points
-
2 points
-
Is my 100th post I wanted to do something special. I edited a video, hope you like it Just for fun Edited: Now with subtitles1 point
-
Our agency website is not exactly new, because we relaunched it late 2014. At this time we have build it with the CMS Contao and Bootstrap as framework. Although I always liked our website, I was never quiet happy with it. Contao is a great CMS, but knowing ProcessWire it felt tedious managing content. Also it limited me as a developer. So the past months I have rebuild our website with ProcessWire and switched the framework to UIkit, because it made a good first impression on me and I wanted to learn it. Now I am happy with our website, because it is cleaner, faster, easier to manage and more optimized for search engines. www.designconcepts.de Modules used: ProFields ProCache Map Marker Pages2JSON Markup Sitemap XML Tracy Debugger Email Obfuscation Regards, Andreas1 point
-
Over the past few weeks I've been seeing some weirdness when visiting the module repository. Here's a screenshot of how it appears for me this morning on Chromium; And here on FF; Visiting the module pages also shows some rendering issues; Anyone else seeing these issues? I'm seeing a lot of 502 errors for the page - mostly from cloudfront;1 point
-
as a follow up to this, i have a module for image tags, using selectize.js; 1.) install the shared js lib: https://github.com/outflux3/JquerySelectize 2.) install the image tags module https://github.com/outflux3/SelectizeImageTags i have it working on several sites without issues, but this module should be considered Alpha. Documentation is also at an early stage. please report any issues or questions here. Once these are all stable and have had some testing/documentation, they will be added to the modules directory. (note these represent the start of a series of modules that utilize selectize.js, including an awesome page select Inputfield)1 point
-
Great, thanks! Just updated the readme. I'm thinking about adding Emogrifier to the module. I have only one usecase for inlining CSS (newsletters) but I think it won't hurt having a "$view->setInlineCSS('path') or similar helper at disposal.1 point
-
Yes, that was it, on the dev site I have httpasswd, totally forgot about that. All I get now is nasty validation errors1 point
-
TextformatterCurrency A locale-aware currency formatter module for ProcessWire. The module reads a formatted string, splits it and formats each valid monetary amount according to the locale defined in the module settings. The module is capable of using the visiting browser's headers to determine which locale to use when formatting monetary amounts of various currencies. Internally, the module uses PHPs Internationalization extension (intl) to do the formatting. Input money format The input money format is made up of any number of currency-amount pairs. Each input money pair is made up of 3-letter ISO 4217 currency code and a numeric amount. These are always separated by at least one space with the code coming first. (eg. "GBP 50.99" or "JPY 100000") No thousands separators are allowed in the input. A full-stop '.' character is the only acceptable decimal separator. Each money pair is separated by a configurable character string ('|' by default.) You can change the character used to split the incoming string into currency-amount pairs in the module settings page. Output format Each currency-amount pair is formatted using the defined locale or that supplied by the browser and thus appears localised in the output of the formatter. If the input text has more than one currency-amount money pair then the formatter will join the localised outputs for each pair using the output glue string defined in the module settings. Negative amounts are prettified by substituting ascii '-' characters with the more typographically pleasing minus glyph '−'. Examples Using Module Defaults Input "GBP 50.99 | EUR 100" gives "£50.99 + €100.00" when viewed in browser set to British English but gives "50,99 £GB + 100,00 €" using a browser set to French. Availability On github. In the module repository, here.1 point
-
1 point
-
Modules > Core > ProcessUser > What fields should be displayed in the page listing?1 point
-
Some of the people who are using this are not in a position to afford "proper" webdevs, which is fair. They have a different business and "a website" is just one of their marketing channels. So what these builders are competing with is Facebook, Instagram etc. (even wordpress.com) – and once these people have a proper and thriving business and their budget and needs increase – we will be gladly helping them. Right? Or to put it differently: what smartphone cameras are capable of these days is amazing. The cost of DSLR is ridiculously low. Still, people hire photographers. Who sees their business model threatened by these generators should probably rethink it.1 point
-
1 point
-
I wrote an article about ProcessWire for the German print magazine t3n (total circulation around 38k). Translated title is: "Flexible like frameworks: why the CMS ProcessWire is a real alternative to WordPress". The article will eventually also be available online (here), but for now you can only see the title and the teaser there. It’s an overview article that talks about content management (fields, pages, templates), the API, multi-lingual content and front-end editing in ProcessWire.1 point
-
Website builders have their place and serve a purpose. They can be a quick fix and allow more people to have a presence on the web. I believe there is no need to fear them or worry that products like ProcessWire will be replaced by them. We could spend all day debating the merits of these products or just continue as we do making ProcessWire a better platform. I've been doing this since 1977 and have seen many things come and go. I honestly believe the webwork market will still continue to function long after these products have matured and 10 other new web building technologies have come along. This market changes everyday in ways that no one can adequately predict. I believe that change is always good, improving what needs to be improved and getting rid of what no longer works. Have a blessed Friday1 point
-
1 point
-
I've just added the module to the modules directory. As soon as it's reviewed it'll be available here: mods.pw/Bm (is it a coincidence, that the shortcode is my name's initial letters)1 point
-
I have my company website running with http/2 on DO with nginx. I didn't use concatenation or any frontend asset post-processing, as the CSS is quite small and the gzipping is done by the server.1 point
-
Hey Pwired, thanks for taking the time to post your compliment and reply. Hope all is well in Spain. Your reply brings up more than one issue that I've been thinking about on and off for a while now. As I mentioned in my post, I'm not building sites for a living at the moment. At best I hope it is to become a part time endeavor. How realistic is that goal? I'm not too sure at the moment. I'm one of those 'old programmers' you hear about sometimes Some may laugh, and that's ok.. but I still enjoy creating software and learning new things, though I try to pick and choose wisely what I put my time into. I did spend a more than a few weeks of evenings experimenting with Wordpress after looking into it , seeing the numbers which are hard to ignore, on it's usage and popularity, etc.I was at a point where I was able to put a decent template together from scratch and I was starting to feel comfortable with the Wordpress flow. Ultimately though, I did not really enjoy working with it. It was not easy to pass on it after the time I spent on it. Sometimes you do have to invest more time than anticipated to evaluate a piece of software, especially a 'framework'. And yes I know , many don't consider Wordpress a framework or a CMS. I'm not big on semantics so forgive me ( Interesting read here on that topic if you're interested ) One of the priorities for me personally is, if I'm not enjoying what I'm working with, I'll pass on it for now. I feel much more positive about working with PW than I did with Wordpress. The code/design is MUCH easier to follow for me personally. My hat is off to Mr. Cramer and the others closely involved with development and maintenance. I'm not saying Wordpress is garbage. I'm just saying I have more respect for the internals of PW vs Wordpress. Again, not claiming to be an expert on these things, it's just my personal feeling about the matter. I would be interested, for my own benefit to see an example of what you mean by the more recent versions of PW requiring more code to accomplish a given task. Yes, I can see where a site could be put together faster with Wordpress than with PW. I would guess we're talking about relatively simple sites though? And really, who puts together a site from scratch anyway? It's not difficult to see that PW very much lends itself to creating site templates and yes it can be done with WP too, but which would be easier to implement with a satisfactory degree of flexibility? I personally feel that PW's whole Page->Template-Field concept provides great flexibility. Now I realize that WP may have plugins / themes that offer similar flexibilty. I am just not familiar with them personally. And yes, it can't be argued, Wordpress users have a huge number of plugins at their disposal and this of course might give them the edge in development speed if a similar plugin isn't available for PW. Anyway, as usual, I have rambled enough. Another fine example of tl;dr I'm afraid. Worried I might be banned from submitting posts after this. The scary part is I had more to add, but I will just save the thoughts for a post of my own sometime. Again, thank you again for taking the time to reply. On a parting note, I will only add 'Raise your rates!!' ... ( just joking.. sort of.. Have a good day.1 point
-
I think this thread is classic and I'm glad I stumbled upon it. A lot of grins and nods while reading through it. It touches upon many points of frustration that any coder, no matter what the platform , is going to run into. Speaking from my own experience, as the cliche states, there are only so many hours in a day. Only you can make the decision how you want to spend them. OK.. so a little background... I am not a full time web developer at the moment. I was a full time developer for many years up until recently, working on different platforms along the way - IBM mainframe , HP, Unix and of course Windows. I have had the great pleasure of learning more than one language that eventually fell to the wayside for one of many possible reasons ( Powerbuilder anyone? ). Of course I had to put the time into learning those languages. I am not bitter though After you've been a coder for even a short time, you come to see this is just the nature of the beast and I don't consider it time wasted. It kept me employed . On the other hand, if you value your time, you learn to sit back and ask yourself, do I really need to use this? Is the benefit I get from learning it going to outweigh the time and effort to learn it? Does this seem to be a product that will be around for a while or is it the product of some talented individual(s) making a go at becoming the next Zuckerburg? Maybe they will and maybe they won't. These are just a few questions I think most of us ask ourselves before we go off on a tangent to learn yet another piece of software. Case in point regarding this article : Grunt vs. Gulp. On many occasions I came across many threads where either of the two happened to be mentioned but I held back from taking the first step. I had other priorities at the time ( Like looking over PW for instance ). My first exposure to either came this weekend. I did some Googling and read enough to get the impression that more than a few people switched from Grunt to Gulp. Ok so I read a little more and got the second impression that it might not have much of a learning curve. So then I ask, could I get by without it? The answer was yes, I could simply write a PHP script or even vbscript for that matter, that would accomplish what I needed. I was a little conflicted because I saw some potential benefits with learning to use it. Just small conveniences, nothing major. I also had the suspicion that I could probably find enough sample code to throw together what I was looking to accomplish with it, and sure enough, that was the case. This is just a small example, there wasn't much at stake with playing around with Gulp, and along the way I learned a few small things about Node.js. I am a Node newbie, so it's all good. I have written way more than enough here and see that I have not really made any specific point, and I've just reiterated points already made by others. To summarize it, I'd say choose your battles wisely. Don't lose sight of your current priorities. Weigh the potential advantages against the potential time investment. And also, are you willing to put software package 'A' on maintenance mode in order to take on the new, shiny product 'B'? Have a good day1 point
-
Hi, I just made this module because I needed it. GitHub: https://github.com/blynx/AdoptDefaultsFromParents Module Directory: http://modules.processwire.com/modules/adopt-defaults-from-parents/ What it does: It fills fields of newly added pages with corresponding field-values of their parents. Configurable by setting "giving templates" and "adopting fields". Configuration: You have to set templates which are able to give field values and fields which are able to receive values. Then, this module automatically applies field values to every newly added page from their parents according to those settings. Also you can switch between immediate or closest parent (@LostKobrakai, thanks for the hint!) Why: I am building a little webshop with padloper and made some product categories ("parent page") which have some properties which should be automatically descendable to their children. Yet, the children should be able to have individual values if they want to. Now: So far it works for me - but please test it out and if you think improvements can be made, tell me about it. Also, what do you think about the general idea? Notes: So far I haven't tested it with more complex fields, yet. So far tested and working: Integer Text Page Similar fields should work. The module simply copies the field value. cheers! UPDATES v003 - 10.5.2016 Added option to switch between immediate or closest parent1 point
-
Function Following tpr's request here, this module allows Radio Buttons in the admin interface to be deselected. Links Github Module Repository (once moderation has taken place) Version History 1.0.1 Merged tpr's mods 1.0.0 Initial Release1 point
-
Hi everyone, New version just committed. It comes packaged with both stable (2.3.10 - what it was using before) and master (2.4 dev) versions of Tracy. If you have PHP 5.4.4+ it will use the master/dev version which among other improvements, adds support for monitoring of, and allowing dumping from, AJAX calls. One quick way to see the AJAX monitoring in effect is to check "Backend" under the "Show Debug Bar" config option. Then hover over the PW menu in the admin to one of the AJAX-driven submenus - notice the new row in the debug bar showing the time etc for the AJAX request. You'll also see this popup when clicking on the Children tab when editing a page, and several other places throughout the PW admin. Of course this will also work for any AJAX requests on the front-end of you site. Here's a screenshot showing both rows (normal and ajax) with the Dumps panels for both. I have two bd() calls - one "classic" and one via "ajax". Please let me know if you notice any issues with this new version.1 point
-
I've been wondering that for a long while now too! I also just write everything mobile first, then add the tablet-up styles. It is a great framework and so quick and easy to use!1 point
-
Because i really wanna use the Menu Builder, a friend of mine helped me to build a working solution. We're using the above mentioned solution from @Webrocker as a basis. Maybe it's helpful for others who wanna use the Menu Builder and the UIKit Navbar and so i post the code here: <nav class="uk-navbar"> <?php $mainmenu_items_json = $pages->get('name=main-menu')->menu_items; // this is the menu page in menu builder, could also be fetched with the ID $mainmenu_items = json_decode($mainmenu_items_json, true); if( count($mainmenu_items) > 0 ){ $out = '<ul class="uk-navbar-nav">'; foreach($mainmenu_items as $id => $item){ $isCurrentPage = ($item['pages_id'] == $page->id || ($page->parent_id != 1 && $item['pages_id'] == $page->parent_id)); $subs = false; if(!isset($item['parent_id'])) { $url = ($item['url']) ? $item['url'] : $pages->get($item['pages_id'])->url; $target = (1 == $item['newtab']) ? 'target="_blank"':''; foreach($mainmenu_items as $sub_id => $sub_item){ if(isset($sub_item['parent_id']) && $sub_item['parent_id'] == $id) { $subs = true; break; } } $class = 'class="'.($subs ? 'uk-parent ' : '').($isCurrentPage ? 'current uk-active' : '').'"'; $out .= '<li '.$class.($subs ? ' data-uk-dropdown="" aria-haspopup="true" aria-expanded="'.($isCurrentPage ? 'true' : 'false').'"' : '').'><a href="' . $url . '" class="" ' . $target . '>' . $item['title'] . '</a>'; if($subs) { $out .= '<div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom"><ul class="uk-nav uk-nav-navbar">'; } foreach($mainmenu_items as $sub_id => $sub_item){ if(isset($sub_item['parent_id']) && $sub_item['parent_id'] == $id) { $url = ($sub_item['url']) ? $sub_item['url'] : $pages->get($sub_item['pages_id'])->url; $target = (1 == $sub_item['newtab']) ? 'target="_blank"':''; $out .= '<li><a href="'.$url.'" class="'.$target.'">'.$sub_item['title'].'</a></li>'; } } if($subs) { $out .= '</ul></div>'; } $out .= '</li>'; } } $out .= '</ul>'; echo $out; } ?> </nav> It's like @Webrocker says: The best of both worlds! And as a side note: My friend didn't know anything about PW before. After 15 min. he had that solution ready. I think that says everything about the flexibility and the possibilities of PW. Thanks for that CMS and the really great community here! Mario1 point
-
This is so common - I do things like this all the time, not just for menus. Does anyone else think this should be part of the core? For now, I wrote a simple flat function: /** * Recursive traverse and visit every child in a sub-tree of Pages. * * @param Page $parent root Page from which to traverse * @param callable $enter function to call upon visiting a child Page * @param callable|null $exit function to call after visiting a child Page (and all of it's children) */ function visit(Page $parent, $enter, $exit=null) { foreach ($parent->children() as $child) { call_user_func($enter, $child); if ($child->numChildren > 0) { visit($child, $enter, $exit); } if ($exit) { call_user_func($exit, $child); } } } With PHP 5.3 you can generate a menu (or whatever else) recursively as simple as this: visit( $pages->get('/menus/main') , function(Page $page) { echo '<li><a href="' . $page->url . '">' . $page->title . '</a>'; if ($page->numChildren > 0) { echo '<ul>'; } } , function(Page $page) { echo '</li>'; if ($page->numChildren > 0) { echo '</ul>'; } } ); Dead simple. I've seen the options for modules etc. that generate menus - they seem to grow out of control with a million options, and my own helpers seem to evolve the same way, and it doesn't jive with the beautiful, self-contained, simple templates you normally get away with in PW. Would it make sense to have a standard visit() method in Page in the core?1 point