Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/07/2019 in all areas

  1. Ryan - I think this is really important!!! Earlier (https://processwire.com/talk/topic/20596-new-post-new-pw-website-ready/?do=findComment&comment=178332) I mentioned all the different ways to get $page that are listed on the variables page - turns out there is of course another $wire->pages which you don't mention there, but you do mention on the bootstrap page. I am not sure how to best clean this all up, but I think it makes things very confusing. Perhaps the entire website should stick with "$page" etc in all examples and wording, but then there is one dedicated page that explains what version can be used when/where and the pros and cons of each.
    9 points
  2. There is already some information on how to do this but it's a bit scattered, so here's a quick tutorial... This is how $session->CSRF->hasValidToken() handles AJAX requests, by getting the token name and value from request headers: if($this->config->ajax && isset($_SERVER["HTTP_X_$tokenName"]) && $_SERVER["HTTP_X_$tokenName"] === $tokenValue) { $valid = true; } else if($this->input->post($tokenName) === $tokenValue) { $valid = true; } So all we need to do is to pass the name and value to our JavaScript and set the right headers with our AJAX request. We could instead of setting headers put the name and value pair into the body of a POST request, as the second conditional doesn't care if the POST request is received via AJAX or not. But this limits the request to POST and the body data type to either multipart/form-data or application/x-www-form-urlencoded (because that's all that PHP's $_POST superglobal will handle). Admittedly this might be 99% of use cases, but for example if a GET request invokes significant processing then CSRF protection could be used to prevent a DOS attack on the endpoint. So, for the sake of a bit more flexibility, and to be more in keeping with what PW expects, we'll use request headers. I find it neater to write the token name and value into HTML and retrieve that using JavaScript DOM functions, instead of writing JavaScript with PHP ?. So somewhere, maybe in init.inc.php, get the token name and value: $csrfTokenName = $session->CSRF->getTokenName(); $csrfTokenValue = $session->CSRF->getTokenValue(); Then in a global footer template: <div class="js-csrf-token" style="display:none;" data-csrf-token-name="<?php echo $csrfTokenName; ?>" data-csrf-token-value="<?php echo $csrfTokenValue; ?>"></div> Now to retrieve the token in JavaScript: function getCsrfToken() { const csrfTokenNode = document.getElementsByClassName('js-csrf-token')[0]; return { name: csrfTokenNode.getAttribute('data-csrf-token-name'), value: csrfTokenNode.getAttribute('data-csrf-token-value'), } } Then in any AJAX request: const csrfToken = getCsrfToken(); let xhr = new XMLHttpRequest(); // ... // open the request and do some configuration // ... xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); // tell the server and PW that it's an AJAX request xhr.setRequestHeader('X-' + csrfToken.name, csrfToken.value); // create a header with the token // ... // send the request // ... And that's all, in the endpoint just do... if ($session->CSRF->hasValidToken()) { // works for AJAX! } This has used the default CSRF token created for every session, but to create and use a different token just specify an id: $csrfTokenName = $session->CSRF->getTokenName('myAjaxToken'); // this creates a token if one with the given id doesn't exist $csrfTokenValue = $session->CSRF->getTokenValue('myAjaxToken'); and... if ($session->CSRF->hasValidToken('myAjaxToken') { // ... }
    8 points
  3. Hey guys, wow, thanks for all the feedback and testing! I’ve pushed an update to the pre-launch staging site that fixes most of the glitches that have been brought up. There were a couple that I wasn’t able to duplicate, so I’ve quoted those below along with more questions. There’s a lot of subjective stuff in this thread as well, which is of course great for conversation, but please don’t feel sad if I don’t implement these suggestions at this stage. The focus now is purely on just making sure that what’s present works as it should (working out any bugs), and not trying to re-do or rewrite anything prior to launch. So if you don’t like the blog or some color or some other part, that’s fine—I hear you and am keeping notes. But I’ve first got to make myself happy with it first before launching it, so that’s where it’s at. Over time I’m sure much will change, and of course all suggestions are appreciated, but for now bug fixes are the focus, and we’ll work on other stuff later. Regarding accessibility stuff, I have implemented several of the suggestions here like some of the items Teppo mentioned. Though should clarify there isn’t a specific goal of tailoring the site for visually impaired people at this stage. I don’t think that’s a large part of our audience at present, and so I want to focus time in the short term towards optimizing towards the traffic that the site will be serving. But please keep these suggestions coming because this is still very useful and we’ll get to more of this soon. One thing that has come up multiple times in this thread has to do with fonts and/or colors. We may very well change the primary color at some point, but not until the Modules, Directory and Forum sites are updated for the new design. The whole point of the current color scheme is to maintain some relation to the existing sites, since it may be weeks before those other ones are updated. But experimenting with colors is still I good idea. You can change the color of the entire site by using a URL with a “?color=<hexcode>” on any URL in the site. Once you do that, the color will be retained on any links you click on, so you can browse the site with your selected primary color. Here’s an example that changes all the blue to the PW pinkish/red color (try not to laugh!): https://processwire.com/newsite/?color=e83561 Replace that e83561 in the URL above with any hex color code to experiment. If you come up with anything you like, paste in the link so we can all see it. Fonts are one thing that we might have to change before launch. As Horst mentioned, the current font renders really poorly on his computer, which means it might be the same for other people (though have not yet had confirmation from anyone else). Plus a couple of you have mentioned you don’t like the font, so I’m open to changing it (though admittedly I really like the current font). I’ve set it up so that you can experiment with different fonts for the site by doing the same thing that you did for the color URL above, but with “font=name”, replacing “name” with the name of the font. It can be any one of these below. The ones near the top are ones I kind of like, though no real order other than that. https://processwire.com/newsite/?font=rubik https://processwire.com/newsite/?font=barlow https://processwire.com/newsite/?font=encode (no italic) https://processwire.com/newsite/?font=khula (no italic) https://processwire.com/newsite/?font=mada (no italic) https://processwire.com/newsite/?font=montserrat https://processwire.com/newsite/?font=nunito https://processwire.com/newsite/?font=palanquin (no italic) https://processwire.com/newsite/?font=raleway https://processwire.com/newsite/?font=source https://processwire.com/newsite/?font=muli https://processwire.com/newsite/?font=fira https://processwire.com/newsite/?font=hindm (no italic) https://processwire.com/newsite/?font=hinds (no italic) https://processwire.com/newsite/?font=ibm https://processwire.com/newsite/?font=lato https://processwire.com/newsite/?font=open https://processwire.com/newsite/?font=roboto https://processwire.com/newsite/?font=sarabun https://processwire.com/newsite/?font=exo2 https://processwire.com/newsite/?font=titillium https://processwire.com/newsite/?font=noto https://processwire.com/newsite/?font=cairo (no italic) https://processwire.com/newsite/?font=saira (no litalic) https://processwire.com/newsite/?font=heebo (no italic) As some of you might now, I got my first new computer since 2013 a little more than a month ago, and it's an iMac 27" (though a used one), so that's kind of why I wanted to get it on the homepage. I know it's not the newest looking computer, etc., but I really wanted something more than just a browser frame. Yes the screenshot jpegs that appear in it a low quality jpegs (quality=10). My eyes aren't so good and I'm not seeing the compression, but sounds like some of you are. I may redo those at a higher quality before launch. Though the way I see it, this whole iMac with screenshots thing is probably temporary anyway. I really like what @Jonathan Lahijani is doing with that video and am thinking that will be a much more useful fit for the homepage longer term. @jmartsch and @gmclelland I can’t seem to duplicate this one (also Chrome). Tried numerous widths, including the narrower width like shown in the screenshot too. That dropdown is always opening to the left for me. The screenshot shows it opening to the right. Just wondering if anyone else is seeing it and if so, do you know of any adjustments that would correct it? @horst This is the biggest concern I’ve come across here, as those fonts definitely look terrible in the screenshot you linked, and we definitely don’t want anyone to see them look like that. Is it an issue with this particular font, or do you observe Google Fonts in general rendering like this? Is this a known issue if you Google around, or is it just something you are observing on your computer? Do any of the new fonts render properly on your computer? Is anyone else seeing them render like this? I’m wondering if the issue is isolated to a particular platform/browser, or what it might be isolated too. So far nobody else has reported this, but if you are seeing it please speak up.
    4 points
  4. On a sidenote: Just scanned this article today and truly lolled reading this comment
    3 points
  5. Great work Ryan, thank you! I fully agree with this. Our main use of Processwire is as a headless CMS / CMF for Single Page Applications. As a possible future user I would be very interested in learning about how PW can be used in this way. I would look for that on the 'Output' page (https://processwire.com/newsite/docs/front-end/output/). A simple JSON API example, without the use of any external modules, would suffice here I think.
    3 points
  6. We already had some discussion about something like this in the AdminThemeBoss thread: Did a quick try today and it looks promising: Currently this parses the LESS on each request, so I need to implement caching of course. But I think this is the way to go for adjusting the backend to your needs and CI. Creating custom themes for that task is just not efficient! Happy to hear your opinions. Does anybody want to take it further? I am really busy this year and that will not change soon...
    2 points
  7. @Robin S Here's Work Sans: https://processwire.com/newsite/?font=work This is one of those fonts that I do agree with you is very nice, but it seems like it works in some places and not others. I think it's the width combined with some of the details that is giving me trouble, especially at body copy sizes. Or maybe it could be that it's just so different that I'm not used to it. @teppo I am using a retina screens, both on my aging MBP and 27 iMac. However, my eyes are not so good, so I simply can't see anything if I use the scaled down resolutions. ? I have to use the default res (2560x1440 on the iMac). Not seeing the artifacts myself, but I know they are there, as I definitely saw them when I exported them in Photoshop. But the scaling them to 50% down (for hidpi) must have taken care of that. If using screen at native resolution (non-hidpi) I can see how the artifacts would show. I'll try re-exporting these. Making them PNGs doubles the size, but I think that's okay because I'm actually lazy loading these 1-by-1 as they display, so it's not slowing the initial page load. @horst thanks for reporting back on the fonts! Good to know some of them render well. Good to hear about the 110% thing being the cause of the dropdown issue. Though I have no idea how to fix that. I might have to switch up the order so that one of the items without a dropdown displays last.
    2 points
  8. @ryan Regarding the fonts rendering. There are three out of 25 that also look ugly on my machine and FF64: sarabun, lato, titillium. But not at such a high scale ugly compared to the initial font. And five out of the above font list renders very sharp and clear: rubik, nunito, ibm, roboto and open sans, of course. Hope that helps a bit.
    2 points
  9. @flydev I guess I should have mentioned that this one is a more easy finder alternative for home users, but not for pro users ? @adrian I am not even a mac user my self, I just picked up doing mac service to get a piece of the cake. Many photographers and home users around here seem to have problems to find their way with the default finder so they asked me for a more easy non commercial alternative. No need to apologize, I guess it was me swinging the door to wide ? You are on top of it man, I just love all your modules.
    2 points
  10. Ryan, A few more things: 1. Any reason why on this page: http://processwire.com/newsite/docs/start/install/upgrade/ you link to the Github repo for your PWUpgrades module, rather than the entry in the modules directory? Actually, I think this module should be promoted much more - I know you have security concerns with it on shared hosting, but I feel like more often than not PW devs will have a VPS or similar and can safely make use of this module - it's such a great timesaver and a nice plus for PW. 2. There is a typo on: http://processwire.com/newsite/docs/more/lazy-cron/ - note the capitalized 'O' in modules 3. Talking about those instructions - do we even have the "check for new modules" button/link these days? I also don't think you should bother mentioning PW 2.1 on the new site, so I think the instructions should say to go to the Core tab, find the module and click the install button. 4. On http://processwire.com/newsite/docs/modules/intro/ I would have thought that the main method for installing a module would be to enter the class name as listed in the modules directory, but you still primarily mention uploading files to site/modules. Getting OT, but is it time to have an AJAX driven autocomplete field for installing modules directly from the modules page? 5. Do you think it's a good idea listing those two CMSCritic reviews here: http://processwire.com/newsite/about/processwire-reviews/ - given that they went back and forward so many times and are now on WP I am not sure they are good arguments for PW. 6. Design / color choice is not my forte, but I find the grey boxes look dirty, eg: 7. Also, on the design front - I have already mentioned the blog "boxes", but the other thing that bothers me about that page is the blue background - I think it's too overpowering and completely out of character with the rest of the site.
    2 points
  11. Sorry - I really do apologize if that's how my comment came across - I honestly thought you might have been joking with your suggestion. Perhaps it really is great software, but given all the changes to MacOS in the last 7/8 years I would expect that something from 2011 might have problems these days. Again, I didn't mean to judge or dismiss your suggestion - I really just wasn't sure if you were serious. PS - I am not someone who needs the latest and greatest - I am still limping along with a 2011 Macbook ?
    2 points
  12. Ok, I tried before speaking, but dude, installed and removed twenty seconds later. So old, no tags, no sync, bad fonts, no preview, no panel, no mojave support... twenty seconds I can't saw more and didn't want. `ls -a` in a terminal is more useful And yes as Adrian pointed out : Thanks for the suggestion anyway, it look like it do the job, but I am looking for a productive tool. Not a terminal shortcut. @Jonathan Lahijani thanks you, it was not the goal, but you made me brought a license for my Windows laptop ?
    2 points
  13. I'm not a Mac user, but for Windows, Xyplorer is freaking amazing. It's like the ProcessWire of file managers. ?
    2 points
  14. @BFD Calendar You got Fatal error: Uncaught Error: Call to a member function each() on null in So you have to make sure that the is workshops_list is populated and contains an iterable object that extended from WireArray, so you can use each method on it. if(count($item->workshops_list)) { $out .= $item->workshops_list->each( "<font color='green'>| {title}</font>" ); }
    2 points
  15. Absolutely mate, but having done a pretty deep dive into the uikit theme over the last few weeks it is - surprisingly - not as difficult as it would first seem when I started wading through 14000 or so lines of unminimized CSS to get an idea of what was going on ? Basically you can just bunch a heap of CSS overwrites together and use the single variable like your example video, which is very cool. To be honest, there's stuff in uikit that could be bunched together more anyway, but generally speaking there's not too much difficulty targeting what you need because most of the styling is tied together pretty logically so it ends up working much like your example. I should have said earlier, I love your idea and it is something I have kind of been working towards with my experiments. I can't help but want to play with stuff, it's just the way my brain works. Took it a step further today prompted by this - and because any time I open my mouth I instantly want to make sure I can actually deliver on my suggestions - and can pretty comprehensively change the skin with around 25 php variables (so far) for less than 30kb in a completely uncompressed php file. As you would imagine, it is still very much a work in progress but had a pleasant amount of forward momentum. Naturally it wasn't from a standing start, as I have been playing around with my custom admin css for quite a few weeks now so had already "collected" a lot of the CSS I needed to target over that time. The beautiful thing for me - now I have finally taken the plunge - is I can more easily change stuff myself with what is essentially a config section at the top of my php/css file, which could definitely draw from the backend. Random example below plucked from the file, setting radius, backgrounds and borders (if desired) on all input items, defaulting to uikit if nothing specified. Once I have setup all the variables similar to this, I don't intend to look past the top section again ? .Inputfields input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not(.uk-form-blank), .Inputfields textarea:not(.uk-form-blank), .Inputfields select.uk-select:not(.uk-form-blank), .cke_chrome {<?php echo $input_radius ? 'border-radius:' . $input_radius . 'em;' :''; ?>} .cke_chrome {overflow:hidden;} li#Inputfield_navigation_order .Inputfields.uk-grid {border-radius: .5em;} .Inputfields input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not(.uk-form-blank), .Inputfields textarea:not(.uk-form-blank) { <?php echo $input_bckgndcolor ? 'background-color:' . $input_bckgndcolor . ';' :''; ?> } .Inputfields input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not(.uk-form-blank):focus, .Inputfields textarea:not(.uk-form-blank):focus { <?php echo $input_bckgndcolor_focus ? 'background-color:' . $input_bckgndcolor_focus . ';' :''; ?> <?php echo $input_bordercolor_focus ? 'border-color:' . $input_bordercolor_focus . ';' :''; ?> box-shadow: 0 0 .5em rgba(0,0,0,0.2) }
    2 points
  16. I must say that i am very much in love with where the new site is going and specificly the Document section. And finaly a section that explains the "Markup Regions" ? Enjoying that section very much because i have planned for a long time to move over to using Markup Regions, but with the information scatterd all over the forums and the old site it was hard to get a complete grasp on the inner workings. Now i think with the new Documents section its pretty crystal clear how it works. Thank You Ryan and everyone working hard on the new site. Looking forward to the release when its finished.
    2 points
  17. Agree with this. The logotype should stay top left on all pages at all times, it's a design pattern that users are used to and expect.
    2 points
  18. I tested it too, and the problem occurs when the paragraph is longer than the truncate length, causing there to be no closing </p> tag present in the truncated string. There is an option for the fixUnclosedTags() method used by truncate, to close instead of remove unclosed tags... * Fix/close unclosed tags: * ------------------------ * When the remove option is false, it will attempt to close unclosed tags rather than * remove them. It doesn't know exactly where they should be closed, so it appends the * close tags to the end of the string. ...but the truncate method calls fixUnclosedTags() with remove = true and doesn't provide a way to do otherwise. I guess you could use WireTextTools::fixUnclosedTags() before calling $sanitizer->truncate but it would be nice to have the option built into the truncate method. Maybe an oversight by Ryan? Edit: request opened here: https://github.com/processwire/processwire-requests/issues/253 @bibsch, because your truncate length is short and will only contain a single paragraph you can achieve your objective by adding <p> tags around your truncated text: echo '<p>' . $sanitizer->truncate($child->body, 200) . '</p>';
    2 points
  19. $wire->addHookBefore('InputfieldPage::processInputAddPages', function($event) { $field = $event->object; $page = $field->hasPage; if($field->name == "model"){ $brand = $page->brand; if($brand){ $dynamicParent = $page->brand; $field->set("parent_id", $dynamicParent->id); } } }); I think this should work! Let me know if it does ?
    2 points
  20. This week I’m glad to report the development progress on the new ProcessWire.com website is ready for preview and I’ve placed it in a subdirectory for testing. You can find it here: https://processwire.com/newsite/ Of course, this is just version 1 of the new site, but it’s now got quite a bit more updated content than the existing site, so I don’t want to wait much longer to replace the existing site. I’m still working out a few small details, but it should be 99% functional. I expect to replace the existing main site early next week. If you have a chance to test it out, please let me know how if you come across anything that isn’t working or any browser/platform specific issues. Thanks for taking a look and testing it out. I’ll have more details next week, along with a new core version on the dev branch with several updates currently in progress. Have a great weekend!
    1 point
  21. Little thing, but #content2 seems to be (at least partially) responsible for the unwanted horizontal scrollbar at widths below 1600px. Specifically, if margin-right: -40px; is commented out in .blog-posts, the unwanted scrollbar disappears, consistent with it being overwritten to 0 at the 1600px breakpoint.
    1 point
  22. Nope jQuery (the third party JavaScript library) isn't added by the module. Try to add this piece of code just after the footer then refresh your page : <script src="https://code.jquery.com/jquery-3.3.1.js" crossorigin="anonymous"></script>
    1 point
  23. Just a note about fonts. Maybe we should consider fonts with the Cyrillic glyphs support? In the longer term, there probably maybe some messages on the forum or even parts of documentation translation in Ukrainian or Russian languages. Without Cyrillic glyphs, this parts will fallback to another font and it will look not consistent with other parts.
    1 point
  24. Dude, no need to get jumpy, this is not through time stuffed and over-engineered software. This simply works and does the job without all the wrapped commercial bs. Why not evaluate it before you reply ? I wouldn't have posted if I didn't have satisfied clients with it.
    1 point
  25. Thanks @flydev - it's fixed in 4.16.13
    1 point
  26. On a fresh PW 3.0.123 setup with a new Tracy v4.16.12 install, it look like `ApiExplorerIncludeInheritedMethods` is not defined in the array of the getDefaultData() method and this notice popup :
    1 point
  27. Ummm - none of the menu items at the top of their site work ? The last update was in 2011 ? Are you actually serious ? Sorry if you are - maybe it is actually awesome ?
    1 point
  28. We use the search page mostly to check if a student attended the obligatory workshop to use a lasercutter. Every student page has a populated 'stu_programme' field. The search also finds other pages as well of course (tools, machines,....). I finally ended up with this: if($item->stu_programme) { $programme = "{$item->stu_programme->title}"; } else { $programme = ""; } @Zeka This helps of course, since not every student page has a populated 'workshops_list' field. So including both solutions passed all my tests for now, thanks!
    1 point
  29. Lol, you mac lovers still go merry go round with path finder - commander one - forklift > > > ?? MFilemanager is what I add up after I have done a new mac os installation for a client. Satisfied clients is the best feed back I can give you: http://www.moroshkaproject.ru/#
    1 point
  30. Hi again, look like you forgot to include jQuery ?
    1 point
  31. I've been using Forklift (https://binarynights.com/) since I switched to Mac in 2011. I haven't found anything better to take me away yet.
    1 point
  32. What you do is basically reverse-engineering the selectors uikit is building. When uikit updates you need to update. @bernhard goes the other way around, which is quite a bit more future-prove as configuration happens before uikit does it's thing.
    1 point
  33. Maybe I'm missing something, but styling via CSS would mean that you'd have to find ALL expressions relevant to your desired color change and list that in your CSS, wouldn't it? Whereas using the LESS theme you would only have to change one variable setting, as shown in my video.
    1 point
  34. Sorry if this seems naive, but wouldn't the easiest way to re-skin parts of the admin be to simply leave the compiled default files alone and use the Cascading part of CSS? $config->styles->add() in admin.php has been like magic for me and has made my experimentation with custom styling much easier. If desired, you could generate the css based on your desired backend variables, similar to CSS variables.
    1 point
  35. github clrux a11y-toolbar maybe? or this link: https://github.com/downzer0/a11y-toolbar
    1 point
  36. +1, forgot to mention this one. WCAG AAA requires that line length is never more than 80 characters, but depending on the source comfortable range can be around 80..100 characters, and sometimes as high as 120. Anything above that is way too long considering readability, and I'd recommend not going past the 100 character (or glyph) mark.
    1 point
  37. Thanks! got it partially working. Doesn't check the field value but the saved page value which isn't handy if you change brand field or the brand field is empty. But I think I can fix this ?
    1 point
  38. Lots of consideration going on here ? Hope @ryan will be patient enough with us all! ? I've made some visual arrangements of an inside page too: - Font in Montserrat from Google Fonts - Title of the page is smaller - Bodycopy is smaller on larger line-height - Paragraphs titles are uppercase - The incipit on the top of the middle column is a bit muted and smaller - Blockquotes stand out better with a slightly green background - Sites thumbnails are no longer visible (they look off to my eyes) - The main container is 1600px boxed
    1 point
  39. I've played a bit with the homepage, trying to adjust what is off IMHO. I've changed the font with Open Sans, improved padding and spacing, changed the main background color with the one we have right now in the header of the backend. Replaced the logo with the "old" one (I really love the color combination and fonts pairing). Moreover I've quickly swapped the iMac with a flat browser with a (really rough) image of the backend. Of course the double icons you see scattered here and there are not intended to exist (they appeared when I've saved the html, dunno why).
    1 point
  40. Hi, yes and it's very easy to implement (less than a minute really without styling) : https://modules.processwire.com/modules/ajax-search/ Others results : https://www.google.com/search?q=site:processwire.com/talk/ ajax search
    1 point
  41. Looking good Ryan. One thing I noticed is the last dropdown menu "Docs" should open the same direction/way as the "Download" menu item but it doesn't. It opens off screen causing horizontal scrollbars. When viewing on Chrome. Edit: it looks like jmartsch beat me to it. Please consider giving the light grey and other muted text more contrast for accessibility. See https://contrastrebellion.com/ for humor. #666 for body copy gives AA, but #565656 gives AAA for example. Chrome's inspector now includes a contrast accessibility checker when you click on the color swatch/square. The curved line represents what passes the AA or AAA rating. After reading the API examples, I want to know more about it. I think we need a link or outlined button below the examples "Get started with the API" or "Learn more" so they can continue reading. Now that I look at it more, maybe each homepage section needs it own call to action button below. At first it wasn't entirely obvious that the headers on the homepage were links. Ex. Blog posts - might need a button below that say's "View all" or something similar. Same for the Processwire Showcase and Shop. - This might actually motivate new users to join the forums as well. Those are just a few of the first things that come to mind when viewing the site. Hope that helps
    1 point
  42. One nitpick about the server in general. You can access it (the home page for example) without https. Ideally http should redirect to https.
    1 point
  43. New in version 0.1.2: show test method and assertion count for passed tests display breadcrumb above test file name (configurable)
    1 point
  44. There is this option on the Access tab of the restricted fields: The Dumps Recorder panel can be useful in such cases: https://adrianbj.github.io/TracyDebugger/#/debug-bar?id=dumps-recorder
    1 point
  45. I'm not sure about the cause of the problem but I know a good way to get closer to the solution: install Tracy Debugger and barDump the problem variables. bd($os->paymentAmount, '$os->paymentAmount'); My golden rule is: any time something isn't working the way you expect it to, or you don't understand how something is working, or you're just plain curious, then start dumping variables/properties/objects left, right and centre. Best way to advance your knowledge IMHO.
    1 point
  46. Merry xmas to everyone in here. We are a great community and I'm pretty sure we, as humans first, are great person/friends/sons/fathers somewhere in the world. A big hug to everyone of you.
    1 point
  47. Very nice tutorial, thx! I wonder if that would be nice to have as a module. Installable, reusable, one-click-updateable.... But maybe it would be easier to extend available libraries, such as https://doc.nette.org/en/2.4/html-elements
    1 point
  48. Just add: protected static $fM; at line #19 You'll also need to change line 94 from: self::$fM['type']($f, $fM['label'], $data[$f], $fM['desc']) to: self::{$fM['type']}($f, $fM['label'], $data[$f], $fM['desc'])
    1 point
  49. If you have a robots.txt, I would use it to specify what directories you want to exclude, not include. In a default ProcessWire installation, you do not need to have a robots.txt at all. It doesn't open up anything to crawlers that isn't public. You don't need to exclude your admin URL because the admin templates already have a robots meta tag telling them to go away. In fact, you usually wouldn't want to have your admin URL in a robots file because that would be revealing something about your site that you may not want people to know. The information in robots.txt IS public and accessible to all. So use a robots.txt only if you have specific things you need to exclude for one reason or another. And consider whether your security might benefit more from a robots <meta> tag in those places instead. As for telling crawlers what to include: just use a good link structure. So long as crawlers can traverse it, you are good. A sitemap.xml might help things along too in some cases, but it's not technically necessary. In most cases, I don't think it matters to the big picture. I don't use a sitemap.xml unless a client specifically asks for it. It's never made any difference one way or the other. Though others may have a different experience.
    1 point
×
×
  • Create New...