Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/05/2016 in all areas

  1. ConnectPageFields Allows the connecting of two related Page fields so that changing one updates the other. Purpose of module An example: suppose your website is about movies. You have a template "movie" with Page field "actors". For each movie you add the actors that appear in the movie. All good, but what if you want to find results like... the 10 actors who have appeared in the most movies actors who haven't appeared in any movies since 1990 You cannot retrieve these pages with a single efficient $pages->find() query, and must load a large PageArray into memory in order to iterate or filter it. For the sake of making these types of queries more efficient you could structure your templates/fields so that movies are added to actors instead, but this may be a less comfortable workflow and can run into equivalent problems (e.g. "find the 10 movies with the largest cast"). The solution is to have a two-way relationship so that movie pages have an "actors" Page field and actor pages have a "movies" Page field. This module will keep these two Page fields in sync so that adding "Ryan Gosling" to "Drive" automatically adds "Drive" to "Ryan Gosling". Also, you can select the same Page field in both Page field A and Page field B. For example, create a "Related" Page field for related pages. Choose "Related" for both fields in a pair in the module config. Now when you add "Orange buffoon" to Related for "Donald Trump", "Donald Trump" is automatically added to Related for "Orange buffoon". Usage Install the ConnectPageFields module. If you haven't already done so, create the two Page fields you want to connect and add them to templates. In the module config select the two Page fields in a "Connected field pair" row as Page field A and Page field B. You can add rows as needed using the "Add another row" button. Troubleshooting Make sure you have set the "Selectable Pages" settings for each Page field correctly: The settings for Page field A should allow pages using the template(s) that Page field B has been added to. The settings for Page field B should allow pages using the template(s) that Page field A has been added to. http://modules.processwire.com/modules/connect-page-fields/ https://github.com/Toutouwai/ConnectPageFields Module config: Demo showing how changing one Page field updates the other:
    9 points
  2. Hi everyone, One thing that I am guilty of (and I am not the only one ) when sharing links to a line (or lines) of code in a Github repo, is sharing a link to the latest version of the file, rather than a link to a specific blob that won't ever change. In fact there are lots of places in the PW documentation/blog that now have outdated links because of this. I have known about this shortcut for a while, but keep forgetting it, so hopefully this will engrain it a little better for me. After you click a line to share (or multiple lines by clicking the first line and then shift+clicking the last line), simply hit the "y" key and the link in the browser address bar will change to one for the current blob, which will always remain correct. Here's some more info if you are interested: https://blog.mariusschulz.com/2015/07/25/sharing-line-highlights-in-github-files If you see me (or anyone else) sharing non-permanent links, please remind them of this
    9 points
  3. Yes, there is a way ...there has been for a while actually. It's called OR:groups $search = $pages->find("template=post|project, (categories=one|two|three), (tags=yes|no|maybe), (connectedClient=1065), id!={$page->id}"); That should find results if any of the selectors in the brackets find a match AND the template='blah blah' and id!=1234 are also true .
    6 points
  4. Hey darkmesaia! (it is so enjoyable how you can welcome people with such names without a doubt on Internets ) Welcome to the forums! If you need a customizable CMS - ProcessWire is certainly one of the best. Go ahead and try it. You can change almost everything on the frontend and a lot in the admin area. Give it a try. ProcessWire is not based on any of the general purpose php frameworks. But it has a set of features built in you would expect from a framework. And you can always extend with community modules or composer packages. I would say ProcessWire would save quite some time comparing to building a CMS from scratch. Feel free to ask further. Or just dive in and try building something with the help of the tutorials.
    6 points
  5. Welcome to the forum and ProcessWire! If you're trying to ask if you can replace your custom CMS with ProcessWire, well.. the answer depends a lot on what kind of features you're looking for. In most cases I'd say "yes", but it may require some changes in your development process. Every CMS has it's own way of doing things, and once you get used to the way ProcessWire works, it can indeed be extremely flexible and powerful. If you're just getting to know ProcessWire, I'd suggest visiting our docs section: tutorials are always a good place to start, but if you've already got a project you'd like to use ProcessWire for, you may find the cheatsheet and API reference more useful To answer your question: no, ProcessWire is not based on CodeIgniter. ProcessWire is a CMS and a CMF, meaning that in a it's really a framework itself. Edit: Right, @Ivan Gretsky beat me to it, and looks like I misunderstood the bit about custom CMS If the question was whether you should start building your own CMS or choose an existing one like ProcessWire, then the answer is that you should definitely go with ProcessWire. Building your own system may feel tempting, but it's a massive amount of work, and you'll more than likely run into both technical and security issues sooner or later.
    4 points
  6. Hello @tpr now I think it is the time to say thank you to you in the name of all "Admin on Steroids" users, because you make our life much easier. "Admin on Steroids" has grown incredible since the beginning. I was a little bit sceptic if I should use this module in the beginning, but now I am totally convinced. So thank you for your enthusiasm, your time and your patience with all our wishes! Best regards
    3 points
  7. Sorry for the delay -- meant to answer a while ago, but then something came up, and I forgot the whole thing. Hopefully you haven't been waiting this whole time I'm going to answer your suggestion at the Changelog support thread separately, but as a quick comment to this: I think your module looks really neat, and while listing changes to fields is definitely something I might consider for Changelog, I do also feel that these modules serve a different purpose. At least that's my first impression. When I first built the Changelog module, it was just a simple list of changes to public pages of the site. While it does display which fields were changed and now also includes system pages, I've intentionally left actual field values out of the equation. That's where VersionControl comes in: it stores field values and keeps track of changes to those. Again, the purpose is different: a relatively high-level log of changes vs. an actual versioning tool. Tracking changes to fields might fit VersionControl better than Changelog, but I'm currently not convinced that it would really be worth it. It seems to me that while there may be some common ground, these are mostly separate features. And, to be honest, VersionControl is already doing so much behind the scenes that I'm having hard time keeping up with everything that's happening. Smaller, more targeted modules do have certain benefits I'm definitely going to keep an eye out for what you do with this module, but for the time being I don't think there's much benefit in trying to combine them. --- By the way, I've been meaning to ask you about the naming of your module: what does the SVN part actually refer to? My first guess would be Subversion (SVN), but then again, I don't see any link between Subversion and your module. Hopefully I'm not being too intrusive here, but if my guess is right, I'd suggest reconsidering the naming. While Subversion is a commonly used product, in the long run this might become a bit confusing to some users
    3 points
  8. @Jennifer Stock, I've been working on a module for this purpose for a while now. Figured it's time to finish it off and release it. Find it here:
    3 points
  9. v1.5.0: - warning about unsaved changes (suggested by tpr) - better wording about include/exclude filter (suggested by tpr) - better visual feedback on Save (suggested by tpr) - theme selection (suggested by tpr) - small speed improvement on directory tree generation - small enhancements and fixes - codemirror update to 5.20.2 Thanks to our "Man on Steroids"
    3 points
  10. v0993 is up, incorporating bernhard's suggestions, including the github readme link and jumplinks to each submodule's configuration fields in the submodule "panels": The latest PW dev (3.0.40) has changes in some CSS classses (dropdown -> pw-dropdown) and AOS was adjusted for this. If you find that somewhere it's not working as it should, please report.
    2 points
  11. Very good point, and the timing couldn't be better. Just changed a link in my previous post..
    2 points
  12. You can use Tracy Debugger for catching emails (Mail panel). https://processwire.com/blog/posts/introducing-tracy-debugger/#mail-panel
    2 points
  13. It seems that this *reputation* sticks with me even though I'm clean Nomen est omen? Ontopic: this is a great module, simple and minimal, comes handy for quick modifications when there's no editor or IDE at hand.
    2 points
  14. File Editor GitHub https://github.com/f-b-g-m/ProcessFileEdit matjazp version https://github.com/matjazpotocnik/ProcessFileEdit A module that allows you to edit file directly in the in the admin area. First module and first time doing a file editor so the way i do it might not be the best. Feedback is welcome. Editor page Setting page
    1 point
  15. Thought I'd show some work in progress modules. Subscribers https://github.com/benbyford/Subscribers has functions for logging in new users, added with new subscriber role bulk export the subscriber users to comma delineated SubscriberList (submodule) module adds an admin page to view your subscribers and page through them, or export WireMailChimp https://github.com/benbyford/WireMailChimp (though I need to change the name on github) Implements https://github.com/drewm/mailchimp-api adds any user save to a mailchimp list settings for API and List id only adds users that have a checked email_subscribe field to true
    1 point
  16. Template Cache and $page->render($options) If you ever use the $page->render() to render out partials (of another page using its template file) and use template cache for the pages you're going to render and the page where you render it, it will create a cachefile. So if you go to that previously rendered and cached page, it will render that partial. If the page is accessed before a cache is created, it will cache this one and render that in as the partial, so kinda turned around. Funny effect. And many mmms and oaaahhhs To get a better understanding what's happening read on. Simple example code from a list page to render partials of articles (likely) // from the list pages template $markup = ''; foreach($products as $key => $child) { $markup .= "<dl>"; $markup .= $child->render(array('isOverview' => true, 'class' => $class)); $markup .= "</dl>"; } echo $markup; And in the template of the article // in article template file if(isset($options['isOverview']) && $options['isOverview'] == true) { // render small partial $class = $options['class']; $markup = "<dd class='$class'> <h4>$page->title</h4> <p>$page->summary</p> <a href='$page->url'>details</a> </dd>"; } else { // render complete article $markup = "<div class='product-details'> <h1>$page->title</h1> $page->body </div>"; } // output echo $markup; So now the render call $markup .= $child->render( array('isOverview' => true, 'class' => $class) ); in the list template will cache the page it renders (the small view of it). Thus if you access the page directly it will serve the cached small view of it. Ups. Solutions This is without specifying a different template file in the first argument in the render(). The effect doesn't happen when you, let's say create a new template file (ie article-small.php) and use that to render the page. Since this new template file is not connected to the template in PW it also has no cache for that render. To show what I mean is the following with the first argument the file you want the view to render. $markup .= $child->render("product-small.php", array("isOverview" => true, "class" => $class)); Still following me? Ok there's also another method to not allow a cache file to be created. There's a default options set in the render() in PW. Bingo! allowCache is what we can also use. $markup .= $child->render("product-small.php", array( "allowCache" => false, "isOverview" => true, "class" => $class )); And everything's back to normal. Just wanted to write down a little thing, as I stumbled over this recently, to scatter some keywords about this here . I think this isn't really documented somewhere but I thought it was maybe mentioned by Ryan in a thread about when he added this feature: http://processwire.com/talk/topic/3145-multiple-views-for-templates/page-2?hl=%2Brender+%2Bcaller#entry32876. Edit: Zaaakkkk and it's in Google 9 minutes !
    1 point
  17. Sorry @Robin S, those should have been backslashes If you do want to rollback though, grab this version: https://github.com/adrianbj/TracyDebugger/tree/ef3763e4174bf981d8ced1936c27f98b9802df01
    1 point
  18. https://github.com/adrianbj/TracyDebugger/issues/6 As noted in the issue, we discovered it is due to the use of LIVE dumps that I introduced as default for bd() a few weeks ago. I was hoping for a workaround because it is so much more efficient, but as you'll see if you read the linked posts, I might have to wait for that pull request to be finalized. I might have to revert to normal dumps until then. I'll investigate a little more in the next couple of days and fix one way or the other. For right now, you can instead use /Tracy/Debugger::barDump() inside your hook and you should be fine.
    1 point
  19. Sorry to say that this website shouldn't be in Sites anymore. I was looking for an example to give to a newcomer on the ProcessWire Forums and, feeling something was different and/or by habit, have just looked at the source code... I'll perhaps look for an automated way to find other websites like this one in Sites. I had done it to check if websites' urls were still valid as I had found that a few weren't anymore. It reminds me of the CMS Critic case.
    1 point
  20. You 're on PW forums, man! We wouldn't be here if we didn't think that PW deserves all 10s . So do not count on us - try it. Seriously I think that PW could be the best choice for that what you are after. There are some large scale projects with millions of pages done with ProcessWire. And security is one of the first priorities of the development team.
    1 point
  21. Regarding the diff tool: I've also been using diff-match-patch for automatic diffs. It's a solid library and particularly useful if you prefer to generate diffs on the fly (client side). The kind of issues you mentioned above, i.e. the library comparing column names in addition to values, may be difficult to avoid with any tool that isn't "JSON-aware". This is why, for an example, in VersionControl I ended up mocking up my own diff logic for page field comparisons. What I'm trying to say here is that simply diffing two strings may not always yield sensible results, as you have noted here too. In this case it would make more sense to iterate items one by one and generating a separate diff for each pair of old and new values. Hopefully I'm making sense here.. and sorry if I'm mixing things up and this is what you're already doing, I didn't read your code that thoroughly
    1 point
  22. lol, really?! sorry for that - i have to take a closer look anyhow. but i have to use my module first some time to see what/if there is a need... sometimes in live you need a second look even on processwire i needed it - and i'm really happy i took it!
    1 point
  23. First thing would be to check that those two "if" tests are being passed. You can do this by logging a message after each test. Or it's really easy with Tracy Debugger: $fu->addHookAfter('FrontendUser::save', function($event) use($fu, $input) { if($event->return === true) { bd('test one passed'); if(!empty($input->post->password) && !count($fu->form->getErrors())) { bd('test two passed'); // the rest of your code } } });
    1 point
  24. You can activate (called "installing" in standard PW lingo, which is a bit confusing, since it comes with the system being already available) the core module called "Forgot Password", so that you can send a password reset emails form the admin login screen.
    1 point
  25. @nabo Welcome to the forum. You need to hook in ProcessTemplate::buildEditForm. More about hooks: http://processwire.com/api/hooks/
    1 point
  26. Use https://blisk.io/ for mobile testing.
    1 point
  27. Not sure if this helps, but the diffing reminds me of the popular https://www.drupal.org/project/diff module in Drupal. The 7.x version uses http://cgit.drupalcode.org/diff/tree/DiffEngine.php?h=7.x-3.x a file from phpwiki The 8.x version uses https://packagist.org/packages/mkalkbrenner/php-htmldiff-advanced
    1 point
  28. @jacmaes mentioned he's using https://perishablepress.com/6g/ and i wonder if he is the only one? @jacmaes, as i read in your link there are some wordpress plugins for that. would you think it would be hard (or useful) to create a pw module for that? are you using it in conjunction with other firewalls or standalone?
    1 point
  29. wow thanks guys for SOTW (news 128) , had completely missed that somehow! Also forgot to mention the credits page https://www.elliottcarter.com/credits/ where thanks to all forum members, and a few folks who really made this project possible during it's development and helped me on the forum, and also just by their modules and/or advice, @ryan, @LostKobrakai, @Martijn Geerts, @adrian, @teppo, @netcarver, @horst, @kongondo, @Soma (and at some point i still have to figure out how you make those cool images with the screenshots/devices, always have trouble with that...)
    1 point
  30. This function here listens for repeater's events and initialize jQuery Magnific inside a repeater. Tested on my site only though. EDIT: Also need to check if repeater is being used or not. // magnific $(document).ready(function(){ // If repeater field if ( $('.InputfieldRepeaterAddItem').length ) { //console.log('Repeater is being used'); $(document).on('click opened openReady repeateradd', function(){ initMagnificPopup(); }); } else { //console.log('Repeater is NOT being used'); initMagnificPopup(); } });//end jquery // Initialize Magnific function initMagnificPopup() { $('a.add_media').magnificPopup({ type:'iframe', callbacks: { close: function() { // will fire when popup is closed window.location.reload(true);// force parent page refresh on modal close } } }); }
    1 point
  31. Thanks for useful module. Just wanted to notice that it works as expected on PW 3
    1 point
  32. Yes, it's for the admin. This might become a summer project
    1 point
  33. Ivan, always happy to oblige:-) The backend is not customized. It uses the Modesta Theme which we felt was a tad better than the default. We were under tight time pressures to launch the site and decided to skip any backend customization. For the time being, permissions are just for backend admin - web, magazine editorial. There was an idea we had mooted with roles for users who submit photos, but because of the launch deadline, we have deferred that bit for Phase 2. I am appending a screenshot of the backend, just to show you what we have done. The Block-System that you see, is for organizing the Home Page content. It has 3 regions [left, middle, right], very similar to Drupal's regions, in the template. Within each region, post excerpts can be added by the admin for control of the Home Page content. Magazines and Web Editorial, are organized by month. Trust that answers your questions.
    1 point
  34. Pete, I reckon all what you have stated are the reasons why so many of us have gravitated to Processwire. I did a bit of scouting before we ended with Processwire. The search was for light, fast systems [coming from Joomla, WP, Drupal that was necessary] as we had enough problems building large sites with those CMS. And what I read and saw about PW here was promising. We started with one programmer who was briefed to experiment with it and within a week he was going ga ga over PW. We then took it forward to the entire team. Now, we have 10 of them working on Processwire, on various projects. PW is the choice CMS at Pigtail Pundits, replacing WordPress and the occasional Drupal project. It has given the team here new energy and fresh possibilities and that's remarkable in itself. May it continue in absolute abundance, for PW, and for the entire community behind this remarkable system.
    1 point
×
×
  • Create New...