Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/07/2018 in all areas

  1. DEPRECATED - USE ROCKMIGRATIONS INSTEAD I'm very happy to share my newest module called "ProcessWire Kickstart" that I developed during the holidays Maybe some of you already saw the preview thread about this... What it does: This module makes it possible to install ProcessWire in a fully automated process. You can define all necessary settings in one single php file and you can even define "recipes" that get executed after installation. This means you can install modules, adopt settings and do whatever you want with your new site using the PW API (like creating pages and so on). You could also place a kind of frontend boilerplate on your git account and grab that after installation and place it in your templates folder. I ran out of time so maybe someone could try that out and show how he did it Additional to that there is a ProcessModule to install in your ProcessWire admin which makes creating and testing recipes super easy. Note: Alpha realese until this module gets some more testing. Please be careful with this tool since it does some heavy file system manipulations (unzipping, moving and DELETING whole directories...). Use at your own risk. Usage: Just grab a copy of the kickstarter, place it on your server, visit yournewsite.com/kickstart.php, adjust settings (like username+password) as needed and hit "install". If your mysql user does not have the rights to create a new database then you have to create a database before running the installer! Download: via SSH: cd /var/www/yournewsitedirectory wget baumrock.com/kickstart.php // or using curl curl baumrock.com/kickstart.php -L --output kickstart.php Manually: Klick baumrock.com/kickstart.php and upload the file to your server Note: baumrock.com/kickstart.php returns the current master file from the gitlab repo and changes the namespace of the script so that it can install itself via recipe. If you don't need to install the kickstart processmodule via recipe you could also download the kickstart.php file from gitlab. Screenshots/Walkthrough: The initial Screen: You can either upload a file via the left panel or take my example file from the gitlab repo: This way you can create your own kickstartfiles and host it on your own accounts. When the file is loaded you can easily edit all necessary informations, like username, password and the url where to grab ProcessWire from. I just tried it with an old version as well... 2.7 worked just fine (having the old installer that recently was updated) but an ancient 2.2.4 version failed. I don't think anybody will ever need to install lots of old versions of pw with this tool but I wanted to mention it here. Hit "install" and lean back - on my VPS it takes 15 seconds to install my very own custom version of processwire with all modules that i need After logging into your admin you'll see that all modules from your recipe are installed: Recipe Editor: As recipes are executed after processwire was installed you have all your API magic available there. Running this scripts is only possible inside of a working processwire installation, so I created a module to help you with that task. See the comments of the sample recipe for more information! I hope this tool helps you to save lots of time and create lots of awesome ProcessWire websites I would be happy to see how you use this and please share useful recipes here in the thread so that everybody can profit. Maybe you just want to throw in an idea what could be done (for example I can imagine a recipe that checks file permissions on the system after installation)... Some parts of the code and maybe also part of the idea are taken from @Soma 's old and still great online installer, thx for that!
    6 points
  2. In /site/ready.php: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { $lister = $event->object; $lister->nativeDateFormat = 'd.m.y'; }); See here for the format options: https://processwire.com/api/ref/datetime/date/
    5 points
  3. https://www.youtube.com/watch?v=I5mRwzVvFGE but we should not forget this one either: https://www.techrepublic.com/article/is-the-intel-management-engine-a-backdoor/ "Is the Intel Management Engine a backdoor? Yes, of course it is. By its very definition (from Wikipedia): A backdoor is a method, often secret, of bypassing normal authentication in a product, computer system, cryptosystem or algorithm etc. Backdoors are often used for securing unauthorized remote access to a computer, or obtaining access to plaintext in cryptographic systems." By definition Meltdown and Spectre are also backdoors, intentionally designed ones, btw. We are talking about hardware intentionally implemented to bypass security checks by design. It was just not "advertised". @bernhard Please change the title. I get the joke but it is quite misleading...
    3 points
  4. A module for managing files and folders. Supports creating, opening (e.g. viewing, playing, editing), renaming, moving, copying, deleting and searching for files. You can also view and change (not supported on Windows) file and directory permissions. https://github.com/matjazpotocnik/ProcessFileManager The author of FileManager component is (c) 2006 - 2018 Gerd Tentler, http://www.gerd-tentler.de/tools/filemanager/. I modified it to work with ProcessWire as a module. Please see license files on usage in commercial projects!
    2 points
  5. Hi y'all! Long time no see. Here's a little module aiming to help you build accessible websites ProcessWire Accessibility Tools Download: http://modules.processwire.com/modules/pwat/ Github: https://github.com/marcus-herrmann/PWAT A small, but hopefully growing toolkit for creating accessible ProcessWire sites. Right now it consists of the following little helpers: tota11y visualization toolkit by Khan Academy A toggle button to see view site in grayscale. The w3c recommends checking your page without colours to see if your design still works (accompanied by a colours contrast check, which is part of tota11y) A link to test your webpage with WAVE, webaim's Web Accessibility eValuation Tool. By the nature of this tool, the website under test must be available online, local hosts won't work. Installation Once you have downloaded PWAT, go to your module Install page and click "Check for new modules". Find "ProcessWire Accessibility Tools" and click "Install". During installation, PWAT creates a new role 'pwat_user'. To use the Accessibility Tools, you have to grant user this role. Following, you can start configuring the module. Usage PWAT starts with only the tota11y script activated. On the configuration page you can decide whether PWAT is visible on admin pages if tota11y is active if the grayscale toggle is active if the link to WAVE will be visible Credits The amazing tota11y visualization tool by Khan Academy Inspiration: Paul J. Adam's bookmarklets Inspiration: WordPress wa11y Plugin Best, marcus
    2 points
  6. https://polarartistit.fi/ https://bomba.fi/ Webstores (developed by Tuspe): https://sajt.fi/ https://kupilka.fi/ (shop is only for visitors from Finland) https://tommisoidinmakiproduction.com/ Events: https://osuuskaupparock.fi/ https://karhurock.com/ We have made almost 100 projects already.
    2 points
  7. This module allows you and your site editors to protect a page (and optionally its children, grandchildren etc) from guest access directly from the page's Settings tab. You can also limit access to certain roles. http://modules.processwire.com/modules/page-protector/ https://github.com/adrianbj/PageProtector It makes it very easy for editors to set up various password protected areas on their site, or to simply protect a new page or section while they are still working on it. Ability for your site editors to control the user access to pages directly from Settings tab of each page Include whether to protect all children of this page or not Optionally allow access to only specified roles Option to protect all hidden pages (and optionally their children) Ability to change the message on the login page to make it specific to this page Option to have login form and prohibited message injected into a custom template Access to the "Protect this Page" settings panel is controlled by the "page-edit-protected" permission Table in the module config settings that lists the details all of the protected pages Shortcut to protect entire site with one click In addition to the admin interface, you can also set protection settings via the API: // all optional, except "page_protected", which must be set to true/false // if setting it to false, the other options are not relevant $options = array( "page_protected" => true, "children_protected" => true, "allowed_roles" => array("role1", "role2"), "message_override" => "My custom login message", "prohibited_message" => "My custom prohibited access message" ); $page->protect($options); As alway, I would love any feedback / suggestions for improvements. Hope you find it useful! Page Protection Settings (settings tab for each page) Module Config Settings
    1 point
  8. I mentioned last week that we'd look at the roadmap this week. I'm actually still working on that, so will post the 2018 roadmap next week instead. But I do have a version update this week which adds some useful tools to our images field in the admin (InputfieldImage), and I think this is one that both you and your clients will find really handy. https://processwire.com/blog/posts/pw-3.0.88/
    1 point
  9. Just wanted to add that it's not just PHP that treats 0 as False and 1 as True. You'll find most (traditional) languages will do the same (at least the ones I've come across). There are some exceptions like Ruby & Lisp which treats 0 as true, AFAIK. If you're wondering why 0s & 1s ... well I don't have a definite answer myself as it's one of those topics that will divide opinion. IMHO I side with the view that it originates from Electronics & Boolean Algebra. But it certainly sounds like a question for Quora
    1 point
  10. @bernhard. I'll move this topic to module development since the other thread will be the support forum for this module. If you wish, we can lock this topic so that all enquiries/comments etc, are directed to the modules main support forum
    1 point
  11. 1 point
  12. nope, this was a pr for another thing and is already merged
    1 point
  13. Those attributes are not useless - their use is that they mitigate against reverse tabnapping vulnerabilities for links that have target="_blank". https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/ https://mathiasbynens.github.io/rel-noopener/
    1 point
  14. Seems that this pub is a little boring But I can live with the <ironic> tags
    1 point
  15. What's good humor for you? No humor? Give it a break guys... I think the "Finally" in the beginning of the sentence reveals it all immediately. @bernhard I liked the irony of adding the <ironic> tags
    1 point
  16. Yes. If you allow other users to use this module than it's not free anymore, see license file for filemanager. Unfortunately, I can't guarantee that. This is first alpha release of the module, just to see if there is any interest in this at all. I didn't write the components, I just made filemanager works in PW (and it was a LOT of work too).
    1 point
  17. Hi adrian! i Could do that, of course. But i thought it would be easier to assign a spezific Page to a user. i solved it now with a different approach. I added a page reference field to the User Template. In the template.php i check for the User and simultaneously if the visited page = the referenced page in the users entry. That works for me. nevertheless thank you!
    1 point
  18. Awesome! Just a few remarks after trying it out for 5-10 minutes... My main concern with such a powerful tool is security: I see you created a special permission for this module. I guess that your intention was that only superusers are able to use this module. If I allowed regular editors use this module, it'll only be a question of time till someone breaks stuff (editing core files, PHP etc.). I just want to make sure there's no nasty backdoor (like with WP's code editor, that is still installed and enabled by default, and is still a massive security hole)...
    1 point
  19. Nusphere PhpEd supports all frameworks, just by crawling and parsing created/defined (site)-projects.
    1 point
  20. Searching by, site:processwire.com/talk/ processwire ide yields a number of recent topics and various tips.
    1 point
  21. This may be helpful to anyone using 1and1 recently - I used the htaccess file from 3.0.62 and simply uncommented the RewriteBase / line. No other changes necessary.
    1 point
  22. Don't know if you heard about it: There's a great CKEditor plugin called Accessibility Checker: https://ckeditor.com/ckeditor-4/accessibility-checker/ I have started to include it in every new PW installation and tell clients about it. Perhaps there's a way to include this as well?
    1 point
  23. In addition to what blynx said: if ($flip) means the same as if ($flip!=0)
    1 point
  24. if($flip) { echo "H" } You are exactly right, I think you just miss a thought: The condition relates to the value of $flip. The value is either 0 or 1. And in PHP, 1 in a condition is “like” true, and 0 is “like” false. So $flip may be 1. In that case PHP will coerce it to true and finally print H because the condition is met. If $flip is 0, PHP will coerce that to false and print T because the condition for the if() was not met. So the else block is executed. Hope that helps?
    1 point
  25. Aha, I think I still got a license for that. I'm the opposite, I found the command line easier, and it makes me feel awesome cos I'm a geek. Sorry, I meant JS components here. I was messing about with webpack simply so I could just include certain parts but getting the uikit less to compile and output in the right place was a pita (even though I can do it easily with gulp, but I'm always experimenting, maybe my downfall that one tbh). Webpack is pretty simple if you're only using it for grabbing bits of JS and chucking it all together into a bundle.js file, probably why some people use gulp and webpack for their respective strengths. The 'uikit/build/' directory is difficult for me to understand what's going on. The web development landscape appears like this to me: if (easierWay()) { extractFun(); makeMoreComplex(); makeNewFramework(); }
    1 point
  26. I've made a few migrations, not from WP, but the same method applies. First I copied the assets. Layout images, CSS, fonts, etc. Then I went to the site's homepage, copied the source, pasted on home.php and started cleaning up. With the code clean, I move the header and footer into separate includable files. You'll have to replace the menu links with a loop to grab those from the admin, change the path to the assets and so on. Then do the same for the next page. Copy from the source's frontend, paste on the template file, replace header and footer for the includes we've prepared when doing the homepage, and proceed cleaning up and replacing the hard-coded content with calls to the page's fields. It takes some time, but it's straightforward. As @lokomotivan pointed out, best is to start from an HTML template. Processwire is geared towards custom-made solutions, where as Wordpress, specially when using templates, is more about allowing the admin to customise the layout from within the CMS. There is no way of directly or automatically replicating the same features of a WP template in PW. But if you take an HTML template, trim it to your needs, then setup PW to have just the fields you need for what you're building, you'll get a much cleaner and easier to use CMS. You can do it in one or two days after you get the hang of it, depending of the site of course.
    1 point
  27. Quick update: there's now a 2.0 branch and 2.0 milestone for this module at GitHub. For the time being the 2.0 branch is identical with master branch, but it's a start. I'm going to get another project I've been working on out there today, and after that I should have some time to work on VersionControl 2.0
    1 point
  28. Couldn't a module like this would be a better solution for "sharing"? @flydev has not yet released it so it's hard to compare two sneak-peek projects but still...
    1 point
  29. To save module config data, put the data you want to save in an array and then call the $modules API var with the saveModuleConfigData function. <?php $data = array( 'something' => 'Well hello there', 'something_else' => 1234, ); $module = 'ModuleClassName'; // can also be instance of module wire('modules')->saveModuleConfigData($module, $data); ProcessWire will automatically set the keys from your configData to the module when it loads, so you don't have to do anything else. As a result, your module could call upon a value like $this->something; and the value would be there. Or if you want, you can add a setConfigData(array $data) function to your module, and it will set the config data to that instead (when the module is loaded). Though I rarely do this. To retrieve a module's config data from another module or elsewhere in the API, you can also use $modules->getModuleConfigData('ModuleClassName'); Use it like this: <?php $data = wire('modules')->getModuleConfigData('ModuleClassName'); echo $data['something']; // displays 'Well hello there' The $data would be the same array that you set in the first example.
    1 point
×
×
  • Create New...