Jump to content

adrian

PW-Moderators
  • Posts

    11,185
  • Joined

  • Last visited

  • Days Won

    372

Everything posted by adrian

  1. If you want to stick with a password field you can do this: if($page->password->matches($input->post->pass)){
  2. It looks like you are just wanting to require just a password, and not a username as well? And it looks like there is only one valid password per page? If so, then just use a text field so you can match them directly (since a text field won't be encrypted). Alternatively, you could use: https://processwire.com/talk/topic/8387-page-protector/ - you'll likely want to use the Login Template option. This will require a username and password, so it may be more than you need.
  3. I haven't investigated very far, but I am seeing an array vs string error due to: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/PageFinder.php#L1182 There is a note in that file that I think might be related: // TODO Make native fields and path/url multi-field and multi-value aware So it is possible that support is planned but hasn't been implemented yet.
  4. This should do the trick: $pages->find("(path=/news/),(path=/about/)"); And here is some more info on "OR group" selectors: https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=64049 Or, depending on your needs, you could maybe match by name rather than path: $pages->find("name=news|about"); Of course there is the chance that another page with name "news" or "about" may get created elsewhere in the page tree, so you could help mitigate this by supplying a parent of home as well: $pages->find("parent=/, name=news|about"); I am curious though what is wrong with using the ID - seems like it might be the safest option? Just be sure to add a comment above the selector so you know what they are referring to.
  5. It was first base Ryan, second base Ryan, third base Ryan ...
  6. @felix and everyone I have made some initial adjustments to make this module more versatile. It now has two config fields for setting up the JS video player of your choice and the player template code. By default it comes configured to use MediaElementJS, but you can easily change to VideoJS, JW Player, Plyr.io or whatever you prefer. Once configured all you need to do is: echo $page->video->play; With the default setup, you only need to upload an MP4 and it will work on all browsers/devices. I might potentially make it possible to also upload a WebM version so that you can play with HTML5 in all browsers/devices without the need for a fallback flash player on FF/Chrome, but I'll see if people really have a need for this. I would still like to make several refinements, but if anyone tests this version, please let me know how it goes.
  7. Hi Zahari, This module should be getting a facelift soon - I'll be getting rid of the Sublime player and setting up mediaelementjs by default, but also making it very easy to switch to VideoJS, Plyr, JW Player - whatever you want really. I haven't installed ffmpeg-php on a Mac - only on my Linux box, but do these instructions help: https://www.drupal.org/node/1464236
  8. Actually, it does extend Inputfield: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module#L15 but since you are using it from a different module it doesn't know to autoload these because they are not in the same folder as your new module. I think you might need to share the code for your new module so we can see where things might be going wrong.
  9. I did a couple of WP sites back in the day and this was my experience - except that I found it was never a perfect fit, so it was never great I think if you are happy quoting a budget price and saying no to those little changes then you can get by with WP, but I am always embarrassed to say I can't make a change that the client wants and when WP makes these changes so hard, I just don't think it is worth it. I actually find development of even simple sites easier and quicker with PW.
  10. Often you just need to do this: public function init() { parent::init(); } The parent::init() is the trick. Here is a comprehensive discussion on it: https://processwire.com/talk/topic/1416-inputfieldmodule-doesnt-autoload-their-jscss/
  11. Those php notices shouldn't prevent the module from working. Admittedly they should be fixed, but are you sure that the module is no longer working? If you disable debug mode you shouldn't see the errors.
  12. Is InputfieldPageAutocomplete.min.js getting loaded? Are you seeing an AJAX request (via the console Network tab)? Are there any errors?
  13. A couple of options: 1. You can use the Template Access tab to disallow view access to guests and determine what they will see instead. 2. Use this module: http://modules.processwire.com/modules/page-protector/ to limit access to specific pages only to logged in users, and prompt them to login if they aren't already. Hope that helps
  14. Hi @roblgs and welcome to PW and the forums. Did you also install the MarkupBlog module? MarkupBlog is not necessary if you want to create your own posts.php and post.php template files, but it makes it much quicker and easier to get going and you can use those files as a starting point and style from there.
  15. Hi Felix, This sounds like a great idea - I am pretty limited on time at the moment, so a PR would be awesome. I am thinking that it shouldn't be too hard to put together by borrowing from Ryan's PWImage button and maybe looking at how teppo added a new button to CKEditor with his Hanna Code Helper: http://modules.processwire.com/modules/hanna-code-helper/ Perhaps with the time I have available I should sort out removing of sublime video (since they are now dead). As a replacement I would like to make it possible to link to your preferred player (via a provided CDN link) and then provide the required code for playing, eg if you like using mediaelementjs, you'd define like this: <video src='{url}' poster='{poster}' width='720' height='408' ><track kind='subtitles' src='{subtitles}' srclang='en' /></video> Your embed button would make use of these two config settings: 1. CDN Link, 2. Play code (replacing the {} parts with the correct values from the selected video. It would be great to add these features and actually release this module in the PW modules directory. What do you think?
  16. Sounds good - please follow up with me when he is back - hopefully I can reproduce the issues you are having.
  17. Sorry, I don't have much time right now to test your page field scenario, but in general you shouldn't need "Rename on Save" to make it work for API uploading. I just tested to confirm, and everything still works for me when adding an image like: $page->images->add("http://myserver.com/image.jpg"); $page->of(false); $page->save(); What happens if you don't use "Rename on Save" at your end? I'd really like to help you debug this when I have a few spare minutes, but it seems like I will need to replicate your page field setup - maybe you could create a site profile that I could test with? Padloper is actually by @apeisa, but I am sure he'll appreciate your best wishes
  18. Are you still using the "Rename on Save" option? That is likely the culprit, although I am not completely sure why. Obviously I would like to get that completely reliable, but in the meantime, do you actually need it? If you are setting the name of the image based on $page->name and you don't have anyway of changing the name of a page when the title is changed (the default behavior in PW), then I don't think there is much point to that setting in your case. Just to confirm, is it the name of the image in the images field, or embedded into an RTE, or both? Is it random or can you give me a way to reliably reproduce it?
  19. I have a pending PR that adds user images along with some other enhancements for logged in users: https://github.com/ryancramerdesign/ProcessWire/pull/954 Maybe if you test out those changes and you like them you could add a comment to that PR to encourage Ryan to incorporate them
  20. I haven't played with it myself yet, but does this do what you want? https://processwire.com/talk/topic/10829-comments-fieldtype-with-star-rating/
  21. The forum is not built on PW and the best option is definitely google site search. For the main PW site and the modules subsite, the built-in search could probably still use some improvements, but a tip for the modules - enter as the classname, eg: http://modules.processwire.com/search/?q=admincustomfiles Not perfect I know, but hopefully will help you out in the meantime.
  22. Thanks again @tpr - very nice! I have merged those changes and also merged the dev version of BCE into master. I do have a few more ideas/tweaks to implement, but I'll be working on the master branch again for now. Note - for those using the new BCE with PW stable I have had to disable the new Lister mode as it won't work properly on PW stable. Now that this new version is being pushed out through PW module upgrades and lots more users will be using it, please let me know if anyone discovers any issues.
  23. Hi Wanze, It looks like the current version of this can't be installed using PW's built-in by class name feature, because it tries to install Pages2df before WirePDF. It works fine if you use the URL option and point it to the zip on Github though because that way it downloads and extracts and shows you both modules with the option to install WirePDF.
  24. Thank you - it's been merged !
  25. Thanks @tpr - I have merged your changes so this functionality is now available on the dev branch of BCE. I really appreciate your work on this! As for the table sort feature - it would be nice to have this working - I will add to my list of things, but I am pretty short on time at the moment, but again, PR's are most welcome Given the bugs with the sort handles and the Add New button with stable BCE and dev PW, I would like to merge BCE dev to stable fairly shortly, so if anyone has noticed any other issues, especially with the new Lister mode, the new Inline Fieldset position option, and also the alternative Parent Page option (under the Content / Deletion / Protection settings tab), please let me know. I do have some tweaks I would still like to make to the Lister mode - mainly getting the "Add New" button to work - I have disabled this for the moment because there are target issues with PW modals when called from inside iframes that I need to figure out, but I still think the current dev version of BCE is now more stable given that so many of us are using the dev version of PW.
×
×
  • Create New...