-
Posts
4,632 -
Joined
-
Last visited
-
Days Won
55
Everything posted by apeisa
-
Exactly the implementation I was looking for! Feels very fast for quick edits (you can test it by logging in to locomotive demo site, and there top right corner -> view website). Not sure how much convenient it is in real life than default adminbar edit (so is it worth to have two different methods for quick editing the content). That really makes a good demo/sales effect though I will probably switch the bar to the top.
-
Ok, I have been doing site building and some content management lately (+ building data import module), so no new progress with AdminBar in long time. But I have some user feedback from this topic, clients and from myself after using this in real situation. I am not happy with current ui. It goes over the page and I don't think that showing/hiding it is good solution, neither is the current "hide" button. Also like I talked before, I need to consider functionality again (at least sitemap is not needed). No one uses "toggle" or "advanced view" so there should be only one view. I don't like how current modal waste space. So there is lot's of little details that just doesn't seem right. I tried to mockup how this thing should work, and I am pretty happy with the results. I dropped the adminbar to the bottom. This gives it a lot more space and more conventional shape (horizontal). Also top of the sites are often graphically busy (logos, headers etc) so top is also nice in this regard. The other "big change" is that modal is no longer modal. It will be content area that slides from bottom to almost top of the page. So the underlying page is visible, but we are not wasting any space on sides and just a little bit from top. And one thing I would like to try is optional quick edit. So in templates you could say for some areas that they are quick editable. Maybe something like this: <h1 class="quickedit"><?php echo $page->title; ?></h1> This allows quick edit functionality. Button for this shows only when there is something that is quick editable. This is something that I am thinking of, not something I will build for sure, so please tell me what you think? I attached current mockups, but need to say few words about these: I'm not sure about the icons (probably will settle with something more simple and single color). Also I probably will remove or change location of logout. Link to admin will be used a lot, so it needs to be easy click and without possibility to miss and hit logout accidentally. And if someone wants to help me with UI graphics (adam, almonk, anyone) you are more than welcome.
-
No worries - all the better when questions are asked.
-
Does it open pages automatically or are you thinking about access management? Giving roles and permissions is one thing, but you need to manage access at the template level. So setup, templates and access tab on home template is probably what you are looking for. You can also always look any page to see who can do what on that page: edit page and settings (if I remember right, I'm on my mobile now).
-
I tried stackoverflow on this one, and it took 2 minutes to get a working solution. Gotta love that site (and people contributing). function map_property($obj, $array) { $ret = $obj; foreach($array as $prop) { $ret = $ret->$prop; } return $ret; } foreach(map_property($data, array('feed', 'entry')) as $item) { }
-
I played little bit more with this, but now I need some help. I have still few bits missing, but the most important thing is giving me a problems now. This is now pure php, so no processwire knowledge needed to help me on this (I could ask help from many other sources, but I start from here). I have array where I keep my "data_root". This tells me where is the "start" or "root" array in my source data (the array which I want to loop and take values from). If you take a look at twitter data (http://search.twitter.com/search.json?q=php) you will see that this "root" is "results". So I would loop this data like this: <?php foreach($dataFromTwitter->results as $item) { $out .= $item->text; // This would have actual tweet text } So my data_root array keeps in this example just one value: ['results']. Sometimes we loop right from the root (http://keikalle.com/api/city/helsinki) and sometimes the "results" are deeper (http://gdata.youtube.com/feeds/api/standardfeeds/most_popular?v=2&alt=json, where it is feed -> entry). Ok, this has been probably very badly written question so far, so I try to keep it simple now: How I can turn this: <?php Array ( [0] => feed [1] => entry ) into this: <?php foreach ($data->feed->entry as $item) { // } So that I could loop it. Any help appreciated (like is there some function to map these or am I all lost ). This is probably something super simple, but I couldn't get my mind working on this..
-
That is true. There is also admin nav showing, which is not relevant also. But I think that what Adam proposed is something that is a) probably very simple to implement (there is already clean login view where there is not these probems) b) is also conventional - many apps do it this way and c) seeing login screen is strong message that you are really logged out.
-
Thanks Almonk and sorry for late reply. I have never liked too much how pagelist looks. It just doesn't feel like something you can drag & drop. I understand the reasoning for the minimal design there, since most of the sites Ryan builds (tripsite, pw demo, villa rentals etc) have huge amount of pages and are more or less catalog-type of sites. I spend an hour with css to see what I could came up for this theme, and I think it looks pretty nice: http://screencast.com/t/wUx8x5ZfhhzV PS: It is much easier to drag and drop pages when the page element is bigger.
-
@Ryan & Senior Members, Recommended Reading?
apeisa replied to Crash-n-Burn's topic in Getting Started
This is actually funny: frontpage mentions jQuery 4 times, but php 0 times. We are currently re-thinking the website and it's content, so we will definitely make it better and more obvious. -
@Ryan & Senior Members, Recommended Reading?
apeisa replied to Crash-n-Burn's topic in Getting Started
Hi Crash and welcome to the forums! To make things clear: ProcessWire is php-based software, you do not need javascript knowledge to build sites/applications with it (ok, PW uses jQuery on its admin, but stuff you build won't require jQuery or javasript) jQuery talk in frontpage tries to say that ProcessWire will do the same for site building with php that jQuery made to writing javascript: make it easy and fun. Also the PW api mimics jQuery API whenever it is possible and reasonable. So if you already know jQuery, you will probably grasp PW more easily. (Javascript basics are common need in web development, so knowing those (after solid html/css) won't hurt at all) About the books.. I have few recommendations on those topics: PHP: I would probably go with something very basic book with php. What got me started few years ago was first or second edition of this book: http://www.sitepoint.com/books/phpmysql4/ It is entry level book and very easy to follow. Although most of the topics it teaches are something that PW will give you granted (contennt management, database use, clean urls etc), it will teach you the basics that won't hurt. After that.. well I am open to suggestions also Javascript: If you are not sure about your CSS skills, please go train that before diving into javascript. If you code frontend javascript with lots of dom manipulation, you really need to know css well. It is vital part of that. I would probably go with some jQuery basics and after that dive into javascript. Reason is, that I remember that learning javascript was difficult and boring, but when I first tried jQuery, I got bling bling right away: it is easy, fun and rewarding. After getting grasp of jQuery you probably want to learn javascript more (I'm on this path now, still on basics with javascript.. ). And actual books: I would start with this: http://www.sitepoint.com/books/jquery1/ (I haven't read, but as entry level books I really like Sitepoint) and after learning the basics I would go with this: http://jqueryenlightenment.com/ CSS The books I have read were written so long time ago, that I don't even remember titles. Eric Meyer wrote those, so probably good stuff I know that best way to learn css is just use firebug and sneak what others have done and how. Mimick and try to challenge yourself. Asking help on forums (maybe we should have general web talk for topics like that and this?) is good thing to do. ProcessWire books I really cannot recommend Beginning ProcessWire by Adam Kiss. He mainly talks about himself there. Even put his picture on the cover! Whatever book you read, remember to create something at the same time or right after. Learning by doing, that is what really works for most of the people. -
Yes, there are some accessibility problems - title attributes are mostly just noise and unnecessary repeat. Here is few interesting and quick articles about the topic: http://www.456bereastreet.com/archive/200903/dont_duplicate_link_text_in_the_title_attribute/ http://www.456bereastreet.com/archive/200904/dont_use_the_title_attribute_for_essential_information/ http://www.456bereastreet.com/archive/201011/accessibility_myths_in_2010/
-
Yes, almonk has the right example. Here is my modified version, that is used at lukio.fi site: <?php function treeMenu(Page $page = null, Page $rootPage = null, $id = null) { if(is_null($page)) $page = wire('page'); if(is_null($rootPage)) $rootPage = wire('pages')->get('/'); if(!is_null($id)) $id = " id='$id'"; $out = "\n<ul$id>"; $parents = $page->parents; // This is where we get pages we want. You could just say template!=news-item foreach($rootPage->children('template!=post, template!=faq-item, template!=gallery') as $child) { $class = "level-" . count($child->parents); $s = ''; if($child->numChildren && $parents->has($child)) { $class .= " on on_path"; $s = str_replace("\n", "\n\t\t", treeMenu($page, $child)); } else if($child === $page) { $class .= " on on_page"; if($page->numChildren) $s = str_replace("\n", "\n\t\t", treeMenu($page, $page)); } $class .= " page-{$child->id}"; $class = " class='$class'"; $out .= "\n\t<li$class>\n\t\t<a$class href='{$child->url}'>{$child->title}</a>$s\n\t</li>"; } $out .= "\n</ul>"; return $out; }
-
I agree that current solution is not ideal. But adding one more link after page name wouldn't be either. That would be messy and it would require confirmation of some kind. Maybe one button: bulk delete. After clicking that there would be delete link after each page. Just click once for every page you want to remove and after that one click confirmation for all pages.
-
There is, kind of. If you click your trash page open, you can drag & drop pages there.
-
Well said Ryan. I think that simplicity is also the main reason why I felt home right away when I tried pw for the first time. I think that there is few "simplifications" which really makes pw joy to work with: a) Urls come from pages: and you cannot break that (but you can easily fetch data from other pages) b) All markup comes from template: no system generated content (try removing jQuery from drupal site...) c) Everything are just pages. Of course there is lot's of other stuff that makes pw so good: it has great API, it's polished, well documented, easy-to-use, modular, oo, easy to extend... but probably most of these aspects come from the fact, that there are these simplifications behind, so there is not so much to polish, document and create UI:s. About terminology: only thing to consider, is that it is easy to mix template (as a content type, managed through admin) and template file (php file that generates the site markup). I always stumble when I am telling people who are new to pw how this stuff works: "you first create the template and define the fields. Then you edit that template file and add the markup you want." (That is confusing, template is file, or template is content type?)
-
Negative lookup for ID in selector not working?
apeisa replied to Adam Kiss's topic in API & Templates
Yes, if we think for what developer intents when he/she wrotes id!=10|20|30 we do have clearly right solution here. And because other way around doesn't make any sense (using OR in selectors with negative condition) this is safe change and great one too (makes the selectors cleaner). -
Negative lookup for ID in selector not working?
apeisa replied to Adam Kiss's topic in API & Templates
Actually those parenthesis are very important: !x = 5467||6574 on wa. I'm not sure about this (it's been while since I was in school...), but my two cents are here: id != 5467|4567|9870 could be rewritten as: id != 5467 OR id != 4567 OR id != 9870 but not: id != (5467 OR 4567 OR 9870) -
Negative lookup for ID in selector not working?
apeisa replied to Adam Kiss's topic in API & Templates
Reminds me of classic sql injection: 1=1 OR... It seems like a good idea to think negative or as an and. -
You can delete other folders just fine?
-
Nice screenshot, thanks. We actually already have collapsing groups (FieldsetOpen, also tabs: FieldsetTabOpen).
-
yep, adam is right here. It is little bit spartan at the moment, but in P21 there is advanced search which makes it very simple to create just the lists you want: http://processwire.com/talk/index.php/topic,253.0.html Probably some automatic "bookmark" tool to save custom lists would be great and easy to build as a module. Then you would just define on that search engine that you want to list only pages which template = customer and show fields: title, email and phone. Then click "Save this list" (or something) and then this would get own link on navigation (maybe: Content => Customers). Ryan probably has some super cute masterplan (with pink hearts and unicorns) already planned here... Just a note: these pages will also be somewhere in page tree (like in 2.1 every page is, even "specials" like users, roles and permissions).
-
Integrating Forums and social features
apeisa replied to neotoxic's topic in Module/Plugin Development
Well said neotoxic and I agree with you. But also using "yet another software" has it's downsides also. You have to keep your forum software updated. You may have to learn new templating language. Your bridge may not be seamless. If forum needs are simple or you need very tight integration, I would probably go with native solution. -
Which version you are using? 2.0 or 2.1?
-
Same here, it's been very solid!