Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/06/2018 in all areas

  1. Yes. Yes it is tbh, in reality some people actually do not realize at first glance where they can jump to another section easily (no matter what screen size or device). I'm working at a company that has its strong roots in UX. We have our own lab and do usability-tests on a regular basis, since 18 years. We usually work with Axure prototypes. This way, we can find out early in the whole project stage if a certain concept or design works or doesn't. And from what I've heard, the hamburger menu indeed was not being recognized and has been often overlooked in that time-frame the first article in this thread was written. But as always in our industry (or life): it's "live and learn"... btw: I came across a nice tutorial how to build a top/tab/main-menu which uses the "more" approach, as screen size gets more narrow. I like this approach a lot. https://css-tricks.com/container-adapting-tabs-with-more-button/
    3 points
  2. Thanks for your feedback @AndZyk. Well, what do you know - I'll be attending a full-day Google Analytics workshop @ Google Zurich end of May. I'm going to ask Google staff if they know more about structured data (though chances are, they will be giving me the usual runaround... "that's another department, ask there"). I also actually gave feedback on those two doc pages, but who knows who will read this - and if they're going to bother editing / clarifying the docs.
    2 points
  3. This week's version of ProcessWire on the dev branch continues resolution of GitHub issue reports, and it also adds a new text truncation function to our $sanitizer API, something requested from our requests repository: https://processwire.com/blog/posts/processwire-3.0.101-core-updates/ We didn't have a blog post for last week's version 3.0.100—see the core updates section in ProcessWire Weekly #207 for more details on that version.
    2 points
  4. That's a good point, and maybe we'll change that before this gets off the dev branch. I left it false by default because it means a little more work for the function to perform. With defaults, I try and find a balance between the most likely to be used settings, with those that perform with the lowest overhead. There's also the matter of the "visible" option being more useful when the "keepTags" or "keepFormatTags" options are in use, where it can make a big difference. Though even without those options in use, there could still be entities counted as more than 1 character, so perhaps visible as true by default might be better.
    2 points
  5. // $f is the Field object of your options field $f->type->manager->getOptions($f);
    2 points
  6. Wow, that truncate function will truncate my search for the ultimate truncate function! ? I wonder if the default for the "visible" option should be true rather than false. If my string included entities and markup tags I think in nearly all cases I wouldn't want those invisible items affecting the visible string length.
    2 points
  7. There is a typo in your post @ryan. You write: The correct sentence should be: But okay... I'm fine with your sentence, too.
    2 points
  8. Thanks Ryan - this truncate method looks awesome - way to over-deliver
    2 points
  9. I thought I'd start this topic because I seem to be recommending certain courses to people repeatedly, so why not share it with the PW community. The topic can be a review or overview of any IT or non IT-related courses you're doing or have done. I'll start off with a course on teaching you how to learn. https://www.coursera.org/learn/learning-how-to-learn I'm halfway through this course and I can already see huge improvements in the way I'm learning and also my approach to learning. I wished I've taken this course when I was a student! The course can be taken free, and all it takes is a couple of hours of your time. If you have kids that are in school, I think this should be compulsory viewing for all children in academia. If you're into self-improvement or learning, then I can't recommend this course highly enough.
    1 point
  10. Seems I needed this at the same time as other ProcessWire devs. Timely! This module is simply a ProcessWire module wrapper for the PayWhirl API and being the initial release, may have a few unforeseen hiccoughs. Please be gentle with me when reporting any problems. As with all API's make certain your ducks are all lined up with the vendor first, in this case PayWhirl -https://app.paywhirl.com/ Download the module from GitHub at https://github.com/clipmagic/PayWhirlAPI Download the module from ProcessWire modules at http://modules.processwire.com/modules/pay-whirl-api/
    1 point
  11. I'm making progress! Current state is really, really nice. See these two examples of a feedback software that I've built for a client: full multi-language-support all kinds of custom cell stylings (backgrounds, icons, etc) custom filters filter by doubleclick on a cell (really handy) custom buttons-plugin (not part of aggrid): reload data via ajax (very performant thanks to RockFinder) reset filters fullscreen mode (really handy for large grids) excel export as CSV data reload grid automatically when a pw-panel is closed Another example: A list of all ratings for several categories See the bottom line: this is another plugin that is not part of aggrid. You can just show the sum of the column (like the second column) or render custom statistics (like min, max, avg). When you select multiple lines you also get the statistics only for the selected rows This is also an example how you can use pinned rows with aggrid (really awesome library!). Example of a range filter (aggrid standard feature):
    1 point
  12. I don't use PayWhirl but am writing a PW module to wrap an external API so reading the code is very helpful, thanks!
    1 point
  13. BTW, Priority Nav will be part of UIkit 3: https://yootheme.com/blog/2018/01/11/uikit-3-beta-36-released "We are now on the homestretch for the final UIkit 3 Stable release. Masonry Grid and Priority Nav are next, which will complete UIkit 3."
    1 point
  14. Hello @MarcoPLY, I am glad this post helped you. JSON-LD is the recommended format for structured data. JSON-LD is JSON for Linked Data. Adding structured data with JSON-LD inside <body> is still valid, but usually it is placed inside <head> for better separation. Most of search engine specific code goes inside <head>. You could try the jsonld.js preprocessor, but I think it would be easier just to use PHP, since that is the easiest way to get data from ProcessWire. As far as I know is Google Tag Manager a different tool. Google Tag Manager is great for example online shops, where you want to track the customer experience. It seems to be an analytics tool for internal analytics, but has probably no effect on search results. But I have never used Google tag manager, just watched a few videos, so I could be wrong. Hello @dragan, Breadrcumbs has worked for me, although it is not very useful on websites with only one parent-page. ? Searchbox, Organization and Article hasn't worked for me. ? I don't think they will neglect structured data, but the support seems to be lacking. On Google I/O 2017 for example they announced upgrades to the Structured Data Testing Tool, but the upgrade doesn't seem to be available yet. In my opinion I am not that convinced of structured data compared to the time I have wrote this post. The extra effort is not that time consuming, but the results are a little bit disappointing. So I can totally understand if you don't want to bother with it. ? Regards, Andreas
    1 point
  15. My 2 cents on Udemy. You need to be selective/careful on Udemy. They seem to have a more lenient criteria on who can upload a course, and the quality of the courses can wildly vary as a result. I've seen some really good courses as well as some (god) awful ones. My advice is to have a look at the average ratings of the course, compare the score against other courses in the same domain, and also read the user reviews (both good/bad) and make a decision.
    1 point
  16. Great, thanks. Enjoy your holiday!
    1 point
  17. Hey Robin - thanks for thoughts - makes sense. I am heading on vacation this morning for a couple of weeks, but I'll add this to my list for when I'm back.
    1 point
  18. In v1.9.3 I switched to the $datetime api var in pagelist markup and introduced %modifiedUser% and %createdUser% tokens. As a result it is possible to display relative date like this: I never thought about this but it came from a request and seems like a nice addition. In fact I only knew that a relative date function exists in PW but not that it's also an api var. I was even happier when I learned that I need only slightly change the code to support both relative and the existing date formats with $datetime->date(). Full changelog: pagelist markup: switch to $datetime api var (allows relative datetime strings too) pagelist markup: add %createdUser% and %modifiedUser% tokens pagelistUnselect: fix Uikit theme spacing issue (reported by Robin S) CKEditor plugin Link Files Menu: apply fix from Robin S from his original module (ajax response not working for non-superusers)
    1 point
  19. maybe you are using an old php version that does not support short array syntax [ ] ?
    1 point
  20. crosslinking the solution that worked on my problem:
    1 point
  21. The purpose of the hooks callback is not to pass the $event object forward, but rather to handle everything related to it. It should unpack all the data you need from the $event, call any external functions it needs to call by using that retrieved data (not the $event itself) and use the returned values to put them back into $event if needed. With the exception of this hook callback it's very unlikely any code would need to know about $event and if it's triggered by a hook or not.
    1 point
  22. If you're using https://github.com/heiseonline/shariff you should be on the safe side (this plugin exists since 4 years now)
    1 point
  23. It just happens to be that the first argument to the function hooked in that part of the documentation is a page object. So it's always about the functions arguments. There are a few things wrong with passing around the hook event object: The hook event object is used only in combination with a hook. So every code touching that object automatically binds itself to a usage only through a hook, which is a unneccesary coupling. This violates the open/closed principle (O if SOLID), because if anything related to hooks does change you need to modify each method receiving the hook event and not only the one method, which is triggered by the hook. On the other hand if any of your business logic does change you should not need to modify code, which is only there to make sure your hook is handled. When you're not complying to the above it's also way easier to get lost in where things do actually change in regards to handling a hook. You wouldn't want to be in a situation, where you know a hook does cause issues, but you cannot find the place where that hook is manipulated incorrectly, because the objects is passed around in so many places. Metaprogramming (hooks are kind of that) is manipulating code at runtime, which is a responsibility to keep up to. This is best done by keeping the surface of code actually manipulating other code as small as possible. On the other hand if your hook callback function is only dealing with "making the hook work" and passing all other responsibility of to other functions – just passing data gathered from the $event object, but not the event itself – you automatically have functions, which you can easily use from places other than that hook as well. Say you later notice that you need to use that tierprice() method from another hook with different arguments or in some other part of your business logic, which is not triggered by a hook at all. You wouldn't want to duplicate the function, just to be able to use it from different places. You also don't want to fabricate a fake $event object just to call it. [SOLID Principles] https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)
    1 point
  24. Hi @adrian, I have a request for an enhancement to this module. I think it would be useful if the options form for an action was validated before executeAction() fires. So the required/requiredIf conditions are evaluated and executeAction() only fires if the form submission is successful. At the moment executeAction() fires even when the required/requiredIf conditions are not met, which means you have to do extra validation inside executeAction() and that can get quite tricky with some requiredIf setups. What do you think?
    1 point
  25. More information and confusion: https://gdprchecklist.io/ https://tollwerk.github.io/data-processing-agreements/ via https://wdrl.info/ (you should subscribe - much more than GDPR stuff)
    1 point
  26. I love this idea. My 2 cents on this: https://www.udemy.com/ - always offers several courses for free (or super discounted) from all kinds of topics. (No affiliate link!) ? YouTube is another great option for courses and knowledge. Just a few examples from my subscription list: Code Course*: https://www.youtube.com/channel/UCpOIUW62tnJTtpWFABxWZ8g Dansky*: https://www.youtube.com/channel/UCAbq1eKey19tt-FfaIO1RMA DevTips**: https://www.youtube.com/channel/UCyIe-61Y8C4_o-zZCtO4ETQ FunFunFunction*: https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q Layout Land*: https://www.youtube.com/channel/UC7TizprGknbDalbHplROtag Travery Media: https://www.youtube.com/channel/UC29ju8bIPH5as8OGnQzwJyA Wes Bos: https://www.youtube.com/channel/UCoebwHSTvwalADTJhps0emA Free Code Camp: https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ Pick your topic. Watch the videos. My favourites highlighted with an *. Super awesome channels marked with an **.
    1 point
  27. Never needed that but... almost every error goes straight to /youradminsite/setup/logs/ - you could look there, too Tracy Debugger makes lifes easier sometimes (confusing at first but worth that confusion) Those are my favourite/one-and-only ways to handle debug and error messages.
    1 point
  28. https://mapsplatform.googleblog.com/2018/05/introducing-google-maps-platform.html These are just excerpts from the above link (highlighting by me). This is annoying. Does that really mean, that I have to create an account for every single site I've ever built and used Google Maps, and give Google my credit card details? Forreal? Or - even worse: pester my clients and tell them to create an account for themselves and use their CC? This is terrible business logic, Google.
    1 point
  29. As written on the page I linked in my first post: Just drop @ryan a short message and he will help you.
    1 point
  30. First: You know what $event->object is because it is an object of the very class you're hooking onto. In the linked docs, the hook is on Pages::saved, so the event object is an instance of Pages (not a PageArray). In your code, you're hooking Page::price, so $event->object is a Page object. If your hook was InputfieldText::firstWord, it would be an InputfieldText instance. Second: I'd avoid passing $event around to other methods. It kills readability so $event should only be used in the hooks themselves, not in further methods or functions. Yes, you can manipulate arguments. The syntax is in the docs section you linked, in your case it would be $event->arguments(2, $unitprice). But that is mostly meant for before hooks where you want to change the behavior of the original, hooked method. It would be better though to pass all necessary arguments to tierprice and addVat one by one instead of manipulating the "magic thing" that is $event, i.e. something like: $unitprice = $this->tierprice($page, $quantity); Best practice to keep code readable is to use a pattern with a public hook method that decorates your hooked class and a couple of private methods which do the work. <?php /* The usual module stuff... */ public function init() { $this->addHook("Page::price", $this, "hookPrice"); } public function hookPrice(HookEvent $event) { $page = $event->object; $quantity = $event->arguments(0); $vat = $event->arguments(1) ?? false; $unitprice = $this->tierprice($page, $quantity); if($vat) $unitprice = $this->addVat($unitprice); $event->return = true; } private function tierprice($page, $quantity) { /* do whatever calculations and return the result */ } /* ... */
    1 point
  31. Yeah, since then lots of people have gotten used to it. However: We have an in-house UX rule: Never display an icon without text. So yeah, it can't hurt to put "MENU" below the burger.
    1 point
  32. Yeah, it's just that... non-techy persons are scared when you even mention tech lingo like "API key". They expect that we as developers handle all this stuff and don't bother them with it. I'm off to go reading some leaflet.js and Mapbox tutorials...
    1 point
  33. The last time someone said "The hamburger menu doesn’t work" we tested onpage CTR and... almost no difference at all. It's by far not the best solution but people know it for a long time now. They see it regularly and can handle it. The article was first written in 2015 (according to the WP image path) and therefore things have changed since then. Remember all the "people don't read online!" or "people don't scoll!" statements.
    1 point
  34. I don't really agree with the article. Perhaps that was true back then but nowadays people are used to it (or perhaps I'm too much of a designer :)). According to that logic the eg. the search icon (magnifying glass) could be on a ban list.
    1 point
  35. At first I was kind of p*ssed because of that change but then after looking into my app console and API-key-collection I changed my mind. There are lots of API-keys I generated in the past for clients who now moved to agencies or did in-house development but still with my API-keys in their sites. I took the chance and let them know that I will delete/revoke the API-keys and that they have to create them on their own now. While GDPR/DSGVO on the rise we (as developers) have to and should let clients do more of this stuff. Creating accounts, creating API-keys, doing this and doing that... nope. I (personally) might assist clients but I will not create accounts or keys until the client clicked the the "Yes, I accept all your (Google, Twitter, Facebook) terms" for clients anymore.
    1 point
  36. Hi Guys, First thank you for sharing your knowledge! These post help me a lot! I have also created a separate php file, but I have a doubt because from manuals should be inserted in the <head> and I have just include the php file inside it. But if I think well it in the web inspector I have never seen any code referring to the Structured Data like <script type="application/ld+json">. Why this? OK, maybe I may not have seen enough sites, but I can not find even on well-known sites. Could be a great if I use a js file and adding this? or I see many site have only the google tag manager link. Do you think the google tool are better and is enough?
    1 point
  37. Hi @Noel Boss, In your case, if the module extends (not in a PHP technical sense) $page, then it will have to be an autoload module. Your module adds methods to the Page and WireArray classes. Hence, if it is not an autoload module, I don't see how it will work just by doing this: $json = $pages->find('template=skyscraper')->pageQueryJson(['title']); You will definitely get a PHP error about Method PageArray::pageQueryJson does not exist etc. Maybe I'm missing something. Did it work for you with the new changes? Sorry if I am taking your round in circles ?.
    1 point
  38. @Noel Boss, Looks great, thanks! I've just had a quick look. Any reason why the module is autoload?
    1 point
  39. Hi. I have a problem with the "link field" and PW 3.0.96 . When I try to select a page (page tree) the "Choose" button disappears. Unfortunately it is no longer possible to make a selection. Does anyone have the same problem or a quick solution for it? I think the error is not the module, but the file "ProcessPageList.js" Thanks, Robert
    1 point
  40. Strange behavior in page select field: select links disappear immediately on hover. Please help to fix!
    1 point
×
×
  • Create New...