Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/27/2015 in all areas

  1. 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
  2. I read about this new HTTP/2 webserver, Caddy. It's written in Go and it is really super lightweight, the binary is just 3 MB. And the best thing is, that it's super easy to use. You just put the binary in the path of your website and start caddy – and already you have an HTTP/2 server running that serves static files (and who doesn't want, as HTTP/2 is The Future™). And the best thing is: no PITA with certificates and all these thing, as Caddy has letsencrypt already built in. So as you start it, the certs get generated and your site is automatically running on an encrypted connection (which is by the way required for HTTP/2). The best part is however, that you can connect any backend to Caddy, for example php-fpm. This comes even with a "recipe", so you usually don't need to worry about configuration this. So I cobbled something together to have Processwire running with this server, and guess what: it works. Almost. The site is running, but the admin area is still behaving a little bit weird. I cannot edit pages (instead I get the "bookmarks" page) and all the behaviour of the admin area is a bit strange. The other option is that I get "Unrecognized path" I believe this is still a problem with rewriting which I can't figure. This is my Caddyfile: mydomain.com { root /var/www/mypath fastcgi / unix:/run/php/php7.0-fpm.sock php rewrite { regexp .* ext / to /index.php?it={dir}&{args}#{frag} } } I go crazy with the rewriting. Here is the documentation, maybe someone has an idea. Thanks and maybe you have a reason now to try Caddy yourself.
    1 point
  3. Hello! About the same time Hari KT asked about "Remember Me" functionality, I identified this as a feature I wanted to implement in some sites under development. Having done this twice before (in CodeIgniter) and based on previous research, I decided to build a ProcessWire module to provide this feature. So far, I have developed and tested this on ProcessWire 2.3. I would welcome any feedback, comments, suggestions and problems from people who are keen to use this. To re-iterate the readme, this module allows users to remain logged in across browser sessions. The module can operate in two ways:Automatically. No code changes, but users do not have a choice. Manually. The module must be called from a site's custom code. Options can be changed in the module configuration page. Enable fingerprinting (IP address and User Agent) as an additional security check. Limit the persistent login functionality by role. Set the name and age of the cookie. Sets an identifier in the session when a user is logged in via a persistent login cookie. This should be used to control access to sensitive information and actions within a site's custom code. Clears login tokens when a potential theft has been identified. Updated: LoginPersist on GitHub
    1 point
  4. A temporary fix in response to this request ProcessCommentsManagerEnhanced This is a slightly enhanced version of the current core ProcessCommentsManager. I've tested it in the current dev version of PW and it works fine. I cannot provide any guarantees nor support the module though ....it is a working-nicely-proof-of-concept. Download GitHub Install Just like any other ProcessWire module. It requires FieldtypeComments to be installed. You do not need to install ProcessCommentsManager. Demo Screen
    1 point
  5. I found Caddy a short time ago and it sounds really interesting. If I have some time I also will start tests. Maybe it could be useful for some setups / sites Extensions are also nice https://caddyserver.com/docs/git
    1 point
  6. Yes, but HHVM is also a JIT compiler to PHP like V8 for JavaScript. Yes, in fact it does. I'll make a tutorial the next days.
    1 point
  7. Mh, I build an custom module to fetch json data from an jsonapi and convert it... now I found your post and the wireDecodeJSON function...
    1 point
  8. After several git conflicts (hey, I'm learning), 1.5 has been merged into master - I believe it is stable for production. If you notice any bugs (or other like-minded creatures), please either mention here or submit an issue.
    1 point
  9. No problem, It's not the usual hosting, but if you know that basic of git you can take the advantage of using this service. I just submit one click installation that is currently on review so for now, this quickstart will use a bit of terminal but if you manage to install rhc, your good to go We are willing to assist you
    1 point
  10. Done. Renamed the module to ProcessSetupPageName and added it to the modules directory. http://modules.processwire.com/modules/process-setup-page-name/
    1 point
  11. MERRY CHRISTMAS for all those who celebrate it! Here's to another awesome year with ProcessWire
    1 point
  12. How about sort pages by date (in the main query), and echo month name if it's different from the previous?
    1 point
  13. heldercervantesWorks great on linux with FF, Chrome, and Opera
    1 point
  14. Well, according to my short tests with very unscientific methods, HHVM still overtakes PHP, runs to the finish line and back to start just to overtake PHP again. With a normal ab -c20 -n500, HHVM is approximately 24 times faster than PHP 7, under higher load (-c100) this scales up to 60 times. Then the saturation is reached for this small server I'm testing this against. Of course, both are tested out of the box and with a PHP opcode cache you could actually gain more performance. EDIT: Caching was still on, the numbers are wrong. The server was delivering static pages. However, this is a good demonstration of fcgi_cache. However, PHP7 is still super fast compared to 5.4 or 5.5 – and probably has less side effects in large production environment. Or at least they are documented. Let's say it like this: if you have moderate traffic on your site and your application is decently written, you will probably won't note much of a difference. And if you have high traffic, you might face other bottlenecks than PHP, especially if you work with highly dynamic content.
    1 point
  15. Yay! This was the year I started my Processwire affair, it has been great! Thanks everyone for the good vibes!
    1 point
  16. Maybe it's the max_post_vars limit of php? 160 * name, sort, desc, delete, tags would mean ~800 of them only for the image field alone.
    1 point
  17. Since there are a lot of topics about the same theme, I decided to write a small module which overwrites the core function ___SetupPageName(). The module allows now to populate the page name using proprietary date() function. Works like PHP date() with follwing exceptions: Everything between the brackets is detected as format string, meaning no 2nd parameter possible. No need to use quotes around the format string. Spaces not allowed. from any page property, page field including subfields, parent property, parent field etc. Meaning everything what you get with $page->get(); including dot syntax. The function will give error and warnings in case of unproper settings, but creates the page with name 'untitled' anyway. Download here: http://modules.processwire.com/modules/process-setup-page-name/ Some Examples The following settings in parent template 'Name Format Children' will assign name immediately. date(Y) date('Y-m-d') parent.title parent.parent.title parent.id template.id assign name after page saving and/or population of depending field. Overwrites 'untitled' after all fields which are defined in parent template are populated. id (any other page property) pagefieldname, multiple pagefieldnames show a warning. pagefieldname (value not populated)show an error. date() // empty, no format assigned date(Y // missing closing bracket date(Y md) // unallowed space notexistingfieldname notexistingproperty existingfield.notexistingsubfield The function in the module ___SetupPageName() could be completely copied as is to the core class $pages. @Ryan Would be nice to see this in core. Related topics: https://processwire.com/talk/topic/8576-name-format-children/ https://processwire.com/talk/topic/8217-name-format-for-children-based-on-any-field-not-just-title/ https://processwire.com/talk/topic/11628-custom-page-name/ https://processwire.com/talk/topic/11349-page-add-step-not-being-skipped-when-name-format-for-children-is-set/ https://processwire.com/talk/topic/10701-automatic-page-name-using-processpageaddexecute-and-pagetable/ https://processwire.com/talk/topic/10208-pagetable-automatic-page-name-format-when-multiple-templates-allowed/ https://processwire.com/talk/topic/9979-name-format-for-children-for-multiple-allowed-templates-for-children/ https://processwire.com/api/modules/process-template/ Any recommandations after testing welcome. Download here: Download here: http://modules.processwire.com/modules/process-setup-page-name/ Edit: small enhancement to prevent display of warning twice. 23.12.15 multiple values possible now 24.12.15 made compatible with PW 3.x 27.12.15 Update Version 1.0.8 09.01.16 Update Version 1.1.0
    1 point
  18. Have you seen https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/WireHttp.php?
    1 point
  19. I was thinking about launching a new CRM and calling it Vista — I don't see the problem.
    1 point
  20. I would fully expect those guys to come up with a pretty implementation for matrix fields. After all, aren't they the ones that wrote the EE matrix fields plugin? I think that matrix fields make good eye candy, and provide a quick n' dirty way to solve some things in lieu of real structure. But I don't think they are great for the long term or large scale. I'm much more interested in creating timeless tools with well defined data formats and structure, and separating our clients from getting involved with defining schema. I can see the solution presented there being a bit of a monster as the format of data becomes more ambiguous than a rich text field (chances are it actually isn't much more than a rich text field from the storage end). Chances are that data can't be indexed, searched and plucked field-by-field the way ProcessWire's repeaters can. But I haven't actually used it, so maybe I'm making assumptions from what I see on that page. Such things would certainly be possible in ProcessWire, but I'm just not convinced it's right. I can see why the Craft guys are doing it, because they are trying to sell stuff and candy sells. Whereas we're trying to make the best, most sustainable tools for the long term and large scale... the meat and potatoes rather than the candy. So something like this from Craft is not something to "catch up" to, because their bottom line is to make candy you will buy, not on providing what's really the best. My full time job is to develop web sites and applications that use ProcessWire (rather than to sell you something), so I'm simply not interested in colorful gadgetry and instead want the best foundation of quality and substance, at least when it comes to the core. Matrix fields and repeaters are somewhat at odds with that goal (even ours to some extent). These types of fields should be used occasionally and sparingly, for specific purposes. As it is now, I don't personally use repeaters very often. Half the time that I see people using them, they are being used in situations when the person really would have been better off without them. So I'm not so enthusiastic about pushing the core further in encouraging use of repeater/matrix type fields, when I don't personally use them very often, nor do I often recommend them. Don't get me wrong though, I do like candy too (sparingly), but really want to limit it in our core. When you get down to the core, Craft doesn't hold a candle ProcessWire. But I'm always glad to support whatever people want to build as 3rd party modules, and ProcessWire is a good engine for this.
    1 point
×
×
  • Create New...