Pete Posted December 6, 2011 Share Posted December 6, 2011 I scroll just because I forget what can be done with the API and sometimes it's handy if you can't think of what a particular function might be called (prime example was me looking for $page->images-getRandom() when images is just an array like most other things and I found it by scrolling through). Link to comment Share on other sites More sharing options...
diogo Posted December 6, 2011 Share Posted December 6, 2011 I understand that, but since the content is scrollable, to me it feels more right to have the menu always there. Not very important though, the cheatsheet works great as it is Link to comment Share on other sites More sharing options...
Soma Posted December 8, 2011 Author Share Posted December 8, 2011 I just updated the sheet. - added fix to menu when scrolling - moved some entries to advanced mode - added toggle button on sections - minor changes Hope it still works well for you guys. Link to comment Share on other sites More sharing options...
diogo Posted December 8, 2011 Share Posted December 8, 2011 There are two things that are bothering me. I think the + button would work better next to the title of the block instead of the bottom, and the animations feel to slow, I would say they aren't even necessary... But this is getting greater and greater. Much better than a simple pdf for sure edit: I meant only the animations for the advanced items toggle. The animations on each individual items are ok Link to comment Share on other sites More sharing options...
ryan Posted December 13, 2011 Share Posted December 13, 2011 The speed of the animations seems alright here, but I think it's going to depend on what computer and browser one is using. I'm generally indifferent about animations too. They seem nice here, but I'm not experiencing a slowdown either. If they are slow for lots of people, maybe better to get rid of them or whatever Soma thinks is best. Animation or not, I just really like the functionality of being able to expand one section like this, as well as the "+" sign to do it. While I think visually it might fit nicely in the top and make closing easier, I also think it would be easier to miss at first glance. I like it at the end because it's very clear about what that "+" is for. If it were at the top of each section, people might think that it means "make sticky" or "open in new window" or something like that. Whereas at the end of the list, the placement context becomes part of the message – its hard to confuse it with anything other than "show more". But ultimately I love the functionality of it regardless of where it's placed. Link to comment Share on other sites More sharing options...
Soma Posted December 13, 2011 Author Share Posted December 13, 2011 Yeah, I'll make the animation of the advanced toggle faster, just simply forgot about it to make it as fast as the other slide animations. Thanks fro mention it diogo. I'm pretty much with ryan here, after all I think it does fit better on bottom of the list. Link to comment Share on other sites More sharing options...
diogo Posted December 13, 2011 Share Posted December 13, 2011 Makes sense from that point of view. The speed is better now Soma. Nice! Link to comment Share on other sites More sharing options...
Soma Posted December 17, 2011 Author Share Posted December 17, 2011 Made a little update as discussed in a thread about images. - added new section "Files" to the sheet - minor structuring of some advanced entries Link to comment Share on other sites More sharing options...
ryan Posted December 19, 2011 Share Posted December 19, 2011 Great update, thanks Soma! Link to comment Share on other sites More sharing options...
JeffS Posted May 30, 2012 Share Posted May 30, 2012 This was one of the resources that as soon as I looked at it, it kicked me from a looker to a doer with PW. Fantastic resource Soma. Thanks. I have worked with many CMS's and clarity (good clean documentation) is a very crucial aspect to get people involved and to stay with a project. I give 5 out of 5 stars to PW for this. I look forward to helping where I can. 3 Link to comment Share on other sites More sharing options...
Soma Posted May 31, 2012 Author Share Posted May 31, 2012 Hey Jeff, thanks for the nice words. I agree with you here. ProcessWire aim is to keep things simple and I enjoyed contributing to it with this nice little resource. Hope you enjoy your stay Link to comment Share on other sites More sharing options...
Soma Posted June 2, 2012 Author Share Posted June 2, 2012 Just wanted to mention that I added $input->urlSegments to the sheet. Along with some code cleanup. I also added the possibility to link and tigger the filter/search on the sheet. Examples: http://processwire.c...ter=urlsegments You can set the advanced mode with &advanced. http://processwire.c...gments It also supports hashes processwire.com/api/cheatsheet/#input 1 Link to comment Share on other sites More sharing options...
SiNNuT Posted June 19, 2012 Share Posted June 19, 2012 Hi Soma, maybe i'm overlooking something but $page->sort seems to be missing from the cheatsheet. This one maps to the integer sort value present in the pages table. Sometimes it can be useful. Link to comment Share on other sites More sharing options...
Soma Posted June 20, 2012 Author Share Posted June 20, 2012 Thanks sinnut for the report. It's not there because it's also not on API docs. But will gladly add it. I'm not sure why it's missing in the docs, is there any reason Ryan? Edit: well my guess is that is is not really reliable. Link to comment Share on other sites More sharing options...
DaveP Posted June 20, 2012 Share Posted June 20, 2012 I think I found a small error in the Cheatsheet. $session->login($name, $pass) returns a user, not just boolean true, so $user = $session->login($name, $pass); if($user) { // login successful if($user->hasRole('customer')){ $session->redirect("/customers/"); } elseif($user->hasRole('staff')){ $session->redirect("/staff/"); } } works, while this if($user = $session->login($name, $pass)) { // login successful if($user->hasRole('customer')){ ...snip... doesn't. Link to comment Share on other sites More sharing options...
Soma Posted June 20, 2012 Author Share Posted June 20, 2012 Thanks Dave for the report. Yes it returns the user. Well it's like this on http://processwire.c...iables/session/ that's from where the cheatsheet has its content originally. So it's wrong there already or Ryan changed it and forgot to change it in the docs. Anyway your code example both works... Not sure why it wouldn't work. If returned something else than null, false, 0 etc. it will be true even if it's a object... If conditions doesn't require to be "true" to work. if($loggeduser = $session->login($username, $pass)) { // if logged in succesful echo $loggeduser->name; } else { // failed } Link to comment Share on other sites More sharing options...
DaveP Posted June 21, 2012 Share Posted June 21, 2012 The trouble was, the second example produced a 'Property of a non-object' type error at the line if($user->hasRole('customer')){ so, in my case at least, the $user object wasn't being fully set for some reason. It was only when I explicitly set $user (as in the first example) that it worked. Don't know why, can't imagine it's to do with server config or anything. Link to comment Share on other sites More sharing options...
Soma Posted June 21, 2012 Author Share Posted June 21, 2012 Your 2 examples are the same, so I don't understand what's going on on your side. BTW I recommend not using "$user" variable as it is a template variable which holds the current user so you overwrite it, but it should work anyway. Link to comment Share on other sites More sharing options...
Soma Posted July 10, 2012 Author Share Posted July 10, 2012 I've been working for some time on an updated version to functionality of the cheatsheet and have commited it now. All code and functionality, no content changes. removed table layout and added the excellent Masonry/Istope js for block layout and filtering added setting for column count so you can change it to your best fit in the toolbar improved live search, especially in Firefox (which wasn't really working before) now sections not containing any filter results will be hidden (not get in the way anymore) These changes also will help adding more content to the sheet. Preparing to launch the rocket! Enjoy. 3 Link to comment Share on other sites More sharing options...
Pete Posted July 10, 2012 Share Posted July 10, 2012 Nice updates, my only thoughts are when opening some elements it switches some blocks to different columns - I guess this is simply to keep the column lengths more or less the same length? Is there any way to turn that off as I'm not sure the animation/reordering is necessary and could be a bit confusing even if you use the cheatsheet so much you know things are supposed to be in a certain column. Certainly not a big/important issue Link to comment Share on other sites More sharing options...
Soma Posted July 10, 2012 Author Share Posted July 10, 2012 Thanks for the feedback. Yes I know, but I don't know a way to turn it off because it's doing what it's supposed to Well it doesn't happen often, so I can live with it. One way to get around it would be to make the description hover. I tried something but there's some issues with indexes and would complicate things or would have to add another tooltip like functionality. But got so used to the toggle slide and like it so far. Link to comment Share on other sites More sharing options...
slkwrm Posted July 10, 2012 Share Posted July 10, 2012 Don't know why, but the new version looks really wierd and behaves glitchy in Firefox 13.0.1 for me. Works great in Chrome though. Can anybody else see this things or I see things? Link to comment Share on other sites More sharing options...
Pete Posted July 11, 2012 Share Posted July 11, 2012 I had to refresh it once or twice to load the new styles. Link to comment Share on other sites More sharing options...
Soma Posted July 11, 2012 Author Share Posted July 11, 2012 Don't know why, but the new version looks really wierd and behaves glitchy in Firefox 13.0.1 for me. Works great in Chrome though. Can anybody else see this things or I see things? Have you deleted cache and maybe cookies? Looks and works fine here. What OS? Link to comment Share on other sites More sharing options...
slkwrm Posted July 11, 2012 Share Posted July 11, 2012 Yep. It was cache. I thought I had it disabled. Great work, Soma! This became an indispensable tool for me! Thank you! +1 to ditch animation in favour of speed and simplicity Or maybe make it quiker and more subtle. What do you think, guys? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now