Jump to content

martinluff

Members
  • Posts

    79
  • Joined

  • Last visited

Everything posted by martinluff

  1. Sorry, I think I gave the wrong impression there, Mary and I only just talked about possibility of doing some PW basics tutorials the other week in passing; we have to think about how to approach that and one or other (or both of us) create them (good tutorials take a bit of time to put together); plus we're both pretty busy right now with client work so definitely we'd like to do them but it might be a little while before they're available. Of course someone else might also be working on this already... Thanks for the comments Ryan. I found the Skyscraper demo to be very useful, BUT it does have a pretty hefty include to abstract out a lot of the logic from the individual templates so not as straight forward to follow as the default simple site installation. More site profiles would be great and I think this has huge promise for streamlining and speeding up development on live projects for users - especially if you have a number of similar projects that you're building out; but a few 'how to convert this site into a PW site' or 'how to convert this template into a PW data-driven site' step-by-step tutorials would be very useful as well. This also helps address different learning styles since I appreciate that well commented code can still be difficult to translate into a new 'from scratch' build for some without some other way to see worked examples. Partly I want to think carefully about how best to put together a tutorial since ProcessWire is very flexible and doesn't dictate a particular way of working so I wouldn't want any method used in a tutorial to become the de-facto way of doing things just because the tutorial approached it in that way. When I started using ExpressionEngine I really appreciated this tutorial http://www.train-ee.com/courseware/free-tutorials/category/building-a-small-business-site/ by Mike Boyink on building out a simple small business showcase site. Do you think this might be a good model to work from? Be interested in your thoughts Ryan, Adam and Antti (or anyone else here for that matter).
  2. Great question, not a silly one at all... Agree with the points above - any CMS has a bit of a learning curve especially if you're new to the concept, but having used quite a few CMS before I think ProcessWire (PW) is not overly demanding and easier than some of the best known systems; especially once you get past the basics. I only have pretty basic PHP skills but so far I've been doing fine with PW; as Ryan has pointed out elsewhere, the PW API is very friendly - so the complexities of PHP are hidden from you in most cases, to the extent that it's no more complicated than the proprietary template tagging systems used in other CMS. However, the advantage is that you're learning a universal language with transferable skills and lots of online and offline learning resources to help you out - plus further down the line you have the full power of PHP at your disposal if you really start growing your ideas. PW doesn't have as many ready built modules at this stage but then I actually think this puts you in a better position further down the line since you will understand what you build and be able to maintain it yourself. If you go for a system with lots of 'plug and play' modules then often you run into issues later if these aren't compatible with the CMS when it gets upgraded, your client requests a tweak which you can't code yourself, or the module is abandoned by it's author at some point. ProcessWire is as much a framework for building things as a CMS - so the further you need to push it the more you will appreciate not being boxed in by someone else's ideas - which is often the case if you go for a lightweight CMS (easier to set up in the first instance but much more likely to impose limitations later on). Well good luck and look forward to more questions
  3. Useful addition, not least of all just because Textile has a big following; I used Textpattern a fair bit at one point and still loosely involved in a project that runs 100+ copies of it... Wasn't sure why you'd want to use something like Textile when I first used it but warmed to it later and still use it to run a decent-sized ExpressionEngine site in which I used Textile for all the text boxes in the admin. Takes a little to bring a client up to speed but then much less likely for them to accidentally trash the site or produce HTML spaghetti than if using TinyMCE/CKEditor etc. also I think it's quite useful at times for a client to realise they're not just generating a word processing document but are creating web markup in the background; and by default Textile has some nice tweaks to text formatting like 'proper' quotes, em and en dashes etc. and, as you say, the syntax is quite good. On the other hand it is another proprietary markup language... I think in a CMS admin it can sometimes also make more sense to clients since you're often re-using the same content in different contexts throughout a site and so 'WYSIWYG' is never really going to be a good analogy to try and fit since an individual chunk of content can look quite different in each context; in this respect I think Textpattern's more 'abstract' approach to content fields actually seems to fit well. As an aside I noticed Textpattern seems to be enjoying a lot more activity of late and steadily moving towards their big new '5' release with a fully revised architecture after a couple of rocky years...
  4. Yes, that's fine by me. I think he's planning on a longish trip to Europe soon so probably best to get in touch sooner rather than later, since PW can be bootstrapped into other scripts could still be you can look at a hybrid solution...
  5. Good points there Ryan; and yes, I'm still a bit of a paper-based book person too. I thought Vikram Vaswani's book looked like it might be useful based on the contents plus his great style in the '101' tutorials - which have also garnered good reviews for observing good programming practice; the book includes PHP5.3 even though this was still in development at the time so I would assume it's still pretty relevant.
  6. Yay, nice work... Yet another practical and very useful addition. Thanks for the work on this.
  7. Thanks a bundle Soma I get the logic - thanks for explaining and taking the time to give a working example, need to read the code a few times to understand it in practice but examples like this help a lot. That will be a really useful bit of re-usable code for me (and probably some others). Cool... Edit: OK, have had a bit more time with the code now... that's great. See I never would have thought it would be a simple solution like that Thanks again.
  8. Hi Nichod, great to see you on the forums If you're looking through the API docs then you probably already came across the one on templates http://processwire.com/api/templates/; but if not, this gives some very good examples that will give you a lot of the info to create a basic site. I know Mary over at The Coding Pad http://codingpad.maryspad.com/ has been doing some work with ProcessWire and the subject of tutorials did come up in an exchange we had last week so I'm guessing might be something on the way from there if not on the new ProcessWire site...
  9. Digitex, I'd agree with Ryan, sounds like custom programming using 'pure' framework may well be best for that part of the functionality; and not to feel bad about it. A good friend of mine, Wayne at ChilliNut Software http://www.chillinut.com.au/about/ is a very good programmer and specialises in PHP booking systems - so might be worth making contact...
  10. While ago I evaluated both and came out on the side of CK - but can't remember all the reasons now and of course the inequalities re most likely historic. Interesting to note this blog post from Drupalcamp http://www.mediacurrent.com/blog/wysiwyg-shootout-and-winner. I seem to remember the CK file manager is a bit more integrated (but I could be thinking of FCK there) plus the TinyMCE package of files take up less space (but could be related to the previous point).
  11. OK Antti, I think I'm in the depressing stage at this point In response to your suggestion here's my mutilated version of slkwrm's beautiful code; in which I'm trying to append a simple 'item-active' class on the current item (adding 'parent-active' on any parent's of the current item would be a bonus): <?php function treeMenu(Page $page = null, $depth = 1, $id = null) { $depth -= 1; if(is_null($page)) $page = wire('page'); if(!is_null($id)) $id = " id='$id'"; $out = "\n<ul$id>"; // This is where we get pages we want. You could just say template!=news-item or list the templates you do want foreach($page->children() as $child) { $class = "level-" . count($child->parents); $s = ''; if($child->numChildren && $depth > 0 ) { $s = str_replace("\n", "\n\t\t", treeMenu($child, $depth)); if ($child === $page) { $class .= " current"; } } $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; } //parameters: current page, menu depth, ul menu id $menu = treeMenu($page->rootParent, 4, "myMenu"); So from my reading of it and looking at the linked article in Ryan's post (http://processwire.com/talk/index.php/topic,128.msg790.html#msg790) I'm guessing the argument to test if it should append the active class needs to be in the loop plus needs to work out when current page is same as $child? Here's another attempt: <?php function treeMenu(Page $page = null, $depth = 1, $id = null) { $depth -= 1; if(is_null($page)) $page = wire('page'); if(!is_null($id)) $id = " id='$id'"; $out = "\n<ul$id>"; // This is where we get pages we want. You could just say template!=news-item or list the templates you do want foreach($page->children() as $child) { $class = "level-" . count($child->parents); $s = ''; if($child->numChildren && $depth > 0 && $child->id === $page->$id) { $class .= " current"; $s = str_replace("\n", "\n\t\t", treeMenu($child, $depth)); } else if ($child->numChildren && $depth > 0) { $class .= ""; $s = str_replace("\n", "\n\t\t", treeMenu($child, $depth)); } $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; } //parameters: current page, menu depth, ul menu id $menu = treeMenu($page->rootParent, 4, "myMenu"); echo $menu; If someone could sort out where I'm going wrong (I'm not even sure if it's my argument for detecting when page and child are the same or my placement of the arguments or if I'm just way off track) that would be much appreciated
  12. OK, so I just posted this to another thread but it's more appropriate here... I'm trying to get better with my PHP (well probably couldn't be much worse so any improvement there is a great improvement for me and the Zend 'PHP 101' seems pretty useful to get going with http://devzone.zend.com/6/php-101-php-for-the-absolute-beginner/ plus it has a lot of really useful cross-references to the PHP manual on php.net (along with a goldmine of commented code snippets in the comments there). Regarding books, the same author produced http://www.amazon.co.uk/PHP-BEGINNERS-Beginners-Guides-McGraw-Hill/dp/0071549013/ref=pd_sim_b_4 and it seems to have a set of decent reviews on Amazon (but I've not read it myself and it does date from 2008 so may be some better more up-to-date books).
  13. Cool; I suspect it'll be a very well used module I'm trying to improve my PHP coding but unfortunately not a fast learner... The Zend PHP 101 series, although from a while back, seems the best online introduction I've found so far http://devzone.zend.com/6/php-101-php-for-the-absolute-beginner/
  14. Ryan, yes, I'd seen that and that code does what I want, but my PHP isn't very good and I couldn't seem to merge that code with silkwrm's code. Well I tried and at least it didn't break but it also didn't seem to be adding the required class... Pete, good point, when I was trying to bottom this out yesterday I came across nine or ten snippets related to outputting navigation; I wonder if Ryan or another kind coder could put all these snippets together as a navigation FAQ.
  15. Hey slkwrm, this code does just what I'm looking for; to recursively create a sub-nav for any section of my site listing all the items in that section as a nested list (works like a dream) EXCEPT I'd really like to add 'page-active' and ideally 'parent-active' classes to the current page in the navigation and, if appropriate to it's parents so I can style them differently to show where the user is in the tree. Hope that makes sense, if someone could point me in the right direction then that would make my day (have just spend last couple of hours trying to append these classes without success)
  16. Great work Ryan, as ever looks like very flexible ways of working for multi-lingual sites
  17. PS SilverStripe are making a deal out of the new DataGrid module which will replace Uncle Cheese's DataObjectManager... useful discussion here http://groups.google.com/group/silverstripe-dev/browse_thread/thread/dbee37df0aa58dd - I really loved the DOM and DG looks like a step up...
  18. Cool, that's useful to know about the JSON stuff, might be useful to bottom out the XML at some point; I know it's not Ryan's preference but I think it ties in well with the strict hierarchical and tree based approach of PW... Well I see the main advantage of YQL is that it pulls together such a huge number of diverse and varied APIs through a unified and straight-forward query language so you don't have to keep learning all the different quirks or each one; so yes, if you had a plugin which could work a bit like the YQL console for quickly putting together feeds and then marry it with something like your module if/when you needed to not just display the data via a feed but also pull it into the back-end db - so once you had it working for one feed then would seem fairly trivial to adapt for the others (but I could be way out there). I could see some interesting possibilities... and kind of feels like it would answer both ends of the equation - easily preparing custom feeds and then importing. I've only very briefly looked at Yahoo Pipes but possibly that would also permit the easiest way of combining feeds, and combining values within a single feed or across feeds before importing. Anyway, just an idea. I need to take a closer look at DataImport to understand how it functions...
  19. Thanks Ryan, I think using Git can still be the basis for the eventual 'package control' I think... for example Sublime Text uses this method for installing and updating add-ons (and the users are insulated from the fact that this is what's happening)
  20. Thanks Diogo, beat me to it I think SilverStripe also handles it well using 'Uncle Cheese's' DataObjectManager module and the old docs give quite a good overview http://doc.silverstripe.org/old/modules:dataobjectmanager
  21. hadn't thought of that and a good point. Ryan, I agree it's not ideal long-term esp. for hosts that don't have access to command line/Git etc. plus users who don't want to learn all that but agree it makes sense short term until there's a built-in system in PW. My main point was that we're almost there with Git in any case - so some sort of official endorsement in the docs on the PW site might just help make sure all add-on components find there way to Git rather than downloads from other sites, forum attachments and so on. I'm just thinking some sort of unified approach here might be very useful given the way modules/themes are starting to really take off. I've no particular preference with submodules or sym links (and I use submodules with different remote repositories so I think either approach can be made to work without especially changing the way things are set up now)...
  22. Glad that was helpful. I don't think the map necessarily needs rounded corners - I quite like the variation between the sharp corners of some elements and the rounded boxes...
  23. I had a recent chat with Ryan regarding encouraging everyone to use Git with some common naming conventions and file structures for add-ons so we could leverage Git and in particular the submodules commands to create a nice framework for supporting PW module/theme/snippet upgrades and rollback/tracking etc. To get some Idea of how this might work (in my mind's eye) see this useful article on the Symphony CMS site http://symphony-cms.com/learn/articles/view/getting-git-for-symphony-development/ - especially the section on adding extensions to Symphony as submodules; what do you think guys?
  24. Sounds logical to me (+ cool and in spirit of PW's logical simplicity and human-readable coding). You're just a factory for good stuff eh!
×
×
  • Create New...