Jump to content

Leaderboard

Popular Content

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

  1. Sneak preview of draggable column splitter when using AOS admin columns:
    5 points
  2. The world is a vampire. (and an earworm for all you smashing pumpkins lovers/haters. You are welcome).
    3 points
  3. I don't want to convert this topic to codekit or not question. With npm + gulp + bower its easier than codekit on my side. I have a skeleton gulpfile.js `gulp dev` and `gulp production` or `gulp watch` command is enough for compile files and run prepared tasks. Here is an example of gulp file : https://github.com/gulpjs/gulp#sample-gulpfilejs prepare your source and destination folder and run tasks. My development folder structure : Destination point is : site/templates/dist Anyway, every developer has different work structure. This is mine
    3 points
  4. It worked with me, it's stuck in my head now, damn you!
    2 points
  5. If I look at the code on Skyscraper Demo http://demo.processwire.com I see: <button type="submit" id="search_submit" class="uk-button uk-button-primary" name="submit" value="1"><i class="uk-icon-search"></i> Search</button>
    2 points
  6. It is also easy to use Bower with CodeKit, but I still prefer to use it with the command line. For a while now, I skip every folder in CodeKit I don't work in: assets modules vendor wire For example if I had upgraded TracyDebugger with the Upgrade module, CodeKit always wanted to compile scripts and styles. Also pausing CodeKit (CTRL + ALT + CMD) is helpful before making big changes to the files.
    2 points
  7. Hey, The Form API has CSRF protection build in, but if you for some reason don't want to use the API you can however use the CSRF protection. Its very simple but it took some time for me to find out, so i figured i share my findings with the rest. What is CSRF? First you need to create a token and a token name you do that as following: $tokenName = $this->session->CSRF->getTokenName(); $tokenValue = $this->session->CSRF->getTokenValue(); Very simple. Now what you want to do is create a hidden input field like this: $html .= '<input type="hidden" id="_post_token" name="' . $tokenName . '" value="' . $tokenValue . '"/>'; Now this will generate something that will look like this: You are done on the form side. You can now go to the part where you are receiving the post. Then use: $session->CSRF->validate(); This will return true (1) on a valid request and an exception on a bad request. You can test this out to open up your Firebug/Chrome debug console and change the value of the textbox to something else. Basicly what this does is set a session variable with a name (getTokenName) and gives it a hashed value. If a request has a token in it it has to have the same value or it is not send from the correct form. Well I hope I helped someone.
    1 point
  8. Last week’s post indicated we may have the first [beta] version of the Uikit admin theme ready, and I’m glad to report that we’ve now got it ready for download on GitHub. In this post, we’ll describe what’s new, how to install it, and how to develop with it. https://processwire.com/blog/posts/processwire-3.0.54-and-adminthemeuikit/
    1 point
  9. I finally re-launched Notanotherdotcom - my business website. Things were looking a little dated for a few years, but finding some spare time to give it an overhaul was difficult (I'm sure that resonates with a lot of people here). There's still more content to go on. I'm working through some more recent projects to put on the portfolio but I want to do a bit of a write-up for each one rather than just keep putting up isolated screenshots without much description of what work actually went into each project. It also has a blog where ProcessWire will definitely get a mention. I started writing the second article yesterday, titled "A Better CMS", but when I finally settled on my 3 main reasons for using ProcessWire it quickly began turning into 3 separate blog posts, so keep an eye out for those.
    1 point
  10. Looks and works great now - thanks!
    1 point
  11. Ok, all shoud be fine in v139. One thing that I removed is the drag handler icon. I couldn't find a way to show it nicely so now the only thing that indicates the splitter is the mouse cursor. There was an issue with the splitter's height too. Now it's set by JS because I didn't want to go flex and risk breaking other things. From the docs:
    1 point
  12. Yes, that's an issue that needs some thinking. Do you think globally disabling to remember position would be enough? Also now all splitters share the same splitter setting which is probably not suitable for everyone. I guess I can fix this easily though. Another idea borrowed from file managers to use double click on the splitter to restore the default position. So you can drag it freely and it would be remembered but you could restore defaults when needed.
    1 point
  13. Yep, sorry for that, should be fixed in v138.
    1 point
  14. I would be interested in this service.
    1 point
  15. Very interesting, that CSS-Grid stuff. I'm thrilled. Here is a short list of usefull links: (must read) http://jensimmons.com/post/feb-27-2017/learn-css-grid http://gridbyexample.com/examples/ (some specs and technical info) http://gridbyexample.com/browsers/ https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_and_Progressive_Enhancement https://drafts.csswg.org/css-grid/#grid-containers (some more) https://css-tricks.com/css-grid-one-layout-multiple-ways/ PS: you also can support older browsers with different fallbacks, there are tuts over that too.
    1 point
  16. You only sanitize the user input. So anything coming in via GET/POST/… data. Anything else comes from your system and your system should never have data in it, which aren't "save", so no need to sanitize anything there. It's not only about plainly changing the number to another one. People try to inject all manner of things into websites, like sql statements or else. So it's for security as well as for preventing errors in your system because of values you didn't expect.
    1 point
  17. Was this from scratch or did you start with Regular and add your own UIKit3 theme? Beautiful site.
    1 point
  18. * translations updated to ProcessWire 3.0.55-dev-286
    1 point
  19. array_keys() will just revert your array back to the form of just the sq ft "[500, 1000, …]" so no need to change that one. Just make sure you have all the possible keys of your form inputs accessable when sanitizing. It doesn't matter where those keys come from or how the arrays are created. It's just a shortcut. Both versions below do the same. $minArea = $input->get->options("minArea", $allowed); $minArea = $sanitizer->options($input->get->minArea, $allowed); Edit: Also there's no magic whitelist anywhere. This is all plain php and using arrays.
    1 point
  20. * updated : PhpMailer 5.2.23
    1 point
  21. I think you should use $sanitizer->selectorValue($value) as you use values in selector.
    1 point
  22. Hi @tpr I have found one small issue with CKEditor plugins, didn't find any mentioning in this threed, but maybe you are alreade aware about it. If field is just in a page all additional plugins are loaded and initilated, but if field is inside of matrix/repeater field with ajax loading. After opening of collapsed item CKEditor in it is initializing just with plugins set in field settings.
    1 point
  23. https://github.com/processwire/processwire-issues/issues/191 Yes, it use large amount of RAM and it's slooooow. I tried on windows, 5 MB jpg, peak memory usage was around 4 GB, CPU usage was 25% and it took 10-15 minutes (not seconds) to finish, src 6.020.543 bytes, dst 4.343.674 bytes.
    1 point
  24. Had this written before Macrura's post so I'll leave it here. $x = 0; foreach($recipes as $recipe){ $class = "class"; $imageSrc = $recipe->image->first()->size(200,200)->url; if($x == 1){ $class = "otherClass"; $imageSrc = $recipe->image->first()->size(500,200)->url; } echo "<div class='{$class}'><img src='{$imageSrc}'></div>"; $x++; } You can also use css :nth-child pseudo class
    1 point
  25. Two new macros in v038: minify and editlink. Minify is an easy way to remove unnecessary whitespace and optionally to try some additional tweaks too. It's nowhere to ProCache or AIOM but can help reducing markup size. I could tweak things on one site to achieve 100% HTML minification according to gtmetrix but that required extra work on the markup so this macro alone won't help you on this As a bonus the macro can be used to remove whitespace between list items (<li>'s) which sometimes can cause headaches. Editlink is another helper that can substitute bigger modules like FEEL, Fredi or the built-in frontend editor. There's nothing special in it, just outputs edit links to edit the page in the admin. First I was about to modify FEEL but I realized this would be more fun
    1 point
  26. "Everything has to be a thing, even if you don't use it as a thing"
    1 point
  27. The person who marked this as CON did not understand Processwire... And they left out the same in the case of WordPress: "Everything has to be a 'custom post' even if you don't use it as a post". Same for Drupal: "Everything has to be a 'node' even if you don't use it as a node" This is just the chosen terminology, so the person who made it up does not understand too much
    1 point
  28. @Doc - the other option in Tracy is the ability to edit the page's template directly - you don't even need to post a different version: https://processwire.com/blog/posts/introducing-tracy-debugger/#template-editor-panel Just edit through the Tracy interface and click "Test". That will reload the page with the changes you have made without affecting how it looks/works for other users. Whether I use this or the Template Path Panel that tpr mentioned depends on the complexity of the changes I am making. The Template Path Panel option allows you to swap between various versions similarly to diogo's code, but through the Tracy debug bar GUI.
    1 point
  29. Depends on the strategy that you are using , but you can do this on the top of your home template: if($user == $users->get("you")) { include("alternative_home_file.php"); return; }
    1 point
  30. Thank you @teppo! I knew I can count on you!
    1 point
  31. I feel like 580px for the sidebar is far too big, and that's the minimum. I feel like 380px would be far more comfortable. The view without the sidebars doesn't have the page breadcrumbs anymore.
    1 point
  32. Hey, @Tom.! It might sound weird, but the use of the word bad in this context actually means good. Like in Michael Jackson's "Bad". Sometimes the meaning is lost in tanslation) Forgive me for confusing you.
    1 point
  33. Maybe I didn't get it but I think Ivan means 'bad' as in 'awesome!' .
    1 point
  34. Looks bad! Even with no styling, it is now much more functional!
    1 point
  35. It depends. I'm actually regretting going that path for an application of mine, because it pushes so many if/else conditionals in your controllers/view layer, which could otherwise be handled by a single user class as part of the application domain. But it really depends on how separated your user types are in the application. Edit: Also different user templates don't allow users to be of multiple of those user types.
    1 point
  36. THX man, a worldfamous chocolate cake from vienna for you! Hero Member! Simple Contact Form - i do it tommorw, not so cool as the old version…
    1 point
  37. SSL everywhere. Google is pushing HTTPS sites up in their results now. should we all be using HTTPS? and are you now and how?! also this was a great wake up call for me: http://shoptalkshow.com/episodes/250-web-security-april-king-alex-sexton/ For me I'm using Digitalocean and Serverpilot and it was a matter of enabling the Let's encrypt script so supppppppper easy (full disclosure, those two links have affliates)
    1 point
×
×
  • Create New...