Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/03/2017 in all areas

  1. hi @svsmailus and welcome to the forum! totally agree! sounds like you'll like PW if i was you i would create one simple project (personal website, or something for a friend) and then decide if you like it or not. as you can see the community here is great and always offers a lot of very useful help. pwired already linked to the hello worlds planet tutorial that i would also recommend as first step. after that i would continue to the blog-post of markup regions ( https://processwire.com/blog/posts/processwire-3.0.62-and-more-on-markup-regions/ ) this post shows a new and easy to understand way of the two main output strategies: direct output (like in the planets tutorial) and delayed output (that offers a lot more flexibility). edit: sorry, early submit - wrong shortcut ^^ 2 general tipps for having fun with processwire: 1) use google to search the forum: i use this approach to search content inside the forum typing "pw my search keywords" and the api by typing "api maxSize()" 2) read through all the blog posts as there are plenty of useful informations around 3) subscribe for pw weekly newsletter 4) read the forum and learn from others 5) have fun
    6 points
  2. Just added support for $options when using the dump() / d() method. It lets you specify the maxLength, maxDepth etc parameters the same way you can with bd() calls. I couldn't manage to get an equivalent to barDumpLive() / bdl() working at the moment, but making the $options available should still be very helpful in the Console panel when inspecting large objects. Also if you have the "Reference page being edited" option checked, this now also applies to edited Users, Roles, and Permissions which means that the ProcessWire Info panel will display details of these, rather than the parent process and in the console panel, $page will reference the edited user/role/permission, which should be a helpful addition. One last thing (which took most of my day) - the recent SessionHandlerDB fix for showing the "redirect" debug bar was resulting in various PW notices being lost and not displayed. I think this should now be fixed, but please let me know if you find any other side-effects of that original fix.
    5 points
  3. Wow I've started using it and I'm really impressed with how fast and responsive it is. Tab switching and startup is instant. On my PC, Chrome lags when scrolling on YouTube or on some sites occasionally, but on Quantum, everything feels buttery smooth. Design is quite nice and not in our face. RAM usage is way lower than Chrome, too. It'll be released on November 14, but a beta and dev edition is available if you want to test and see for yourself. https://www.mozilla.org/en-US/firefox/quantum/
    4 points
  4. https://modules.processwire.com/modules/image-extra/
    4 points
  5. Many thanks for your comments. I've read through the links you all posted and they have been very helpful. I will start working through the tutorials. I was intending to learn PHP some years ago, but never followed through. This now gives me an opportunity to make that a reality. Is there a specific version of PHP that is recommended? I have a book that teaches v5.2. Many thanks, after checking through the settings your guess was correct. I did a cleanup and reinstalled with the demo files and now everything appears fine.
    4 points
  6. I suggest you have a dig in the forum since this question has already been answered from many angles in the forum. Forum jumpstart: https://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/ The answer is yes. To start with Processwire you don't need to know full blown php just a few basic applied php rules like for each, echo, include( ), etc. All the slick templates you see out there for wordpress you can make your self with Processwire but without the need for a dozen plugins. Processwire is fully decoupled so you can use your own html and css frameworks like bootstrap, uikit, etc. or use your own css. My experience: I tried a dozen other cms systems before and if webdesign is your serious work then Processwire is the best to invest your time and energy in. But don't take my words for it, try it out for your self: The tutorials are always a good place to start, https://processwire.com/docs/tutorials/but-what-if-i-dont-know-how-to-code/ https://processwire.com/docs/tutorials/hello-worlds/ https://processwire.com/docs/tutorials/
    4 points
  7. From what you're describing I would go with creating those 3 fields. It's not really overkill (in which terms do you think it would be overkill?) and makes your life so much simpler. What you're thinking of doing sounds really hacky, and usually with hacky solutions you will have trouble in the end.
    4 points
  8. Hi @Jota, Just wondering if you'd be willing to pay for a little extra time to upgrade the site to PW 3. Depending on the complexity of the site, it could just require a little testing, or there could be a few hours of tweaking things, but I would expect the former. PW 2.3 is so old now that it would be great for you (or your clients) to experience what it is like these days.
    3 points
  9. @szabesz in templates, sure, using return $this->halt() is a better solution, but in functions or classes or anywhere outside template context, there's no option but to exit; or die; to stop PHP from processing further.
    3 points
  10. That's really old, like from 2006 old. If you know programming basics (conditional statements, loops, functions etc) it will get you very far before you need something more. To get you started on PHP: http://php.net/manual/en/ https://www.tutorialspoint.com/php/ https://www.tutorialspoint.com/php7/ https://github.com/EbookFoundation/free-programming-books/blob/master/free-programming-books.md#php
    3 points
  11. After my few years here, I'd never actually seen that tutorial by Joss, but was going to bring up his name when I saw this thread. In ProcessWire, the front end of your site is completely up to you. One of the things that does make WordPress appear simple is the availability of themes. The concept of themes is fine from one angle, but the implementation makes it difficult for novice users and non-coders, especially when you need to do complex work. This is where PW comes in. By not providing a theme framework, it gives you an opportunity to start from scratch and learn the basic easily, because every single aspect of the front end is up to you, and you're also aided by modules where the need arises. And, as has been pointed out, it's super-simple to get started with a basic site. The API is as simple and easy to grasp as they come. With that in mind, ProcessWire sites can be whipped up much faster than a WordPress equivalent and that's just the beginning.
    3 points
  12. I've been involved in web design since 1995. However, I'm not a coder although I do know html/css and in the early days hand-coded sites. I then moved onto to Frontpage, then dreamweaver and finally created sites with Wordpress and also Rapidweaver. I know Wordpress extremely well, however, it is a headache. Updates, plugins and stopping hacks is becoming a drain on maintenance. So I'm looking to switch platforms and processwire was recommended. However, having installed a test site using MAMP, it seems the learning curve is pretty steep. As an example trying to set up the blog module ended with eveythings set up, but the blog displays as a blank page. It makes me realise that Processwire could easily become a time-sink that will require lots of time to try and do what you want to and there seem to be few tutorials that help you set up what you need. Is Processwire a good fit for non-coders or would you suggest I look elsewhere before I invest too much time and get nowhere? I've stuck with Wordpress for ten years and it has served me well, but Processwire failed for me at the first hurdle and that was in trying to set up a simple blog. If I have to spend days to set up a blog, gallery, insert videos, create rss feeds and create podcasts, I'd rather know now from experienced users that maybe I'm barking up the wrong tree. many thanks Simon
    2 points
  13. Lots more updates today. 1) I have changed the default zIndex of the debug bar panels. In the Tracy core they are set at "20000" and go up from there as new panels are displayed, but these were always above the PW dropdown menus which meant you always had to close a panel to access menu items - very annoying. I have set them to "100" as a default, but this is also now configurable in the module settings so if you find you are having problems (especially on the frontend of your sites), you can adjust as needed. Please let me know though if you think there is a better default than 100. 2) Now if you are editing a field, template, or module in the admin, the Console panel will have access to: $field, $template, or $module, respectively which will be the object for the currently edited one. So if you are editing the "body" field, instead of doing something like: d($fields->get("body")); you can just do: d($field); 3) Again, when editing a field, template, or module, the ProcessWire Info panel now contains a new section at the top with details for the edited object. This is an example of the "body" field being edited. 4) The ProcessWire Info panel now uses the exact name of the PW property, rather than the old capitalized and spaced label. This means you can see what you will need to use in your templates to get a certain property. Cheers!
    2 points
  14. When you logout, if you get 404, set the page published. If you get the page but some parts are missing, then you probably misconfigured field access settings, allow guests to view the field.
    2 points
  15. @The Frayed Ends of Sanity $pages->addHookAfter('LoginRegister::buildRegisterForm', null, 'changeHeader'); function changeHeader(HookEvent $e) { $form = $e->return; // setting $form->description to false, null or "" (empty string) removes it from the form; $form->description = "Header text"; $e->return = $form; } in ready.php https://processwire.com/api/hooks/
    2 points
  16. How do you access $page inside a function closure? You can't. Use wire()->page or wirePage() or page() or wire('page')
    2 points
  17. hi @The Frayed Ends of Sanity and welcome to the forum, of course you can change it! the easiest would be some css: #LoginRegisterForm > h2 { display: none; /* or */ font-size: 14px; color: red; font-weight: normal; } you can also hook into buildRegisterForm() and remove the description of the form. you can also add a markup inputfield to your form for any other HTML you need. or you can modify the markup on the client side via JS (of course that would not be the cleanest solution but sometimes easy fixes have their place...)
    2 points
  18. I don't have this problem, maybe something to do with hardware acceleration & video card drivers? 2016: http://www.tomshardware.co.uk/forum/id-3133977/screen-tearing-google-chrome.html https://www.reddit.com/r/pcmasterrace/comments/4azv3s/screen_tearing_in_chrome_while_browsing/
    2 points
  19. in my last update from InputfieldHandsontable I inject the scripts in the init method: https://gitlab.com/baumrock/FieldtypeHandsontable/blob/master/InputfieldHandsontable.module#L26-35 field-specific CSS is loaded inside the render method with jquery like this: https://gitlab.com/baumrock/FieldtypeHandsontable/blob/master/InputfieldHandsontable.module#L61-69 +1 for a comprehensive tutorial on this thanks @abdus sentineljs looks nice!
    2 points
  20. Hmm, you're right. Scripts are output inside <head> during page load. Then it's developer's responsibility to make sure that inputfields are initialized correctly. This requires a <script> tag to be appended to inputfield markup, which sets up the inputfield with given ID. This would also mean having to save the state somewhere (data attributes, ProcessWire.config etc) to prevent initializing an inputfield twice. Or using a library to listen to DOM mutations and initializing the inputfields inside. https://github.com/muicss/sentineljs I agree that a guideline/tutorial from @ryan would be great.
    2 points
  21. You'd think so, but test it and I think you'll find that assets added in renderReady() are always loaded when the inputfield may appear in Page Edit, even if AJAX-loaded. So for example, you can put an inputfield with a JS dependency such as PageAutocomplete in a repeater, and put that repeater inside another repeater (so the PageAutocomplete inputfield is definitely not being rendered initially) and you'll find that the PageAutocomplete JS dependency is included in Page Edit. PW seems to be smart like that.
    2 points
  22. I believe this is what Inputfield::renderReady() is for: adding dependencies to $config->scripts and $config->styles, and also adding JS objects to ProcessWire.config via $config->js(). But I think all this is not well understood by module developers, myself included. Would be great to get a tutorial some time, maybe in a weekly blog post @ryan?
    2 points
  23. Please do NOT die There are other explanations in the forum about why but here is one too: https://webdesign.tutsplus.com/tutorials/processwire-tricks-and-tips--cms-28613 <?php if ($config->ajax) { // AJAX content echo ‘my content’; // Calling halt() stops template rendering but continues towards ProcessWire’s normal shutdown. return $this->halt(); } // non AJAX content below
    2 points
  24. I'm having the same issue. It appears that this happens because Repeater fields add new items using AJAX, and InputfieldAceExtended loads its scripts with $config->scripts in render() method. But it doesnt work as PW does not consider rendering the scripts in $config->scripts when loading an input with AJAX. Quick solution is to append <script> and <link> or <style> tags after inputfield markup. From a quick search, native and profields don't seem to have this issue because they use the scripts that are loaded on backend by default. I think solution is up to @ryan at this point. When rendering the field PW should output scripts & styles too. // InputfieldWrapper.php public function ___renderInputfield(Inputfield $inputfield, $renderValueMode = false) { // ... if($ajaxInputfield) { $inputfieldID = $inputfield->attr('id'); if($ajaxID && $ajaxID == $inputfieldID) { // render ajax inputfield $editable = $inputfield->editable(); if($renderValueMode || !$editable) { echo $inputfield->renderValue(); } else { echo $inputfield->render(); echo "<input type='hidden' name='processInputfieldAjax[]' value='$inputfieldID' />"; // Get scripts from $this->config->scripts and output to browser } exit; //...
    2 points
  25. Is it possible to add actions to search box? Like when using Word, pressing Alt + Q will activate "Tell Me" feature which lets you search actions directly similar to Spotlight Instead of delving into dropdown menu, we can just type in "install" and it suggests you "Module Install" page & tab, or "field" suggests "add field" etc.
    2 points
  26. As a general recommendation, its best to work with the newer versions, which are 7.0 and 7.1. You could also use 5.6, which still has security support until end-2018. PHP 5.2 is no longer supported by the maintainers of PHP (it's really old now).
    2 points
  27. My guess...Blog was installed without the demo content option (i.e. 'Blank Template Files' option was selected), so, no output
    2 points
  28. Fbg13 is right, in that you will need a working knowledge of php. However, my knowledge of php is not up to par (to some of the members here), but I am still able to code out a lot of "complex" pages. It can be as simple as getting the page title/body (very basic example. <h1><?php echo $page->title; ?></h1> <p><?php echo $page->body; ?></p> I guess what I am saying is not to get too discouraged. A simple site (with a bit of knowledge in php) can be made quite quickly. I have learned more than ever with just doing and various other forums. Also, the forums here are great to search through to find answers to your questions. Looking back, I have asked some pretty "silly" questions that now I can tackle no problem.
    2 points
  29. That's still a lot for Gmail. Simply knowing about Gmail's Bulk Sending Guidelines should help you since you want to keep using them.
    2 points
  30. Hi and welcome to the forum. The H2 come from the code of the module on line 518 (link). As it look like there is no option to define your own markup (maybe yes, I am taking my first coffee..), you must change it by translating the file. To do so, first install the core's module LanguageSupport, then translate the module's file : Once saved, you should be able to see the change on your page. Did you mean you already added an image field to the system template user ? if yes, then you need to add the permission profil-edit to the user so he can modify his profile. If its not the case, let us know. If you encounter difficulties, just ask on the forum. Enjoy
    2 points
  31. This module allows you to automatically send an email to a newly created user with their username and password. It also has the option to automatically generate a password for the user upon creation. http://modules.processwire.com/modules/email-new-user/ https://github.com/adrianbj/EmailNewUser The following things are configurable: Whether Send Email option should be automatically checked when creating new user - also affects new users created via API From email address (if left blank it will use the admin email set in the config/php file Email subject Email body - includes the ability to use any fields from the user template using {field_name} codes so these can be put into the body wherever you want. It's your choice if you want to include the password in the email or not. Whether to automatically generate a password. This can be toggled on/off, but even if it is on, you can override it by simply entering a password manually when creating the new user. Ability to control the length and character sets used to make up the automatically generated password. Option to send a test email to yourself to make sure it is configured the way you expect. Because it is generally not a good idea to email passwords, it is highly recommended to use the new Password Force Change module in conjunction with this module. That way the user has to change their password the first time they login which will somewhat reduce the vulnerability of emailing the password. It can also be used for API generated users: $modules->get("EmailNewUser"); // call the module since it is not autoload on the front end $newuser = new User(); $newuser->name = 'newuser'; $newuser->email = 'newuser@gmail.com'; $newuser->sendEmail = true; // only needed if Automatic Email Send is unchecked $newuser->save(); Please let me know if you have any ideas for improvements. PS Thanks to everyone in this post: https://processwire.com/talk/topic/2981-new-user-welcome-message/ for their thoughts and ideas on how to do this.
    1 point
  32. Suppose you have an images field and you want editors to upload a specific number of images to that field. Using a hook in /site/ready.php you can display a field error in Page Edit if the number of images in the field does not match the required number. Just like the standard "required" behaviour, the requirement does not prevent the field being saved if the number of images is not correct so you would still want to check the image count in your template. $wire->addHookAfter('InputfieldImage::processInput', function(HookEvent $event) { $inputfield = $event->object; // Only for this field if($inputfield->hasField != 'images') return; // Only in ProcessPageEdit if($this->process != 'ProcessPageEdit') return; $page = $this->process->getPage(); // Only for this template if($page->template == 'home') { if(count($inputfield->value) !== 4) $inputfield->error("Please upload exactly 4 images to this field"); } });
    1 point
  33. @adrian This is great, thanks! I'll take it for a test drive next time I get a chance to upgrade modules on that particular site and report back.
    1 point
  34. This is an issue with the Process Batcher module so you might want to raise it with the module author over in the support thread. If you're using Batcher in PW3 you'll need my PW3-compatible fork until the pull request is merged.
    1 point
  35. I would partially disagree here, especially in the case of a newcomer. I think currently php 7.0.x is a good compromise. One is less likely to run into issues with third party modules when using 7.0.x, I think. @svsmailus If you really want to become a coder, ProcessWire is a very good choice if not the best one. I started with SilverStripe about six years ago and has been through similar experiences as you are having with ProcessWire now. I did not give up and never regretted it, although I no longer develop using SilverStripe because I switched to ProcessWire PW gives me more freedom. Period.
    1 point
  36. As far as I recall, today as a literal only works in database selectors, i.e. calls to $pages->find and the likes, not in operations on WireArrays. Not sure if this is documented anywhere though.
    1 point
  37. Hi, Do you happen to have any non-core modules dealing with images? I'm asking this because I do not have any, and image fields in FieldsetTab work properly. I'm on ProcessWire 3.0.76 though.
    1 point
  38. Mod note: The OP was a spammer. They've been banned. The original thread is now here with Peter Knight as the OP.
    1 point
  39. @svsmailus ... I would recommend starting with W3 SCHOOL ... This course also looks quite good: Clever Techie ... I also recommend that you also install this site profile: READ ARTICLE => DOWNLOAD PROFILE ... Uikit 3 admin theme: READ ARTICLE => DOWNLOAD ADMIN THEME ... See Short VIDEO how to install the Site Profile and Admin Panel ... How to new TEMPLATE system works and VIDEO ... HOW TO USE FIELDS ... The latest version of Processwire 3x to be compatible with UIKIT Profiles:
    1 point
  40. Is there a way to add a filter based on template flags in Lister (or Lister Pro)? I want to exclude pages that use a system template because I don't want to see repeater pages and I'd rather not have to come back and exclude specific repeater templates as new fields are added. Seems like this should be possible but I can't see a filter option for it. Also, I thought it was possible to type in a custom filter to Lister. Or is that only supported in the standalone InputfieldSelector? Edit: okay, I could just exclude the "Repeaters" or better yet "Admin" parent page in has_parent, but the question stands: it it not possible to filter by properties of a template?
    1 point
  41. This might be because the "complexify factor" is something internal to the JS library used in InputfieldPassword - perhaps difficult or too time-consuming to port to PHP. I'm putting together a little module that adds a "Generate password" button to InputfieldPassword and from my testing it seems you can probably ignore the complexify setting in your EmailNewUser module because when set to the advised range of 0.5 - 1.0 then any randomly generated password seems to satisfy the complexify setting. Incidentally, I'm not a fan of vague settings like "complexify" because it's totally meaningless to the user who is setting the password. Imagine getting feedback like "Sorry, your password is 0.1 units not complexified enough." The inputfield currently says "too common" when failing the complexify setting but that's not really accurate because a random string can fail a high complexify setting. Settings like this can make for infuriating UX. I noticed that and found it very strange. It must be deliberate because the method comment says: But surely if you are setting a max length you want a max length for the whole password? Can't think why Ryan would have designed it that way. I have put in a feature request on GitHub.
    1 point
  42. I have kind of the same website like you about turtles. https://chrysemys.nl I have a mix of parent/child pages and page references. Alle depending on the specific needs. If a fish could change owner or change aquarium, I would use page reference. User can change this themselves, otherwise you would need to give them too much permissions. I have the taxonomy for turtles. order -> sub order -> family -> species. This is a parent/child tree as these a vast routes that are always the same for a turtle. The same goes for the country or origin: region -> country. Page reference can also be bidirectional. This is very usefull! If you have books on your site you can reference to the fish in that book. In the admin you will see on the fish page all books and on the book page all fish. If you add a new book and select a few fish, that book is also added to those fish in the admin fish page. That way you can make an amazing flexible website To be honest it took me a while to figure it all out. I used to have all page references but later changes some part to parent/child. This because it would make it less possible to make mistakes. For example, I added some countries to a turtle but also referenced the wrong region. Therefor that turtle would appear on wrong pages. Using the parent/child for this made it more dummy proof
    1 point
  43. Ok, It now supports a comma-separated list of email addresses and it has been rebranded as "Notify Other Users" and it now uses "To" for sending to these addresses as well. Please let me know if you see any problems.
    1 point
  44. Yeah, it seems like an omission in randomPass() to not be able to generate a password that matches the settings for the system "pass" field. Your discussion here made me take another look at the generate password settings in my EmailNewUser module. I was about to remove those options and make the generate password method use randPass() with the appropriate options as they are stored in the "pass" field settings, but the problem is that randPass() doesn't support the "Complexify Factor" setting and it also uses minLenth settings for each character type, rather than an overall min password length (which is what the password field settings need. It also doesn't support the "Word Ban" mode option. Seems like a feature request for the core?
    1 point
  45. Hello guys, I would like to inform that I've updated my polish translation for PW 3.x to version 1.0.1 This version should be fully compatible with the latest PW dev version 3.0.77 as well with latest stable release. In this update: - new translation files were added for new features like new fieldset field, or import/export features - there is also a complete translation file for the new login/register/profile module, created by @ryan in the last week - other than that, I've corrected few small typos, few phrases were changed. Complete polish translation for 3.x is now available in the official modules directory: http://modules.processwire.com/modules/polski/ bug reports, typos, suggestions are welcome!
    1 point
  46. It's often better to use a PW page for your AJAX url than a standalone PHP file - just create a special template / template file / page for the purpose and call it in your AJAX function. That way everything in PW, init.php, etc, is available just like normal.
    1 point
  47. Just some explanation because it is interesting... This isn't something that is specific to Repeaters - it applies to any selector used on a PageArray/WireArray (a Repeater field returns a PageArray). When you do $some_pagearray->find() this is different to a $pages->find() - the method name is the same but they are actually totally different methods. See find() method in the PageFinder class vs the WireArray class. When using $pages->find() the method refers back to the fieldtype for each queried field and the fieldtypes can do some special preparation to the queried value. In the case of a Datetime field the value is passed through strtotime() if it is a string. So this allows "today" to be converted to a timestamp. But when using $some_pagearray->find() this process does not happen, so the queried value must be a timestamp. Another gotcha to watch out for is using the page status as a string in a selector. With $pages->find() you can do something like "status!=hidden" but this won't work with a selector in $some_pagearray->find(). I think it would be nice if things like this did work with PageArrays - there is an open request for it.
    1 point
  48. I forked this module and made it PW3 compatible. See the readme and the commit for details of what was changed. https://github.com/Toutouwai/ProcessBatcher If folks want to test it and report back I can make a pull request for @Wanze. @tpr, I hid the AdminOnSteroids datatables filterbox and the title case-change button because the layout was a bit messed up. Maybe you could take a look at that when you have time?
    1 point
  49. Maybe enabling test mode in the installer could bring more data https://github.com/processwire/processwire/blob/master/install.php
    1 point
×
×
  • Create New...