Leaderboard
Popular Content
Showing content with the highest reputation on 06/17/2016 in all areas
-
This week we have some nice optimizations and enhancements for the core, as well as some great upgrades in the forums! Our Inputfield forms (including page editor) got a whole lot faster, and our Password field got a ton of nice enhancements. These updates are all available in version 2.8.22 as well. https://processwire.com/blog/posts/upgrades-optimizations-pw-3.0.22/12 points
-
The forums are open once again - please note that post content itself will appear very odd for a few more hours whilst the content rebuilds. Please resist the urge to edit any old posts, but please feel free to write new topics and posts Please also note that load times may be a little slow on the forums whilst the background tasks continue to update the old content.11 points
-
We will be performing a forum upgrade tomorrow if final testing goes well today. Why are we doing this? The current version is over a year old and the developers have since released a new major version - in fact they're now up to 4.1.x whilst we're still on the 3.x branch. They will not be supplying bug fixes or security patches for much longer. There are a lot of nice changes (and some confusing ones - more on that later) such as responsive design leading to a more complete mobile experience. We can also leverage some caching options to make things even faster when browsing the forums. What does this mean for you? Unfortunately there are a number of down sides to this: The forums will have to be taken offline twice for approx 20-30 minutes each time for several hours. During the upgrade process, the post content gets completely rebuilt and whilst this is in progress things look a mess, code samples look broken etc etc. We think it's better to take it offline than show broken code samples! We've decided to leave the forums open as the forums still technically work, new posts aren't affected, and we need the shop to stay online as well. There will be a learning curve with the new layout, but I'll do my best to post a "this is where to find stuff" post right here after the upgrade. Bizarrely the "best answer" feature has been replaced with a Stack Overflow-style voting feature which doesn't work everywhere we currently have the best answer feature turned on, so we will be making adjustments to some forums. You also can't make the first post in a Q&A forum topic the "chosen answer" which is a bit silly, but I'll be looking for a workaround for that. Possibly the biggest annoyance is that all unread posts you may currently have will get marked as read after the upgrade. Since this forum is a complete rewrite they've been unable (or possibly unwilling?) to do a complete migration of all data to the new version. There are plus sides though, right? Yep, there are: The reason the post content gets rebuilt is so that it's all stored as HTML in the database rather than BBCode that has to be parsed and isn't upgrade-proof. They've also finally stopped using their own-brand post editor and gone with CKEditor, so upgrades should be a little less chaotic as custom tags have been replaced with universally-recognised data-attributes. Theoretically this means that I have less of a headache if they choose to do another complete rewrite in 5 years' time. The code-base has been rewritten and they've removed some of the less used features to speed things up, plus it'll be compatible with PHP 7 soon which means that theoretically everything on the main ProcessWire site can be updated to work with PHP 7 soon and benefit from some nice speed increases. We should be good to stay on the 4.x branch for several years. I'm not anticipating the devs rewriting the codebase for at least another 4-5 years as they've decided to future-proof it as much as possible. Did I mention upgrades will be easier for me to manage in future? Wouldn't it be easier to build a ProcessWire forum module with all the same features? I do think this from time to time, but to be perfectly honest it takes a team of people at least a year to come up with everything you see here. I'm sure I could emulate much of it pretty quickly if I was paid to do it full-time for a year (including BETA testing etc) since the ProcessWire API and module structure is much more sane, but I might also go crazy in the process One day maybe... --- So at some point tomorrow, you will see a message here saying we're upgrading and to check back later. I can't give a precise time estimate, but it is a lengthy process - I would expect it to be at least 6 hours starting around 10am GMT - fortunately most of that is waiting for content to automatically rebuild - and then I have to apply some manual tweaks afterwards which will take about 30 minutes. Schedule TBC - hopefully still tomorrow - some of the final preparations are taking a little longer. Downtime will be kept to 2 blocks of 20-30 minutes maximum if all goes well. Existing post content will look quite odd for the duration, but new posts will be absolutely fine and we'll fix up the old ones afterwards.5 points
-
Thanks Pete for all the hard work! Many of us know how much work (and pain) it requires to upgrade these monoliths, so hats off and I pay for the beer when you visit Finland (it is raining, so you would feel comfortable and just like home here!).5 points
-
It is currently only compatible with the devns branch. Give me some minutes to make backward compatibilty . It is now compatible with ProcessWire-2.7.4 points
-
I'm just using import() to import the results of each "turn" into a single PageArray, therefore duplicates will be moved to the later places if they are returned twice. I can make some adjustments, so the class could actually prevent duplicates to be found again by later selectors.3 points
-
Well, as shown in my signature, I've done it. I use a PHRETS-based importer running in a cron job. It really wasn't that hard to write and the code is mostly reusable, but it isn't a module. I'd be glad to elaborate on how I did it if you have questions. I'll say that I'm glad I spent some effort mapping the MLS values to proper ProcessWire fields instead of just saving a JSON dump; the cleanup makes a big difference.3 points
-
I will try it in new projects with Atom and/or Sublime Text editor. https://atom.io/packages/autoprefixer https://developers.google.com/web/tools/setup/setup-editor#autoprefixer https://github.com/sindresorhus/sublime-autoprefixer Edit: https://github.com/mikaeljorhult/brackets-autoprefixer (Brackets)2 points
-
Hi guys, today im sharing new website for a gamin clan, integrated with steam api. Design Piotr Niescioruk @ avenueagency.eu Implementation Paweł Kazubski @ avenueagency.eu Please share your thoughts. http://ctoc.com.pl/2 points
-
The performance improvement for Inputfield forms sounds incredible. Looking froward to testing that out. The largest number I have to test with is about 60. It was never "slow" before, but it was slower than other templates with 5-10. Great work as always Ryan!2 points
-
Ah, great. I figured it out myself! We need to add all fields into a children array: $this->add( array( array( 'type' => 'Fieldset', 'name' => '_myfieldset', 'label' => 'Fieldset Label', 'collapsed' => Inputfield::collapsedYes, // Inputfield::collapsedNo 'children' => array( array( 'type' => 'select', 'name' => 'kit_type', 'label' => 'Select the Kit you are using', 'options' => array('uikit' => 'uikit'), 'required' => true, 'columnWidth' => 50, ), array( 'type' => 'text', 'name' => 'kit_fullpath', 'label' => 'directory site path to your kits scss sources', 'columnWidth' => 50, ) ), // close children ), // close fieldset //.. add more fields ));2 points
-
Thanks for doing this and will start working with this one this week-end. Really excited about it if this one can release me from using Pocketgrid all the time. Did you know that there is a thread about templates for Processwire ? https://processwire.com/talk/topic/12892-processwire-marketplace/ This bootstrap profile could be a very good one to start with.2 points
-
Thanks, krisj! - new version 0.9.0 - added your changes UNTESTED! - changed module from alpha to beta - added PW 3.0 as supported Please verify and report back!!!2 points
-
Great addition, thanks! Even works in .latte files "{*comment*}". How about cutting off the comment characters in the panel? That would make todos more readable.2 points
-
Create a page field on the page's template that links (Parent of Selectable Pages) to the "users" parent page. That way you can populate this list with all the users that have read the page using the API when the page is viewed. $page->of(false); $page->viewed->add($user); $page->save('viewed'); $page->of(true); Then you can make use of that field to check to see if the current user is listed in the "viewed" field.2 points
-
Hi, My answer to the original question, is 'No, not yet', but I wanted to thank you for the post. I also wanted to say that http://phpjs.org/ lead me to Lodash - https://lodash.com/ which in turn lead me to http://danieltao.com/lazy.js/ . So as you can see it was a pretty fruitful bit of surfing I'd say. Doesn't hurt to have a list of Javascript libraries to refer to, especially in my case if they lend themselves towards functional programming. The reason for that is , believe it or not, I've only recently taken an interest in the functional programming paradigm as it applies to PHP. That interest was piqued by a thread here in a PW forum - https://processwire.com/talk/topic/13494-methods-to-cycle-through-foreachcomparevalues-of-children/?p=121712 I had always put off looking into functional programming for reasons I won't get into here and now as this post is long enough already. Let's just say I regret putting it off for so long. I am finding it an interesting self-study. At some point I believe I will be doing some study of Javascript and functional programming also. Can't hurt, right? Have a good one.2 points
-
InputfieldSelectize A Inputfield to provide a select interface for Processwire CMS FieldtypePage using the (awesome) Selectize.js jQuery plugin, by Brian Reavis. Selectize: https://github.com/selectize/selectize.js Modules directory: http://modules.processwire.com/modules/inputfield-selectize/ Github: https://github.com/outflux3/InputfieldSelectize Features Custom designed options and items for any page select field. Your select options can use any field or subfield on the page, but also sub-subfields, or any data you provide, since you are not limited by tag replacement: you control the precise data supplied to the options using a PHP array that returns data to the module, which is in turn supplied in JSON to the select as adata-dataattribute. The plugin uses the JSON object for each option meaning you can do whatever you want with that data in designing your options/items. Each instance lets you define which fields are searchable for the select Your selects can use display logic based on the value of any field/data item, for example using ternery conditionals you can avoid empty parenthesis. You can design the options and items (what is seen once an option is selected) independently of each other. Therefore you could have special fields on the options for searching, but exclude those on the item. Likewise you can show elements on your item like an edit button which is not needed on the option. Multiselect pages are sortable, and deletable by backspace or optional remove button. When AceExtended editor is installed, the module will use that for the code input fields. Usage Install the Module Edit your pagefield and choose InputfieldSelectize as inputfield. You will see the empty fields that need to be populated to make this work Notes For examples of what you can do (in general) with your selects when using Selectize.js, view the plugin site at http://selectize.github.io/selectize.js/. The plugin theme is selected on the required JquerySelectize module ----- Examples Basic Example PHP (the data array for each item - this must return a plain array): $data = array( 'title' => $page->title, 'company' => $page->company_select ? $page->company_select->title : 'Not set', 'total' => count($page->recipients), 'editUrl' => $page->editUrl ); return $data; Javascript (item and option same) Here, the item.property each refer to the keys of the PHP array that you returned in the above field. This field must be a valid Javascript string with each of the properties you want to show as demonstrated below, and recommended to use the escape(item.property) syntax. These strings are passed to the render functions of the plugin. '<div class="item">' + '<span style="display:block;font-size:14px;font-weight:bold;">' + escape(item.title) + ' (' + escape(item.total) + ')</span>' + '<span>' + escape(item.company) + '</span>' + '</div>' Example screenshot: A more advanced example This example shows how to use conditionals for the PHP and JS to get the select options to look clean and provide the necessary information to assist users in choosing the correct options: PHP $data = array( 'title' => $page->title, 'year' => $page->year ?: $page->year_sort, 'for_inst' => $page->for_inst, 'edit_href' => $page->editUrl ); return $data; Item Javascript: '<div class="item">' + '<div style="color: black; font-size: 14px;"><span style="font-weight:bold;">' + escape(item.title) + ' (' + escape(item.year) + ')</span>' + ' <a class="pw-modal pw-modal-medium" href="' + escape(item.edit_href) + '">Edit <i class="fa fa-edit"></i></a></div>' + (item.for_inst ? '<div style="color:gray;">for ' + escape(item.for_inst) + '</div>' : '') + '</div>' Option Javascript: '<div class="item" style="width:100%;">' + '<div style="color: black; font-size: 14px;"><span style="font-weight:bold;">' + escape(item.title) + ' (' + escape(item.year) + ')</div>' + (item.for_inst ? '<div style="color:gray;">for ' + escape(item.for_inst) + '</div>' : '') + '</div>' Example with images In this example the selects will feature a thumbnail image: You could also set the width of the selected item to 100% depending on where you place the field (e.g. in a column) $image = $page->images->first(); $thumb = $image->size(100,100); $data = array( 'title' => $page->title, 'thumb_src' => $thumb ->url, 'img_dims' => $image->width . 'x' . $image->height, 'img_desc' => $image->description, 'img_size' => $image->filesizeStr, 'edit_src' => $page->editUrl ); return $data; '<div class="item" style="width:100%;">' + '<div class="image-wrapper" style="float:left;"><img src="' + escape(item.thumb_src) + '" alt=""></div>' + '<div class="info-wrapper" style="float:left; padding:5px;">' + '<span style="font-size:14px;font-weight:bold">' + escape(item.title) + '</span><br>' + '<span>Dimensions: ' + escape(item.img_dims) + 'px</span><br>' + '<span>Filesize: ' + escape(item.img_size) + '</span><br>' + '<span>' + escape(item.img_desc) + '</span><br>' + '<a class="pw-modal pw-modal-medium" href="' + escape(item.edit_src) + '">Edit <span class="ui-icon ui-icon-extlink"></span></a></div>' + '</div>' '<div class="item">' + '<div class="image-wrapper" style="float:left;"><img src="' + escape(item.thumb_src) + '" alt=""></div>' + '<div class="info-wrapper" style="float:left; padding:5px;">' + '<span style="font-size:14px;font-weight:bold">' + escape(item.title) + '</span><br>' + '</div>' + '</div>' Current Notes & Issues: Works with 3.0.23 devns Doesn't currently support creating new options (and may exhibit strange behavior if you try and add one not in the list) Doesn't yet support optgroups2 points
-
2 points
-
FrontendUser The FrontendUser module provides a frontend login, logout and user registration functionality. Features See module documentation for details. login with error handling and value sanitizing Plugin: ProcessForgotPassword core module integration Plugin: LoginPersist module integration user registration with username and email address already in use check email adress pre-register validation (email verification) Extendable with additional fields and by PW hooks forms generated by PW form api Custom style / script Requirements FormHelper (0.7.1+) Usage Documentation / examples Repository PW module repo GIT repo ToDo / Issues Issues I hope it will be helpful to the community and I would be glad to get feedback or suggestions for improvement!1 point
-
This topic will serve as the thread for the Selectize.js family of modules, which utilize this popular jQuery plugin for enhanced tagging of images, fields, templates and page selection in Processwire admin. http://selectize.github.io/selectize.js/ The modules will ultimately include: JquerySelectize Base module that provides the library for use by other modules Github: https://github.com/outflux3/JquerySelectize Modules: http://modules.processwire.com/modules/jquery-selectize/ ----- SelectizeTemplateFieldTags Uses the library to init the tags field on fields and templates, and makes the icon searchable by name. Github: https://github.com/outflux3/SelectizeTemplateFieldTags Modules: http://modules.processwire.com/modules/selectize-template-field-tags/ Screens: Tagging a template: *******sorry but the forum upgrade destroyed these images -- you need to click on them to see them now ******** Search icons by name and see the icon: ----- SelectizeImageTags Uses the library for image tags field. Github: https://github.com/outflux3/SelectizeImageTags Modules: http://modules.processwire.com/modules/selectize-image-tags/ Screen:1 point
-
Bootstrap-4 Minimal site profile for ProcessWire This profile is based on the "minimal site profile (intermediate edition)" and bundled with Boostrap v4.4.1 Features Bootstrap SASS Font-Awesome SASS Render / helper functions for : Simple ul navigation Bootstrap Multi-level navbar Bootstrap Carousel Bootstrap Cards Bootstrap Jumbotron Boostrap Accordion Assets minification, files bundle Dependencies jQuery Popper.js Bootstrap FontAwesome Prequisites You'll want to install the following on your system before proceeding: Yarn / NPM How To Install Download the zip file at Github or clone directly the repo with git clone and skip the step 2. Extract the folder site-pwbs4-master into a fresh ProcessWire installation root folder. During the installation of ProcessWire, choose the profile "ProcessWire Bootstrap 4 profile". After installation You can find the development file (CSS/SCSS/JS) in site/assets/dev/src The profile can be used as is only with $config->debug set to false. To use it in debug mode, you are required to install the dependencies with the package manager. Open a terminal in site/assets/dev and execute the following command-line: yarn Available commands : Rebuild, minify and bundle assets for release : yarn build References Bootstrap v4 documentation ProcessWire documentation ProcessWire Forum: bootstrap tag ProcessWire Forum: bootstrap related posts Credits The ProcessWire staff Inspiration from @gebeer and his Bootstrap 3 profile post Members who contributed in various post about Bootstrap navigation and code (see code-source for refs). Screenshots1 point
-
At the end of the day they decided to stick with WordPress already told them i won't manage the WP if that's their decision1 point
-
I'm not sure how your local setup does look like, but I really like this one: https://github.com/wilmoore/php-version Just switch around php versions in no time1 point
-
Thanks for reporting that - I was struggling to figure out why you were getting those errors. I guess it's getting to the point that we all need to have a PHP7 testing environment set up so we can fix these sorts of things. I'll see what I can do about getting it 7 compatible fairly soon.1 point
-
... and i will eat my mouse! On the my local machine i have PHP version 7. When I change it to 5.6.10 - no errors anymore. Read and import cvs file correctly into table. Thanks for your support Andrian! I hope that situation will be in plus to your future development of that useful module. Thanks again!1 point
-
In the current state of the profile, Bootstrap is already precompiled in css/styles.css; You can also find in the folder css a file called main.css where you can override all values and use it as pure css - without the need of using sass and associated tools - but at this point you still need Bower. Bower is used to manage assets like font-awesome and a dependency like tether in our case. With this tool we can manage libs easily and we can avoid repeating tasks. It is really easy to install and do not require any knowledge for the task we accomplish here. If you want to get started with, check the following instructions : goto https://nodejs.org/ , download / install NodeJS install Git (if you're on Windows, be sure to check Run Git from command-prompt) open a terminal and type npm install -g bower done. You can now execute the bower install command-line. Anyway, if its really required, I can make tonight a profile with precompiled files so you can test it this week-end . Just let me know.1 point
-
1 point
-
Great to hear. I actually just committed a new version that significantly changes how some of the comments are parsed - could you please check to make sure this is still working. I had been thinking about that - you made me decide to go ahead with it. I also added a new column showing the type of the comment to make it easier to scan. I updated the screenshot a couple of posts above. Please let me know what you think and if you have any other tweaks/suggestions. I have been wondering if anyone might want to configure the comment types that are parsed. As I mentioned above, they are currently: 'todo', 'fixme', 'pending', 'xxx', 'hack', 'bug' but if some of you use others, then I'd be happy to make this configurable, or hardcode in a few key additions.1 point
-
Hhhm, yes! For me it is it a bit too. But I thought to try it out and maybe it is lesser code to write. We will see how it goes.1 point
-
Take a look here https://processwire.com/talk/topic/6833-module-templateenginefactory/?p=78641 and also my comment https://processwire.com/talk/topic/6833-module-templateenginefactory/?p=1223541 point
-
@pwired : I will send an email to @kongondo about processwireshop.pw! Thanks for suggesting that. ---- A small trick to make the navbar/dropdown working on mouseover instead of click event: In js/script.js add : $(document).ready(function(){ $('ul.nav li.dropdown').hover(function() { $(this).find('.dropdown-menu').first().stop(true, true).delay(200).fadeIn(200); }, function() { $(this).find('.dropdown-menu').first().stop(true, true).delay(200).fadeOut(200); }); });1 point
-
The upgrade will begin around 3-4pm 4-5pm GMT today. For reference, at the time of posting this its 1.21pm GMT. As mentioned there will be some short periods of downtime so please bear with us.1 point
-
Nope, sorry. For me that is to 'decoupled'.1 point
-
I understand theoretical part of how to do but fail to make it work. page field that have parent set as "Users" already contain all users under it and how do check if it have (I assume $field->get($user)). Or I miss something. EDIT: Ok it seems you can select for all users. With $item->viewed->add($user) you actually add them. As long as I don't touch viewed in backend - added ones are only ones who you get from $item->viewed->get($user) call1 point
-
Is there any chance this site is online and I could possibly get access to take a look? Are all 63 errors shown in that screenshot coming from this module? Could you maybe at least show me the contents of that panel?1 point
-
Depends on how many users you have - checkboxes or ASM select will be ok up to a point, but won't work well if you have hundreds/thousands of users.1 point
-
just curious if anyone uses any part of that library... http://phpjs.org/ there are some nice little functions here and there you can include in your project and then use the familiar php function; http://phpjs.org/functions/ucfirst/ http://phpjs.org/functions/ucwords/ http://phpjs.org/functions/strtotime/1 point
-
great - thanks for the report; what i like about php.js (which i guess is now Locutus) was being able to grab a function when/where needed from there and pop it right into a project's main.js file and thanks for those references to Lodash and lazy.js, just took a look over at those sites...1 point
-
I want to thank of all the nice and clear comments. I was just curious about what is possible with processwire depending on developing custom systems and applications. Your answers pointet that out.1 point
-
Ok - now with this last link you made a special xmas present in the middle of june... Thank you again for your useful hint. <ot>...I'm part of this forum for two years, using devns, read every week the interesting topics....and there are still so much hidden goodies </ot> best regards mr-fan1 point
-
Just added a ToDo panel: It reports the following comment types: 'todo', 'fixme', 'pending', 'xxx', 'hack', 'bug' If you have your editor configured, the comment text link opens the file to the line of the comment. The icon reports: the number of items in the template file for the current file / the total number of items across all files. Red: there are items for the current page's template file. Orange: there are items in other files, but none in the current page's template file. Green: no items in any files under /site/templates/ Please let me know if you find any items that aren't being reported, or items repotred that shouldn't be. One other key change in the last commit is to the Console Panel - you can now use CTRL+Enter or CMD+Enter to run the code. This keeps your hands on the keyboard and keeps the code textarea focused making it much easier to quickly make and test changes to your code.1 point
-
See updated first post. I'll post more when we're closer to starting the process. @Apeisa - just been enjoying some good downpours the last few days, but wouldn't mind the sun making a return1 point
-
Aboslutely loving the module! And would recommend the following changes in FrontendUserRegisterEmailValidation.module line 127 change to: if ($form->fhValue('EmailPreValidation') != wire('session')->get('registerToken') && !wire('session')->get('registerStep')) { //dont throw the initial error... line 160 insert: $form->remove($form->get('EmailPreValidation')); //hide the token field before the email is sent = less distraction1 point
-
Thought I would release a pretty simple module I made that integrates the awesome OneLogin PHP SAML toolkit into ProcessWire so you can use SSO with your ProcessWire website. Mainly developed for my own purposes as I have used SAML plugins with WordPress for many years and now that ProcessWire is my go to CMS I sort of missed the convenience of having SSO between sites and services. This is my first attempt at a ProcessWire module, it's probably not the best in terms of code, but it has been pretty stable in my tests. Here's a little demonstration of the module in action https://www.youtube.com/watch?v=YWcsV6RTh90 GitHub repo and Installation Instructions https://github.com/adamxp12/ProcessWire-SAMLAuth Any feedback would be appreciated. Even though this is quite a niche module.1 point
-
New site for SteynStudio using bb-starter, AIOM, Batcher, image crop, Textarea Counter, Site-wide File Manager.1 point
-
hi wanze, would it be possible to change the markup a little bit? i got a message that my sorting module ( https://processwire.com/talk/topic/13064-inputfieldfile-image-sorting-autosorting/ ) does not work with your securefile fieldtype. the problem is, that my module sorts the files based on the selector: tinysort(field.find('li.InputfieldFileItem'), {selector:'a.InputfieldFileName', attr:'title', order:direction}); and you are modifying this markup here: https://github.com/wanze/FieldtypeSecureFile/blob/master/FieldtypeSecureFile.module#L98 one solution would be to create a different selector for your fieldtype... i failed when trying to find a solution. would it be possible to modify your markup to an anchor: <a class="InputfieldFileName" title="thefilename.ext">...</a> thanks1 point
-
Hi ottogal, Sorry for my late response. I currently don't have time to update Batcher, at least not for the next month. The module needs a rewrite because a lot changed since this was released, for example: Native support of ProcessWire's modal Make use of InputfieldSelector to build the selector strings ... I hope to update the module at the end of may, but since I don't know the release date of Pw 3 I can't promise... unless someone else takes over. Cheers1 point
-
i think the best option is to remove the ACE completely and then have the module simply check to see if the Ace Extended module is installed, if it is, then use that and init for PHP; otherwise show a normal text area; the module could show a link to install Ace extended for those who want to edit their codes in the admin. I have a module that does this, and it so far works fine...1 point
-
Maybe try markdown syntax [Title](http//:…/). This at least works for the description/notes.1 point
-
Repeater pages have a method getForPage() to get the page the repeater is living on.1 point