Jump to content

Leaderboard

Popular Content

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

  1. v1.7.7 is uploaded, docs will come later I'm happy with the asmSelect + Select2 result. The jump on click is still present but I think it's a minor issue. There are also 2 extra field config settings: placeholder and limit for FieldtypePage and FieldtypeOptions, you can find it under the Input tab. Currently it's working with asmSelect variants only. I think these additions make using asmSelect much more convenient, feels native after using it once or twice @adrian That top checkbox would mess up the look a bit, but it would be handy otherways.
    4 points
  2. @mr-fan In my posting before I wrote, that I appreciate it, when a system tells you, when there's a problem and what you should do to solve it. So I fully agree with you in that. Do you think the message https://www.dropbox.com/s/7tanf2elkn7lvxg/Screenshot 2018-02-28 10.29.44.png?dl=0 informs the user in the best way, which is possible? Thanks for your nice offer, to send you a PN in german. I hope it will not be neccessary, but who knows @pwired I have no experience with CMS at all. So I do not have to adapt from habbits of another CMS. But probably I have to adapt my wish to get code as clean and consise as handwritten html. I have no idea of how far it is possible to get really consise code with PW. I will explore that. Thanks for the helpful list of links and questions. It's bookmarked.
    3 points
  3. You can use explode method to get only need properties of pages, so you can equalize array structure of pages and items from the Instagram feed. $x = pages('template=product')->explode(['id', 'created', 'title']); $y = getInstagramFeedArray(); $result = array_merge($x, $y);
    3 points
  4. +1 Still, I've never come across this issue before but now that I deliberately made a mistake I see that it works just as you described. Just to point out, PW does not "zap anything", this is how a form works without a developer making sure that temporary input field values of a form are stored somewhere (typically session) for such a case as a post action or being reloaded.
    3 points
  5. Processwire checks like @horst wrote even things that in server environments are not set or are "not good practise" - i always a system that is thinking for me and show me important things, instead of stupid systems that are run automatical but give a f**** about where they run. Like @zoeck wrote PW is definitive not a click and run system, but there are so many other things that making it awesome, even this simple environment check for example is what i want more than a ready to use system that is not helping me or thinking for me to prevent future problems... [german]Mir ist ein System mit einer sinnvollen Warnung lieber, als eines dem die Umgebung egal ist. Für die fehlende Servereinstellung kann PW nichts. Eine fehlende Warnung in einem CMS will ich als User aber nicht haben... somit ist mir aus Benutzersicht die Warnung lieber [/german] In this forum almost every user takes mostly everthing polite....;) (If some things are hard to understand, you can wrote me a PM in german, too - so language is no problem.) My way would be start from simple to complex. Becaus with Processwire you have found a system that could serve a simple website with minimal setting and a complex ecosystem that runs big data or business....so the force is up to every single user how to use this tool. So study the existing docs in englisch especially the https://processwire.com/docs/tutorials/ and try the simple PHP snippets like some for each loops th get content, get your head in the simplest template engine HTML + PHP Snippets....later you could dive in things like (markup regions)...
    3 points
  6. Hey @adrian, thank you for your continous great work and efforts on this module. Is there any way we can support you with a little donation or something else? Would you even want that? Tracy Debugger helped me so many times, and reduces my work and error finding, so I would like to give something back to thank you. I know, that you invest much time in developing this.
    3 points
  7. Processwire isn't a "one click ready cms"... and i think when somebody understands the template system etc. - then it shouldnt be a problem to add a locale to a php file (or the config file - when it's not a multi language system) i think the first part for you, is to learn the php basics - if you know them, its easier to work with processwire... and after 1-2 tutorials (in english ) - you know how to use processwire (okay, the basics ) There are some very important pages: http://processwire.com/api/ref/ http://cheatsheet.processwire.com/ http://processwire.com/api/
    3 points
  8. 3 points
  9. @Robin S: it's the latter case. I had originally some weird issues with image fields and such, but got those fixed at the last minute, so was a bit worried that there might be other issues I just hadn't noticed yet. Also the UI of the 2.0 branch could be a bit unstable: I've been moving things around, trying to figure out what works best, and I'm still considering rebuilding the History tab from the scratch. That being said, if you're using PW 3.x, I'd definitely recommend going with the 2.0 branch. Current master branch works fine with PW <= 2.7, but not so much on 2.8 or 3.x. Also, if you do run into issues, please let me know so that I can take a closer look at them
    3 points
  10. Maybe you can hook Page::path and check if there is urlSegment and then append /amp/. wire()->addHookAfter("Page(template=news)::path", function($e) { $input = wire('input'); if($input->urlSegment1) { $e->return = $e->return . "amp/"; } }); In that way, if a user visits AMP version of a page all links will be linked to AMP versions of other pages.
    2 points
  11. You basically have two choices Convert the PageArray into a regular array OR Convert the social media array into a WireArray (e.g. each to be a WireData which you throw into one WireArray) #2 will give you the advantage of easily sorting by your custom date field. I am not sure though if a WireArray can be combined with a PageArray just like that (although the latter is from a WireArray, so, yeah, maybe it is possible). Edit: Depending on your operations and size of the PageArray, since Page objects can be big, to have the best of both worlds (1 and 2), you can use explode as per @Zeka's suggestion, but convert that into a WireArray. Then, convert your social media array into a WireArray and add it to the first WireArray. You can then do your sorting by the custom date field. I don't know how much this will cost you in server resources though. Just a thought...
    2 points
  12. Yeah, although an echo would probably work better
    2 points
  13. I don't understand this. What input is this? The module works like this: A. Define Field/Inputfield Create and edit a Field of type Variations In the field settings, create the custom inputs that will be needed for each product variation irrespective of its attributes. For instance, price, quantity, sku, etc. Currently, you can only do this in the field settings which means non-superusers cannot create custom inputs. This will change in future releases Save B. Define Attributes (and their values) and Build Variations Create attributes and their values. These are independent of each other and of products. Meaning, you can reuse, e.g. Size attribute with other attributes, e.g. Colour Each attribute has one or more values. E.g. the attribute Size can have Small, Medium, Large, etc. The attribute Colour can have Blue, Orange, Yellow, etc values. You then build variations. E.g., build the variations for a Product called "ProcessWire T-shirt" You give the variations (definition basically) a name You then add attributes you want, e.g. Color and Size. However, not all the values of these attributes will be available automatically. So, you need the next step You then select the values of the attributes you want. For instance, for size, you might want all the available sizes, so you add them all For Color, let's say you only want two colours, so you add Yellow and Blue Save and link that variation to your product page and you are done. You get a table with a combination of all of your available Sizes and Colours for the given product (un-editable) as well as input for the custom inputs you created in A., i.e. Price, Quantity, SKU etc. Each individual variation (i.e. one row in your table of variations) has its own ID. Just simple 1,2,3,4 etc. In our example, a row would consist of color,size, price, quantity,SKU. The price, quantity and SKU are inputs where you specify the respective values in relation to that particular variation. Frontend implementation is up to you. You use the available combinations as returned to you by the Inputfield to build the markup for product selection. You will need custom JS to send values back to the server. Have a look at the documentation here. You have access to each combination/variation ID as follows: $out = ""; $variations = $page->variations;// returns a VariationsArray which is a WireArray derived object foreach($variations as $variation) { $out .= "<input type='hidden' value='{$variation->id}'>" .// variation/combination ID "<p>Colour: {$variation->colour}</p>" . "<p>Size: {$variation->size}</p>" . "<p>Price: {$variation->price}</p>"; } echo $out;
    2 points
  14. I've reported a similar problem here: I'd prefer if PW would fill in something automatically here instead of throwing error messages.
    2 points
  15. Hi Mikael! Yes you can! On the field settings, go to "Access" tab and there you'll have the options to make the field editable per role.
    2 points
  16. Thanks for mentioning me/AOS but I don't think AOS is comparable to Tracy Anyway, I may implement such button sometime, mainly out of curiosity. I've been in a similar situation years ago with my portable launcher (yaP) but I postponed it until... still today
    2 points
  17. @zoeck From a usability point of view I don't agree. An installation should be as automatical as possible. When decisions are necessary, it should be asked. If an installation needs a manually configuration, because there's no other technical solution or there was no one who implemented that, the user should get a message, which explains exactly, what he could and should do. When I understood it correctly, than there are two options: 1 Change the server configuration 2 Edit _init.php Please take that as a polite suggestion. It is not easy to make sure, that something is meant as a suggestion and not at all as an expectation or criticism in a foreign language.
    2 points
  18. I can make them configurable. As for the scroll position I will try your fix and also try something else.
    2 points
  19. Great thanks for this. Efficiency boost a lot! I have tried a bit to solve the jump and search value removal after selecting. I have changed aos.js(around line 1411) to below. It seems working good for single instance. var selectScrollTop,searchText; // this selecting save the scroll position and search value $(document).on('select2:selecting', '.asmSelect', function (event) { selectScrollTop = $(".select2-results__options").scrollTop(); searchText = $(".select2-search__field").val(); }); $(document).on('select2:select', '.asmSelect', function (event) { var $asmSelect = $(this), src = event.target || event.srcElement; if (src.tagName === 'SELECT') { // var inputSelector = '.select2-search__field', // searchTermAttr = 'data-select2-search-term', // searchTerm = $(inputSelector).val(); // save search term in parent's data attr // $asmSelect.parent().attr(searchTermAttr, searchTerm); // change and rebuild + reopen $asmSelect.val(null).trigger('change.select2'); $asmSelect.select2('destroy'); if ($asmSelect.parent().find('[data-asm-placeholder]').length) { select2Config.placeholder = $asmSelect.parent().find('[data-asm-placeholder]').attr('data-asm-placeholder'); } $asmSelect.select2(select2Config); $asmSelect.select2('open'); // the below 2 lines are added to restore the scroll position and search result $(".select2-search__field").val(searchText).trigger('keyup').trigger('input'); $(".select2-results__options").scrollTop(selectScrollTop); // restore previous search term // $(inputSelector).val($asmSelect.parent().attr(searchTermAttr)); // $(inputSelector).trigger('keyup').select(); } }); Edit: I overlooked. You have already made the search term restoration but you have commented them. Any considerations for this?
    2 points
  20. You can put the filter logic in your articles.php template: // First Approach //Allow URL segments on the articles template // so the url will be example.com/articles/cars/ 1 - $category = $sanitizer->selectorValue($input->urlSegment1); // Second Approach // If you don't want to use segments, you can use querystrings, but getting a less refined approach IMHO // example.com/articles/?cat=cars 2- $category = $sanitizer->entities($input->get->cat); $filtered_articles = pages()->get('/articles/')->children("categories=$category, limit=10");
    2 points
  21. Check to make sure you don't have HTML Entity Encoder selected as a text formatter for the field. I just tried installing the Codemirror plugin for CKEditor and it's working as expected here (although I did need to select a light-coloured theme because the extra specificity coming from editor.css forced the text to black).
    2 points
  22. Cache + Sessions. It's the thing to do after moving a site.
    2 points
  23. Thanks, Horst. That helps me. I will ask my "hoster" (a friend) to set the setting on his server.
    2 points
  24. Hi @fermion, willkommen in der wunderbaren Welt und der hilfreichen Community von ProcessWire. Wir schreiben hier meistens in Englisch, damit es alle verstehen können. Ich hoffe du verstehst was die meisten hier schreiben. Now I will continue in english: Regarding your question about a risk for setting the locale. I would recommend to set the locale and date format to the corresponding language. Here is the code I use on a large website in my _init.php: $lang = $user->language->name; if ($lang == "default") $lang = "de"; $date_lang = array(); switch ($lang) { case 'en': setlocale(LC_ALL, 'english_gbr', 'english_britain', 'english_england', 'english_great britain', 'english_uk', 'english_united kingdom', 'english_united-kingdom'); $date_lang[0] = "%A %B %dth %Y at %I:%M %p"; $date_lang[1] = "%B %dth %Y"; $date_lang[2] = "%I:%M %p"; $date_lang[3] = "%A"; break; case 'nl': setlocale(LC_ALL, 'english_gbr', 'english_britain', 'english_england', 'english_great britain', 'english_uk', 'english_united kingdom', 'english_united-kingdom'); $date_lang[0] = "%A %B %dth %Y at %I:%M %p"; $date_lang[1] = "%B %dth %Y"; $date_lang[2] = "%I:%M %p"; $date_lang[3] = "%A"; break; case 'fr': setlocale(LC_ALL, "fr_FR", "fra", "fr_FR.UTF8", "French_France"); $date_lang[0] = "%A %d %B %Y à %kh%M"; $date_lang[1] = "%d %B %Y"; $date_lang[2] = "%kh%M"; $date_lang[3] = "%A"; break; default: setlocale(LC_ALL, 'de_DE.UTF8', 'de_DE@euro', 'de_DE', 'deu_deu', 'German_Germany.1252'); $date_lang[0] = "%A, den %d. %B %Y um %k.%Mh"; $date_lang[1] = "%d. %B %Y"; $date_lang[2] = "%k.%Mh"; $date_lang[3] = "%A"; break; } Yes, normally your content is embedded in "fields" in ProcessWire. Then in your template file you output the content of the field in a HTML structure you like, for example a div or a metatag. I agree, that there are not much german tutorials that cover ProcessWire, but I think this is because almost the whole developer community is used to speak and understand english. Anyways: Here is a nice tutorial in german (there are more in the same channel) You will find a nice blog post "Warum ProcessWire die beste Wahl für Ihre Website ist (nicht immer, aber in den meisten Fällen)" on my website, which isn't a tutorial, but an explanation, why and when to use ProcessWire.
    2 points
  25. Hi Marco (ciao Marco, compaesano ;)), I'm supposing you're following padloper docs (I never used it), but I suggest you to follow this nice categorization of contents by kongondo, to grasp some concepts : https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ As I said, I never used Padloper so I don't know its api in details, but I would go for Fieldtype Page for product variations (color, angle, etc...).
    2 points
  26. HELLO! I released my first mobile game! As well as working on web projects, i'm trying to make more games. As a portfolio piece I recently created and published my first game for Android and iOS- http://fullcolourtiles.com/ Check it out, its a free puzzle game available now!
    2 points
  27. Several nice improvements over the last few days: 1) Major improvements to panel zIndex behavior - this should make things much less annoying - no more trying to get your panel of interest to be on top of another one. Mousing over the panel icon should now always bring it to the top, but with already open panels, now they only get promoted to the top if you click somewhere on the panel. Before it was onmouseover which made it quit annoying at times. Also panel order is remembered when reloading the page. 2) Console panel will no longer disappear if you use the keyboard shortcut to run code without having clicked somewhere on the panel first - much friendlier. 3) ESC key to close all open panels - I am finding this really handy already. I don't think this interferes with any other use of the escape key, but let me know if anyone thinks this should be optional. 4) Add test email address option to the Mail Interceptor panel - this was mentioned in another thread, but added here in case anyone missed it. If no address is entered, it behaves how it always did - it prevents the email from being sent and instead captures and displays what would have been sent. If you add a test email address, in addition to it's normal behavior, it also sends the email to the test address (but still not the original recipients). 5) Various bug fixes - especially in the Request Info panel when viewing certain module settings pages. As always, thanks for any feedback on these new features!
    2 points
  28. Thanks but this case this signals that the field is ready, but select2.js needs asmSelect to be ready too. I used a 700ms setTimeout to fix (using the reloaded event) but that was less reliable and much slower too. In fact it may work now that I modified my stuff a lot but I think requestanimationframe works just fine, no need to swap out.
    1 point
  29. @fermion Ok, I will find the time to post that request. Night-night!
    1 point
  30. @szabesz Thanks for your feedback. But I'm the wrong person for adding a request at github. My English is to poor. And my knowledge about the task is near zero. Thanks to all who all helped me in this thread. Good night!
    1 point
  31. Thank you. I have never used it, but I think the best idea is, to be efficient on all levels. Create the tree fast using findArray, maybe even load parts via Ajax, and/or use caching. If creation is as fast as shown in the example (794 Titles in 0.021 seconds ), Ajax and caching are probably not necessary.
    1 point
  32. Now I understand you clearly. You are right, 30 inputs are not great, even with selects. I see several options all of which involve JavaScript for the friendly front-end side of things Together with the inputs you currently have above (your colour and angle inputs), add hidden markup, maybe a <ul> list with the values for each combination, e.g. <li data-colour='green' data-angle='90' data-some-value-for-this-combination='abc'>green-90</li>, etc. On click add to cart, if both colour and angle have selections, use JavaScript/jQuery to get the <li> whose data-colour == "selected colour" AND data-angle == "selected angle". You then update your cart depending on the selected combination, e.g. using its data-some-value-for-this-combination, which could be its ID. @note: if the some-value is a price, you only use it for visual feedback to the user. Prices should be determined server side Something similar to above except we send the selected combination server-side immediately using Ajax so that we return and display the value of "some-value-for-this-combination" I had another option but I have forgotten it in the course of typing, hehe! OK, server-side, you need somewhere to stay your combinations and their values. I don't know how you are storing this but it should be pretty straightforward to find your product using value of data-colour and data-angle. If you have the different colours and angles stored as pages, then the markup should ideally have the respective page IDs and send these back using Ajax. E.g., rather than green, you would have data-colour="1234" and data-angle="5468". Hope the above make sense.
    1 point
  33. Thanks @Zeka - yeah a bit challenging because of missing methods (and not enough time right now to futz with it). If you want to send me a copy of the module before you post it publicly, I can test and get a fix in place for the Console panel.
    1 point
  34. $pages->find('selector')->explode() is all ProcessWire API
    1 point
  35. Lots of us too! See a few posts starting from this one: https://processwire.com/talk/topic/12208-tracy-debugger/?do=findComment&comment=126847 Let's start a donate to Adrian movement! And AOS fans should ask @tpr to implement a donation button as well!
    1 point
  36. Hi @dragan Good questions! Firstly, the video and PWABuilder share the same topic but are otherwise not related. What the video gave me was a simpler approach to adding PWA features to a website, the emphasis being on 'progressive'. A Google search then lead me to PWABuilder. You don't have to do everything at once and while SPA's are PWA's, the reverse is not always true, ie a PWA does not have to be a Vue.js or similar application with REST API's, authentication, etc. Vue.js and its ilk give many more options - JWT, offline DB Storage, push notifications, etc. I needed to get my head back into the basics. The MS PWABuilder is purely a starting point. Many of the niceties you're looking for aren't included, eg a push notification saying "do you want to add it to your homescreen?" I got PWBuilder working for me by putting the following in my site root directory: manifest.json pwabuilder-sw.js pwabuilder-sw-register.js offline.html I then referenced manifest.json, pwabuilder-sw.js and pwabuilder-sw-register.js in my "_main.php" template so every page would get them. Also, see my tips above about what/where to put the generated files. To test that the pwabuilder-sw.js was working, I 'drag-n-dropped' the URL from my browser to the desktop, turned off all internet connectivity then launched the URL from the desktop. All 'while-online-pages' I'd referenced were available offline (also I few I hadn't visited). Other pages I hadn't viewed and hadn't had time to cache before I left the online version, displayed my offline.html page. PWABuilder stores pages offline in the browser cache. Clear the browser cache, lose the offline stuff. What PWABuilder gave me, in combination with ProCache, was super fast load times and pages that could be viewed offline. It's a good starting point, not the be-all-and-end-all. I'm still learning this stuff too
    1 point
  37. Totally fine, I enjoy the discussion (and added this tag to the thread title). Your example shows that the findArray method would be useful not only for the datatables module but also for other scenarios. I think it would be a good addition to the core (as already mentioned by adrian). I'll work on this next week and make a PR ans see what ryan says. For reference, here is info regarding the limit for WHERE IN(...): https://stackoverflow.com/questions/4275640/mysql-in-condition-limit
    1 point
  38. Playing more... If you need a fast multi level nav, you can try the code below (using findArray). Set "has_parent" to the id of the parent page. The difference to looping through pages -> children is remarkable. Objects : 794 / Execution time : 0.021355867385864 seconds function buildTree($flat, $pidKey, $idKey = null) { $grouped = array(); foreach ($flat as $sub) { $grouped[$sub[$pidKey]][] = $sub; } $fnBuilder = function($siblings) use (&$fnBuilder, $grouped, $idKey) { foreach ($siblings as $k => $sibling) { $id = $sibling[$idKey]; if (isset($grouped[$id])) { $sibling['children'] = $fnBuilder($grouped[$id]); } $siblings[$k] = $sibling; } return $siblings; }; $tree = $fnBuilder($grouped[$flat[0][$pidKey]]); //!! return $tree; } $arr = $pages->findArray("has_parent=1029, sort=parent_id, include=all, limit=5000", array('title'), array('id', 'parent_id', 'name')); $tree = buildTree($arr, 'parent_id', 'id'); foreach ($tree as $p1) { echo '<h2>' . $p1['title'] . '</h2>'; if (isset($p1['children'])) foreach ($p1['children'] as $p2) { echo '<h3>' . $p2['title'] . '</h3>'; if (isset($p2['children'])) foreach ($p2['children'] as $p3) { $count++; echo '<a href="../myparent/' . $p1['name'] . '/' . $p2['name'] . '/' . $p3['name'] . '/">'; echo '<h6>' . $p3['title'] . '</h6></a>'; } } } Function buidTree is from here: https://stackoverflow.com/questions/4196157/create-array-tree-from-array-list @bernhard Am I hijacking your thread?
    1 point
  39. It really depends. User like me use prefix on field name would benefit from keeping the search term. The reason why I prefix fields is to distinguish what inputfield the field are using. For page reference field for product I name it page_product, so I can quickly spot the field when I search "product" or "page". I also believe many developers here like you do not use prefix a lot too. It seems like no perfect solution here unless everyone name and use fields in the same way. The best way might be that the keeping search term and scroll position could be toggle on/off. Anyway, they are relatively minor, the search function is already a great efficiency boost for me and also saves me from future client's complaints.
    1 point
  40. I was just thinking of appending a checkbox at the top and using that as the toggle. Maybe like this: http://jsfiddle.net/NogginBox/ScnQT/1/ or maybe with this extra checkbox directly above Option 1.
    1 point
  41. As far as I understand you'd like to have 3 input radios ( one for each color green/blue/army) and 3 options too (90°.105°.150°) right? This is not happening because your $page->variations are 9 indeed, as per their id's. Also, I found very confusing to have unnecessary html inside a php block where just a foreach loop could be sufficient, but it's a personal preference I suppose.
    1 point
  42. @zoeck Thanks. A good point to start @Nüsse Thanks for the links, but that are no collections with tutorials in german. @all Klenkes wrote: "On most of the websites I maintain I had to put this in init.php: setlocale(LC_ALL, "de_DE"); " Is there really not risk to put that anywhere into the init.php, are there no side effects for multiple language websites? About PHP: Of course I have to learn some PHP, when I start working more intensively with PW. I have some few experiences with PHP-Includes, or how to use simple scripts on a non cms website. Something else: I heard, that for PHP there are "methods" to get direct access to the DOM tree. Is that possible with PW? I mean, can PW distinguish between a tag and content? I would love to do some typographic manipulations with regular expressions. Than it is important, hat I can only treat "content" and never tags. Sorry for my poor English. I hope you understand, what I mean.
    1 point
  43. @Macrura, glad you got it working eventually. I intend to work on an upgrade to this module sometime soon. Hope to add a feature allowing all dialog options to be configured from within a single hook, which will make things easier (for those comfortable writing code anyway). Will also look at adding some clarification that an attribute must first be declared before adding any of the "double underscore" enhancements.
    1 point
  44. Another useful update - the File Editor panel now remembers and reopens the folder tree to the currently open file and highlights that file. Should make navigation to related files much simpler after save when the page reloads.
    1 point
  45. New version just committed that is a must for Windows users - a huge thanks to @matjazp for the report and also local access to his dev machine so I could find and fix all the issues. You Windows guys need to speak up when you see issues - the Console, Snippet Runner, and Captain Hook panels in particular were a mess Please let me know if you see anything I have missed. Other changes include: Add custom register_shutdown_function() for Console and Snippet Runner panels - especially important for PHP 5.x. PHP 7 handles most errors as non-fatal. Fix AJAX panel updating for Console/Snippet Runner when SessionHandlerDB not installed. A few styling fixes.
    1 point
  46. JSON API response testing in the Console panel I know we all know about json_decode($var, true), but here's a useful tip when working with APIs that return JSON. Note that I am using the new shortcut for specifying a depth of 7 so I get to the deeper levels of the JSON response. Obviously that's a LOT nicer than:
    1 point
  47. It's been out for about 10 days now, but I never really announced the changes here - wanted to see if there were any issues before publicizing. The new 4.9.x version is now available. Here's a list of the main changes: 1) New File Editor Panel Supports editing all files in your PW install (you can define the root as /, /site, or /site/templates Can be used as the handler for opening editor links from the debug bar (errors, log files, Captain Hook, ToDo, Template editor, etc), rather than your code editor. Can be enabled as the link handler for live sites only, or local as well if you prefer. Has "Test" functionality for all files so if you make a change, it will only appear for you and not other users. Makes a backup of the old version each time you save a change and provides a "Restore Backup" button to instantly revert. Supports in-code search & replace with CMD+F Syntax highlighting/linting for PHP, CSS, and JS This replaces the Template Editor panel, so that one has been removed. Handles fatal errors gracefully - this is the biggest feature in my opinion. The problem with most online file editors is that if you accidentally make a code change that results in a fatal error, it can be impossible to fix and resave because the system is not functional. This editor gets around this problem by using Tracy's custom error handling which allows debug bar panels to continue to work, so you can manually fix the problem, or click the "Restore Backup" button. Of course if you used the "Test" option, you don't even need to worry, because you are the only one to see the version with the error anyway. As a follow up to that last point. I have used the excellent ProcessFileEdit module for helping to debug some issues on other people's sites without needing FTP access, but a couple of times I have made a fatal error mistake and had to get them to restore the file, so this really is a huge feature for me! 2) Support for Process File Edit If you prefer ProcessFileEdit to this new File Editor Panel, so you can use it for handling debug bar links. Note that this won't give you the "Test" and "Restore" options, or the fatal error protection, so it's not really recommended. I added support for it before building the File Editor panel so decided to leave in case others prefer it. 3) Revamped Console Panel The code and results sections are now a "split" screen so you can adjust the size of one relative to the other with the bar in the middle. Handy for working, but especially handy when you want to post a screenshot to the forums "Large and "Small" versions of the panel - click the arrows at the top right of the panel - the large version can be very handy when you have lots of code or results to display Supports in-code search & replace with CMD+F 4) New maxDepth and maxLength shortcuts and new barDumpBig() method You can now replace dump or barDump calls like: bd($var, array('maxDepth' => 7, 'maxLength' => 500)); with: bd($var, [7,500]); You can also make use of the new: bdb($var); as a shortcut to: bd($var, [6,999]); 5) New SQL Query column in the Selector Queries section of the Debug Mode panel This is a great learning tool to see the selector queries that are run for a given page request, and what SQL query these selectors are translated into: 6) Removed old Legacy version of Tracy core It was getting too painful to maintain support for this old version. This means that TD now requires PHP 5.4.4+ 7) Namespacing and refactoring lots of Javascript code No feature changes, but code is now easier to follow and is much less prone to any name conflicts with your site 8) Reduced loading of unnecessary code Lots of refactoring here too - should see some performance gains 9) New default server type indicator in the debug bar Not a big deal, but if you want a server type indicator and don't want the full height/width bar, you can now have one in the debug bar - I think it's a handy visual clue when looking at /working on live vs dev/test versions of a site at the same time. 10) Lots and lots of bugs fixes, layout, and styling improvements It's amazing what you find when you're buried in the code for a couple of weeks solid 11) The new docs site that I mentioned earlier is now fairly complete - I just need to work on the Tips & Tricks section https://adrianbj.github.io/TracyDebugger Feel free to make a PR for improvements to the docs - everything is under the /docs folder in the main Github repo. There are also "Edit on github" links on each page so you can use those as well.
    1 point
  48. A new German PW developer. Maybe we should think about a Processwire Germany meet-up. So many new German people here recently
    1 point
  49. ... and assuming that you don't / can't add all image field names in your code, something like this should also work: $allImages = array(); foreach ($fields->find("type=FieldtypeImage") as $f) { foreach ($pages->find("$f.count>0") as $p) { foreach ($p->$f as $i) $allImages[] = $i; } }
    1 point
×
×
  • Create New...