Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Christchurch NZ

martinluff's Achievements

Full Member

Full Member (4/6)



  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.
  • Create New...