Leaderboard
Popular Content
Showing content with the highest reputation on 11/23/2016 in all areas
-
When you're editing a page and meanwhile your login session expires, there should be a warning. I don't know why, but I found myself in that situation at least twice and a friend of mine had lost text (got an email just now) . Maybe if the connection has dropped while you write or some other timeout!? Anyhow, if you click save you are forwarded to the login page and the content is lost. Quite harmful Perhaps the "Save" button could check if the session is still available before finally submitting. Or a warning at the top and bottom. I think WordPress made a good solution and opens a modal window if you're session is lost.5 points
-
This is a four part tutorial that should get you started: http://blog.mauriziobonani.com/processwire-basic-website-workflow-part-1/4 points
-
This is something I used in a couple of modules recently and it could be useful as a standalone hook. It adds classes to the body tag in the admin theme for: roles the user has if the user is a non-superuser the user's name You could use this if you want to tweak the admin interface for a role using CSS/JS (e.g. with Admin Custom Files). There is also an old wishlist item requesting this. $this->addHookAfter('AdminTheme::getExtraMarkup', function($event) { $theme = $event->object; $user = $this->user; foreach($user->roles as $role) { $theme->addBodyClass("role-{$role->name}"); } if(!$user->isSuperuser()) $theme->addBodyClass("role-nonsuperuser"); $theme->addBodyClass("user-{$user->name}"); });4 points
-
4 points
-
Would you mind if I add this to AdminOnSteroids? (probably won't be configurable)3 points
-
Use this module: http://modules.processwire.com/modules/fieldtype-pdf/ Or if you want to make images of all pages in the PDF, then try this one: https://github.com/adrianbj/ProcessPDFImageCreator Keep in mind that creating images from PDF files requires that Ghostscript is compiled into Imagemagick. Also, if you are uploading PDFs created for print (ie in CMYK), then you should read this: http://www.lassosoft.com/CMYK-Colour-Matching-with-ImageMagick so that you can get better color matching - otherwise the images will look washed out.3 points
-
Media Manager version 007 (released (23/11/2016)) Happy to announce the latest release of Media Manager. Download via your purchase link. Changelog Multi-tagging: Added to the list of actions to apply to selected media. Tick the checkbox to replace rather than append to existing tags. 'Un-tagging' also available in the list of actions. Uploading now possible when in CKEditor context. Settings moved to own menu item. New settings added: Media title format; Handling duplicate media (all 4 media types); Display current users' media only; Media sorting + sort order Replace/Rename/Skip Duplicate media: When new media loaded and a duplicate is found in the library, this setting tells MM what to do. If using 'Replace' mode, existing tags and descriptions are preserved. There is also a setting to preserve or delete existing image media variations. @note: Might need a couple of refreshes (browser and/or MM before replacement media is shown). Media Sorting: Set via settings (@see #4). Live Media Sorting: In your Media Manager Library, select sort criteria (dropdown select) and sort order (checkbox). These override the sort settings in 'Settings' (@see #3). List and Grid View: Click on respective icons to switch to list versus grid view. In list-view, the current media (displayed on the right pane) remains in view as you scroll the page. @note: currently there is a bug where your media image will remain fixed at the top of the window when you scroll back up in cases where it is taller than your monitor. Please see this post. Insert Link and Insert Image: Streamlined insert link and insert image in CKEditor. MMLink and MMImage plugins are now obsolete! Go ahead and delete them please. Instead, we use and extend ProcessWire's inbuilt PWImage and PWLink. Code refactoring, bug fixes, CSS fixes. @note: As previously announced, this version is still not yet certified as compatible with ProcessWire 2.8 and 3.X. This means the repeater matrix bugs will still be present. Next version of MM will be compatible with these versions of PW.2 points
-
Good day! You already listed two best ways to get started: going through tutorials and reading the code available. Nothing will get you any further but starting a project, facing questions and finding answers in the forum or asking for help. Everybody here has walked this way. So good luck on this one the most exciting journeys in your webdev career! Viam supervadet vadens.2 points
-
2 points
-
2 points
-
Not yet, but that should be easy to add as a module config option. I'll try to get around to it this week. Stay tuned.2 points
-
2 points
-
Hi folks! I'm about to add my new module FieldtypeAssistedURL to the repository. You find the source code on github and hopefully in the modules repository soon. Here an extract from the README.md: This module offers you a new field type AssistedURL Field, providing and input field for storing absolute and relative URLs. The field type adds a button to open the URL chooser dialog known from the CKEditor link feature without the tab navigation bar for specifying link attributes. Using the URL chooser dialog the editor may select URLs from internal pages or uploaded files via a search field with auto-completion, a page tree control, and a file selector control. Please feel free to post suggestions and any form of feedback here in the forums or on github. Wumbo1 point
-
One of PW 3.010's major novelty was the introduction of Horst's new image resizing engine that uses ImageMagick. Now I understand that ImageMagick can convert images to Webp, the image format that Google says can reduce image size up to 34% compared to JPEG. Mozilla is apparently adding support to Firefox, and even the Safari team is playing with it, so it looks like Webp is soon going to be available in most major browsers. If Horst's module can be extended to add Webp conversion, that would be a great addition to PW's already very powerful image manipulation arsenal. I'm currently using the free ImageEngine Lite to serve Webp images to supporting browsers, and the results are impressive. I routinely get images that are between 25 and 60% smaller compared to JPEG, with the same visual quality. I would love to eliminate the need to rely on a third-party service though.1 point
-
This is our latest site using PW. Most of the grunt work is done with core modules but ProCache makes sure everything is super fast and the core image resize function was deployed everywhere an image is used to make sure everything stays looking good. The site uses a premium theme for it's graphical layout with colours and some typography changed to match the companies in-house style. Page templates themselves are hybrids using bespoke collections of the content blocks in the theme. A 'site settings' page is was added to the admin which collects and allows edits to site wide details such as phone number, email, GA code and main menu items etc. Comments welcome! http://www.brownhensolutions.com/1 point
-
@SubMon I assume you are using ProcessWire 3.x? Check out this comment: You need to disable the FileCompiler for your twig templates. There's currently no way for the module to tell the compiler to ignore these files, so at the moment this seems like the only solution. However, there is a pull request open to support this and I hope it's getting integrated soon. Cheers1 point
-
It looks like executable is not found because it's not within the PATH. Do php -r "print getenv('PATH');" from shell or phpinfo(); from php and check for environment variable PATH. Make sure that jpegoptim (and others) are on the path. You could also check what shell is executed: echo shell_exec("echo $0"); It's possible that it's sh and not bash You may need to use the putenv command or determine whether your path needs to be set in /etc/profile, ~/.profile or ~/.bashrc in order for it to be picked up by the user runing php. Some versions of apache read configuration from /etc/apache2/envvars . You can set environment vars locally within a VirtualHost config using SetEnv. Or it might help if you put putenv('PATH=/your/path'); somewhere in the php, just for the test. You could also set the path of jpegoptim (and other binaries) by modifying optimizeSettings in AutoSmush.module: $this->optimizeSettings = array( 'ignore_errors' => false, //in production could be set to true 'jpegtran_options' => array('-optimize', '-progressive', '-copy', ' all'), 'jpegoptim_options' => array('--preserve', '--all-progressive', '--strip-none', '-T' . self::JPG_QUALITY_THRESHOLD), 'optipng_options' => array('-i0', '-o2', '-quiet', '-preserve'), 'advpng_options' => array('-z', '-3', '-q'), 'jpegoptim_bin' => '/path/to/jpegoptim', <== add this line ); All this is specific to the environment, so I can't give detail instructions on how to make "Local tools" to work. I'm also not a linux user, I tested tools on windows. Let me know how it goes.1 point
-
Thanks @szabesz for the link! @Ivan Gretsky I will do my very best1 point
-
1 point
-
It is true. But watch out for this: https://woocommerce.wordpress.com/2016/10/27/the-new-crud-classes-in-woocommerce-2-7/ "How will this affect existing plugins? If you do anything with product, customer, orders, and coupons, you will be affected in some way. Even if you do a simple update meta call. This won’t break immediately, but your code will not be future proof. As soon as the schema changes in another update, your code will fail." So choose only those plugins that are likely to be updated in the future. Also, keeping an eye on WordPress I can see that lots of breaking changes are ahead. Sure, they will probably not be introduced without some sort of deprecated code support, but not updated plugins will cause a lot of troubles for WordPress users in the following years to come...1 point
-
So, after looking at wordpress theme development, it just feels so wrong compared to pw. It seems like you are hacking the whole system to do something more than a blog. In conclusion, for now I will have to use wordpress because of all the out of the box solutions, mainly woocommerce. But at the same time I will try my best to learn more about php and the pw arquitecture, to build an ecommerce solution. Expect a lot of topics from me1 point
-
Those permissions are likely the problem. Take a read here: https://processwire.com/docs/security/file-permissions/1 point
-
Maybe a race condition? Two people hitting the cache expiration time at the exact moment?1 point
-
1 point
-
Maybe I am crazy, but I looked in the 'Store' tab to see if there was a processwire t-shirt I could order.1 point
-
1 point
-
Thank you all for the replies @adrian I think this will do it Will try it next time I have to delve into modules, but it looks good ^^ Thank you! @Robin S That wont be a problem for this situation but thanks for the warning1 point
-
1 point
-
1 point
-
v0.0.6 released. PageTables may now be restricted by role (uses CSS/JS so not suitable for mission-critical restrictions) New options to prevent trash, prevent drag sorting, and removal of all "Add" buttons regardless of template. Improved config system (screenshot in first post updated)1 point
-
I would suggest taking a look at Profields Table (http://processwire.com/api/modules/profields/table/) which now supports pagination. Actually, technically it is the PW core that now supports it and the Table field is the first to implement it. So technically you could add it to this custom Events fieldtype, but the Table field would make your life much easier.1 point
-
@LimeWub, one thing to be aware of is that this will make your module incompatible with PW2.x. But that may not be a problem to you.1 point
-
You have more than the event->return available to you in the hook - you have $event->object, which is the inputfield. $this->addHookAfter('InputfieldFile::renderItem', function($event) { $inputfield = $event->object; $files = $inputfield->value; // find file you want in $files });1 point
-
Just released a new version of this module! This module is now available without using the ProField : Table. The import for features is faster now you can import it to a textarea field. It is still available to import the features of the products to the ProField: Table if the user wants to.1 point
-
Sorry for inconvenience! I just realised that the whole directory was missing on github. I fixed that and also upgraded AS to v1.0.2 that add support for CroppableImage3.1 point
-
Ok, merchandise fans, please give my spreadshirt shop a visit. (I've not run a spreadshirt shop before so I am learning as I go.) @teppo, @All; you might find some designs in there that interest you more than the one I posted above.1 point
-
Great tutorial Soma! This is the best summary of using PW's Inputfields that I've seen. I noticed you did $field->attr('id+name', 'email') so just wanted to explain what that is for those that may be unsure of the syntax. That syntax is basically saying to set the 'id' and 'name' attribute to have the 'email'. While every field needs a 'name' attribute (like in HTML) the 'id' attribute is optional… if you don't assign an id attribute, PW will make one up. If you intend to custom style a field with CSS or target it from javascript, then it's best to assign your own 'id' attribute. Otherwise, it doesn't matter. // this… $field->attr('id+name', 'email'); // …is the same as: $field->attr('id', 'email'); $field->attr('name', 'email'); // …as is this (direct reference): $field->id = 'email'; $field->name = 'email'; The advantage of using the attr() function over direct reference is that attr() can't ever collide with other Inputfield properties that might have the same name as a field attribute. It's basically your way of saying "this should definitely be an HTML attribute and not anything else." For recognized attributes like 'name' or 'value' it doesn't matter what syntax you use because an Inputfield already knows 'name' and 'value' are standard HTML attributes. But if you needed to add a custom attribute like "data-something", well then you'd definitely want to use the attr() method of setting. That attr() method should only be used for things that would actually be HTML attributes of the <input>, because they will literally end up there. So if you do an $field->attr('label', 'Hello'); you'll end up with an <input label='Hello'> in the markup, which is obviously not something that you want. That's why you assign a non-attribute property like 'label' or 'description' directly, like: $field->label = 'Something'; Last note about $attr() is that it can be used for both setting and getting attributes: $field->attr('value', 'something'); echo "The field's value is: " . $field->attr('value'); // same as: $field->value = 'something'; echo "The field's value is $field->value"; To extend your example, lets say that you wanted the 'email' and 'password' fields in a fieldset titled "About You". You would create the fieldset, and then add/append the fields to the $fieldset rather than the $form. Then you'd add the $fieldset to the $form: $fieldset = $modules->get('InputfieldFieldset'); $fieldset->label = 'About You'; $field = $modules->get("InputfieldEmail"); $field->label = "E-Mail"; $field->attr('id+name','email'); $field->required = 1; $fieldset->append($field); // append the field $field = $modules->get("InputfieldPassword"); $field->label = "Password"; $field->attr("id+name","pass"); $field->required = 1; $fieldset->append($field); $form->append($fieldset); Or lets say that you wanted those 'email' and 'password' fields to be each in their own column so that are next to each other horizontally rather than vertically. You would assign the 'columnWidth' property to both the email and password fields. In this case, we'd give them both a value of 50 to say that we want them to be a 50% width column: $field->columnWidth = 50; To jump out of tutorial mode and into idea mode: lately I've been thinking that PW should have a YAML to Inputfields conversion tool in the core (something that would be pretty easy to build), so that one could define a form like this: And create it like this (where $yaml is the string above above): $form = $modules->get('InputfieldForm'); $form->load($yaml); echo $form->render();1 point