Leaderboard
Popular Content
Showing content with the highest reputation on 03/19/2016 in all areas
-
ProcessWire 3.0.12 now supports the ability to use extended (UTF-8) page names, meaning your URLs can now have just about any characters that you want… https://processwire.com/blog/posts/hello-健康長壽·繁榮昌盛5 points
-
Got it sorted, and complete plugin code is: // Keyboard shortcuts for headings 1-6, p ( function() { CKEDITOR.plugins.add( 'keystrokes', { init: function( editor ) { editor.addCommand( 'h1', { exec: function( editor ) { var format = { element: 'h1' }; var style = new CKEDITOR.style(format); style.apply(editor.document); } } ); editor.addCommand( 'h2', { exec: function( editor ) { var format = { element: 'h2' }; var style = new CKEDITOR.style(format); style.apply(editor.document); } } ); editor.addCommand( 'h3', { exec: function( editor ) { var format = { element: 'h3' }; var style = new CKEDITOR.style(format); style.apply(editor.document); } } ); editor.addCommand( 'h4', { exec: function( editor ) { var format = { element: 'h4' }; var style = new CKEDITOR.style(format); style.apply(editor.document); } } ); editor.addCommand( 'h5', { exec: function( editor ) { var format = { element: 'h5' }; var style = new CKEDITOR.style(format); style.apply(editor.document); } } ); editor.addCommand( 'h6', { exec: function( editor ) { var format = { element: 'h6' }; var style = new CKEDITOR.style(format); style.apply(editor.document); } } ); editor.addCommand( 'p', { exec: function( editor ) { var format = { element: 'p' }; var style = new CKEDITOR.style(format); style.apply(editor.document); } } ); editor.setKeystroke( CKEDITOR.ALT + 49 , 'h1' ); // ALT + 1 editor.setKeystroke( CKEDITOR.ALT + 50 , 'h2' ); // ALT + 2 editor.setKeystroke( CKEDITOR.ALT + 51 , 'h3' ); // ALT + 3 editor.setKeystroke( CKEDITOR.ALT + 52 , 'h4' ); // ALT + 4 editor.setKeystroke( CKEDITOR.ALT + 53 , 'h5' ); // ALT + 5 editor.setKeystroke( CKEDITOR.ALT + 54 , 'h6' ); // ALT + 6 editor.setKeystroke( CKEDITOR.ALT + 55 , 'p' ); // ALT + 7 } }); } )(); After adding the plugin it needs to be activated in the field settings > Input > Extra Plugins keystrokes.zip5 points
-
4 points
-
I'd say that it's definitely about blocks: concrete5 makes it quite easy to create unique page structures on the fly. It's not like we couldn't do something similar with ProcessWire, but in the case of concrete5 it's a built-in, original core concept, and thus it's no surprise that they excel in this area. Some of their UI's still look really ugly and amateurish, but putting that aside, it's a great product in many ways. That being said, personally I'm not such a huge fan of this strategy. I'll admit that it does empower the content editor and give them a lot of sway on the way the site looks, but that's actually a double-edged sword: sometimes it works out just fine, but sometimes the site ends up being a total mess. Especially for sites with a bunch of content editors and a lot of content, a well planned structure and information architecture is a must I remember looking into concrete5 a few years ago, the main reason being the way they handle page blocks. Their concept is nearly identical with our old in-house CMS (page blocks, content areas, all of that) and when we decided to move on, concrete5 seemed like the obvious choice. For various reasons we ended up with ProcessWire instead, and I'm glad we did.3 points
-
Given the following: you never show original images to the visitors, (what I highly recommend, as of the original should be in 100% quality, what would be much to high filesizes) every image variation is created through pageimage (= is a (new) imagesizer engine) it is possible to define a .htaccess directive for redirecting to the /site/assets/files/{ID}/{IMAGES} It should be possible to clone and modify one of the new Imagesizer Engines in that way, that you transport a copy of each created variation to the nginx cluster here in the image engine. Then the only other thing you need is a hook into Pagefiles::delete! So, you would need a module like this <?php namespace ProcessWire; class ImageSizerEngineIMagickNginx extends ImageSizerEngineIMagick { public static function getModuleInfo() { return array( 'title' => 'IMagick Image Sizer with nginx-Cluster', 'version' => 1, 'summary' => "Upgrades image manipulations to use PHP's ImageMagick library when possible.", 'author' => '', 'autoload' => false, 'singular' => false, ); } public function init() { $this->addHookAfter('Pagefiles::delete', $this, 'deleteNginxfile'); // Fired when a file is deleted from a page } // a complete copy of the original method, with addition of a call to the upload method as shown above, (line 342) protected function processResize($srcFilename, $dstFilename, $fullWidth, $fullHeight, $finalWidth, $finalHeight) { ... uploadToNginx($dstFilename); ... } public function uploadToNginx($imagefile) { // get the page id for the assets subfolder and get the basename of the $imagefile to build the target ... upload $imagefile to target } public function deleteNginxfile() { // see the S3 module } } PS: I would process the variations with 100% quality and pass the variations through an image optimizer like jpegoptim, just before you have to upload it. But I think that this is on your todo already.3 points
-
ProcessWire does not separate backend and frontend user, it's up to you if you allow a user to access the backend. So the frontend dashboard could work like this: The user registers on the frontend and you create a ProcessWire user with all given information. This will also assign a unique ID to the user object. Create a template "dashboard" where you grab the user-ID via urlSegment1 Display any stuff you want in this template Cheers3 points
-
You guys have to do it through Google translate. I'll give you something straight from the target audience of this update. ПроцессВаир теперь поддерживает кириллические урлы! С сегодняшнего дня сайты в зоне .рф можно полноценно создавать на этой замечательной системе. Благодарим Райана за заботу. Ура, товарищи!3 points
-
http://modules.processwire.com/modules/markup-twitter-feed/ This module works fine, though you will have to generate the markup to achieve the "looks" of the Wordpress plugin you are puttin as example. Although, thanks to Processwire, nothing will get in your way to accomplish this Check this part of the module documentation: You might also want to to take a look at: https://dev.twitter.com/overview/api/tweets To know how the tweet objects are organized in the array returned by the module. (take a look at how $item variable is accesed when echoing the string)3 points
-
I'd imagine that these use-cases are actually all trying to prevent local serving of files. Therefore I'd imagine local storage of files not even being that useful. But this would certainly need a custom FilesManager/Pagefiles/…file/…image(s) implementation and maybe custom Fieldtype, but I'm not sure about that as the stored field data can be the same. Maybe I'll find some time in the next weeks to build a implementation around flysystem.It's already quite well equipped with various third party file storage implementations.2 points
-
This Module was one of the first modules I have written for PW. By myself I didn't use the module since a long time. Now I integrate Audioplayer normally with html5 audio tag and beautify it using the following 2 Javascript Libraries. http://mediaelementjs.com/ https://github.com/johndyer/mediaelement/ or https://kolber.github.io/audiojs/ But if you like it, I pushed an update (v1.2.0) to github and the modules directory and tested it under 3.0.x without problems. Please read instructions, create a template file like: // template file echo $page->player['code'];2 points
-
Another way could be to build and use an independent module and hook into after ImageSizer::resize instead building a (redundant) copy of a imagesizer engine module. Advantages: it will work with every (different) invoked imagesizer engine/s, and not only with the custom modified one! <?php namespace ProcessWire; class ImagesizerWithNginx extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Imagesizer with Nginx-Cluster', 'version' => 1, 'summary' => "", 'author' => "", 'autoload' => true, 'singular' => true ); } public function init() { $this->pages->addHookAfter('ImageSizer::resize', $this, 'uploadToNginx'); // Fired when a new or updated variation is created $this->addHookAfter('Pagefiles::delete', $this, 'deleteNginxfile'); // Fired when a file is deleted from a page } public function uploadToNginx($event) { $image = $event->object->image; $pageID = $image->page->id; $filename = $event->object->filename; $extension = $event->object->extension; // optionally optimize the image bfore upload, and then ... upload image to target } public function deleteNginxfile($event) { // see the S3 module } }2 points
-
Assuming that each user should have access only to his own account/ content, there is no need to work with UrlSegments since you have access to the $user API. The output of example.org/dashboard/ can be individually to each user. Example: Create a role 'frontenduserrole' without any permission. Create a template dashboard and a file dashboard.php like if ($user->isLoggedin() && $user->hasRole('frontenduserrole')) { echo "Welcome back $user->name"; } else echo "You need to login first.";2 points
-
NoScript apparently has a history of reporting "XSS issues" when there are in fact none, and apis.google.com is listed as one source of these false positives. Personally I wouldn't worry about this too much.2 points
-
Ah, you're using MAMP (Pro?). Try the following: * Main window › MySQL, tick checkbox "Allow network access" (I got the German version of MAMP, don't know the proper translation), restart. * In ProcessWire's /site/config.php, replace localhost with 127.0.0.1 This is also an issue I found while working on wireshell with that particular MAMP set up.2 points
-
This is great news. Thanks Ryan for your amazing job to make PW better and better and better and better.........(deleted 1000 words) Gideon2 points
-
And to keep the copy pasting errors to a minimum: http://codepen.io/LostKobrakai/full/xVgooN/2 points
-
2 points
-
Hi everyone! With Batcher you can batch-edit and create Pages in the Pw Admin. If you install this module, you get a new Page "Batcher" under Setup. Modules page: http://modules.processwire.com/modules/process-batcher/ Github: https://github.com/wanze/ProcessBatcher Editing How does it work? Search your pages with a selector. You can check if you want to include also hidden/unpublished pages with the filters. Select the pages you want to execute an action (the action only gets executed on "checked" pages). Select the action and if necessary, additional data like the new parent or the new template. Execute. Supported actions: Publish/Unpublish Pages Hide/Unhide Pages Lock/Unlock Pages Trash Pages Delete Pages Change Parent Change Template Batcher does the following permission checkings for the current user: Don't display pages that are not editable Remove Actions if the user doesn't have the permissions (page-delete, page-move, page-template, page-lock) Important notes: When changing a template, data in fields of the old template which are not assigned to the new template gets deleted. When changing the parent, the template of the new parent must accept the pages template as children. This is a setting in the template under "family". Creating How does it work? Select a parent where your new pages will be added as children Add as many pages as you want by clicking "add Page" Click "Create Pages" You must enter a title and choose a template. The name is optional: If left empty, Pw will generate this for you. Includes permission checking and Family template restrictions. This means in detail: The selected parent must accept children and their template The pages template must accept the parents template User needs the permission to add children to the selected parents template User needs the permission to create Pages for the chosen Template Batch-creating tips The chosen template and the statuses are always cloned from the last row. So if you need to add 30 pages with the same template, define it first and the click "add Page" - it'll make your life easier ;-) You can drag & drop the table rows should you want to change the order. The dragging looks ugly but it works. For the lazy dogs and keybord hackers among us, you can add a new row by pressing "ctrl+n". This works (at least in firefox) only if no input has focus. After adding a new row, the title input gets the focus. By pressing 3 times tab you arrive at the published-checkbox, here the short-cut works. Restrict Batcher for a user to only allow editing or creating Create permissions "batcher-edit" and/or "batcher-add". As soon those exists, the module checks if the current user has the permissions. If you only need batch creating, check out the following module by Soma: http://processwire.com/talk/topic/2138-process-tools-create-pages-wip/ Cheers1 point
-
You'll be using a page field. You could use a multi page field on the course and link users to it or you could add a field to the user template to link users to courses. Which one is better depends mostly on your exact use-case.1 point
-
Just a minor correction. It's the default template and the default parent page.1 point
-
Perhaps he's talking about this: http://documentation.concrete5.org/developers/working-with-blocks https://www.concrete5.org/documentation/general-topics/blocks-and-areas But it could also have been this, for example: Mobile Web 2.0: Developing and Delivering Services to Mobile Devices https://goo.gl/nNGPhW (google book link) Service-Oriented Computing: 11th International Conference, ICSOC 2013 https://goo.gl/ubfTBJ (google book link) Differently in both cases, "on-the-fly"/"on the fly" is not necessarily better. It depends, like for a lot of things.1 point
-
I am not completely sure either, but here are a couple of links that mention the concept: http://research.microsoft.com/en-us/people/xingx/tic1.pdf http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1407778&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1407778 http://link.springer.com/chapter/10.1007%2F978-3-540-74784-0_17 Without really having read these, I think an example might be serving up smaller images for mobile devices, or maybe he is talking about AWD vs RWD? Maybe I need to read some more, or maybe Guy will chime in and explain!1 point
-
1 point
-
You could try this one to check it the selector syntax is the issue or something else. $customUserRoles = $roles->find("name^=member-"); $profileTemp = $users->find("roles=$customUserRoles");1 point
-
Hi godmok, Welcome here You don't find any users because the user template is access protected and the guest user does not have "view" permission. You can either change this or skip the access check in your selector by adding "check_access=0". And your second question: Yes there's a difference between $pages->find and $pages->get. The latter assumes that you're very specific about getting a single page and therefore also returns pages that are unpublished/hidden/no-access. Hope I don't forget anything here Cheers1 point
-
Thanks from both of you, (szabesz and Christophe). The resone which I didn't answered to your responses is because I was trying to fine a better solution way from what you have suggested. I changed my wire folder with a new one with no changes in wire/config.php. I have also removed all files from cache folder. I have changed the 'assets' folder and file premission to 777 which is the worst one. It is now working pretty good but sometimes it is not working while I am updating the content. The size of the 'site/assets' folder is about 110 MB and there are about 800 pictures and a few PDF files also my internet speed is not very good too. Can you please tell me that, is it necessary to reduce the pictures size or not?1 point
-
That's great and I was sure about that reading your post. But those two sentences just made me laugh, they read like something really awkward has happened (maybe I've watched too many Monthy Pythons back then )1 point
-
Thanks for the kudos Peter: http://significatojournal.com/bliss/an-exaltation-of-creativity-and-bliss/the-significato-journal-is-now-a-mobile-first-responsive-website/1 point
-
Here's an article that is mostly about Concete 5, but makes some comparisons with PW - maybe some ideas in there! http://www.spiria.com/en/blog/websites/concrete-5-top-user-friendly-cms Note that Guy also wrote a dedicated PW post: http://www.spiria.com/en/blog/websites/processwire-light-powerful-elegant Not sure if that has been posted here before or not.1 point
-
You have to create a plugin, place it in /site/modules/InputfieldCKEditor/plugins/ and enable it in the fieldsettings under Setup > Plugins Take this one as a starting point: Save the following code as /site/modules/InputfieldCKEditor/plugins/keystrokes/plugins.js // Assigne Ctrl+I to "bold" INSTEAD OF 'italic'(default). ( function() { CKEDITOR.plugins.add( 'keystrokes', { init: function( editor ) { editor.setKeystroke( CKEDITOR.CTRL + 73 , 'bold' ); } }); } )();1 point
-
Our main audience are currently web designers/developers that require a platform that does most of the heavy lifting for them, but allows them to freely modify data structures, markup, and even back-end functionality of their sites. WordPress, on the other hand, is famous for trying to cater for all kinds of users – even those who don't ever want to touch or see any code *or* markup at all. As a result they're not particularly good at anything and just trying to keep their current codebase in good shape seems to be nearly impossible task. I'm not saying that ProcessWire is already as good as it can get – quite the contrary. We've taken huge steps in so many ways in just a few short years and will no doubt continue doing so in the foreseeable future. The point I'm trying to make is that "converting all WordPress websites over" isn't necessarily a goal worth striving for. At the very least that's not what motivates me personally. Correct. Site profiles provide a starting point, and after installing one of those you can customize your site as you see fit. While I have no idea what you mean by "making it custom", the thing is that site profiles in general are not interchangeable like WordPress themes. This is what I was referring to in my previous post: we've had some discussion about agreeing on specific fields, based on which we could develop interchangeable themes. Not entirely sure what's up with that project right now, but it sounds like this might be something you'd be interested in pursuing too. Actually you could make any module output styles, and some modules already do that. Some existing options include using the $config->styles or $config->scripts arrays (though they also need to be included in your markup somewhere), altering generated markup with a page render hook, and simply outputting styles or scripts in the middle of generated markup. I'll have to agree that these may not be exactly clean solutions at all times, but on the other hand, have you ever debugged a WordPress site with a ton of plugins adding their own styles/scripts? Trust me, "clean" is not how one would describe that either In my opinion this is a very cool idea, but absolutely not something the core should do. Without going into specifics, nothing you've mentioned so far can't be done with a third party module. If this is something you feel is missing from ProcessWire, feel free to give it a try. You might even find some like-minded people here who'd be willing to help. In some ways I'll have to agree, but it's really not that simple. WordPress a) was around at the perfect time, b) decided relatively early to cater for the needs of everyone out there, c) doesn't care about how they're perceived by the technically adept audience, and d) doesn't care how much technical debt they amass in the process. I don't think that any platform can really take them head-on when it comes to number of users: at this point their popularity is also their biggest asset (assuming that "being the most popular platform out there at any cost" is really a sensible goal.) Agreed, and we *are* already expanding our audience. You haven't missed the Composer stuff we've been adding lately, have you? It's just that we've been aiming for expanding our audience to a slightly different direction than you had in mind I hate repeating myself, but I'll do it anyway: build a module. Publish it. If it's awesome and a lot of people love it, it has a good chance of becoming a core feature one day.1 point
-
Since browser support for flex is now pretty good, I am looking into using flexboxgrid. It looks very promising and looking at their github repo with all those likes and forks it sure will last. Has anybody here used it and what do you think?1 point
-
Hello, I would like to utilize wire/modules/Inputfield/InputfieldIcon/ in a module. I found that icons.inc there does not include all FontAwesome 4.4 icon classes. Is the selection of icon classes in icons.inc opinionated for use in PW or is it just not up to date? Anyways, I put together some code to produce a icons.inc with all available FA icon classes from master branch, sorted alphabetically: <?php $url = "https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/src/icons.yml"; $faArray = yaml_parse_url($url); // pack all icon ids (classnames) in array and sort alphabetically $iconClasses = []; foreach ($faArray['icons'] as $key => $row) { $iconClasses[$key] = $row['id']; } array_multisort($iconClasses, SORT_ASC, $faArray['icons']); // write all fa classnames to a file $file = "icons.inc"; $prefix = "fa-"; $out = fopen($file, "w+"); foreach ($iconClasses as $c) { $class = $prefix . $c . PHP_EOL; // echo $class . "<br>"; fwrite($out, $class); } fclose($out);1 point
-
update to Version 1.0.2 translatable German Language Pack comes with Module more configuration options simplification of color setup optimized Accesibility1 point