Jump to content

teppo

PW-Moderators
  • Posts

    3,208
  • Joined

  • Last visited

  • Days Won

    107

Everything posted by teppo

  1. Templates without template files are often used to store data. Probably the simplest example is a typical category structure: . |-- home (template=home) |-- blog (template=blog) | |-- blog-post-1 (template=blog-post) | |-- blog-post-2 | |-- blog-post-3 | `-- blog-post-4 `-- categories (template=categories) |-- category-1 (template=category) |-- category-2 |-- category-3 `-- category-4 Those category pages are connected via Page fields to other pages (such as the blog posts in this example), but they're not intended to be visited with their own URLs -- or rendered, so to speak. That's why you don't want them to have template files either. Does this make sense to you?
  2. They sure do, but in many organisations users won't have the luxury of choosing their own tools.. and IT department is most likely to go with whatever is easiest to keep up to date, often meaning whatever was bundled with the OS. Once you've got hundreds (or thousands) of workstations to care for, you're going to need to set some limits, that's just a fact. Not to mention all those custom-built legacy applications that depend on current environment and would cost a lot to upgrade
  3. @Martijn: I'm really not an expert on this, but we've had good results with simple X-UA-Compatible meta tag. Seem to work in most case, i.e. force IE out of the "please break the Internet for me" mode. One gotcha is that it has to be the very first thing on that page (right after <head> opening tag, that is) or it won't have any effect at all. In some cases X-UA-Compatible header is more feasible option and seems to work slightly better even.
  4. RT @hnshah: GitHub language trends and the fragmenting landscape http://t.co/CGkYyBUNXe http://t.co/kdSU5dixdJ

  5. If you're referring to my comments, IE8 isn't important at all -- IE9 still is, as that's what a lot of our customers use at the moment. Can't remember for sure, so perhaps someone else did mention IE8, though..
  6. Basic knowledge about how Git works can help you learn how to work with it: http://t.co/taRoY60kRn

  7. It should probably be noted that this comment ends with “unless you are some sort of evil wizard, of course.” Which is a very good point.

  8. Oh, and Homebrew for OS X is pretty nifty too. Makes installing stuff a breeze. http://t.co/vyOsW3gpNE

  9. teppo

    Hanna Code

    @owzim, just throwing in some possible reasons: Not all superusers are developers. Whether or not that's a good thing, Hanna Code allows people with no access to actual code to add features that would normally require such an access -- or at least some way to edit files on disk. It's not just about PHP code. Tiny snippets of random HTML or JS can be easily added without having to add files for those too. Hanna Code provides easy way to quickly sketch and test code snippets you're not going to need in the longer term. This is also handy when working in an environment where same site exists on multiple locations sharing database but not code (in which case moving a snippet of code in disk from one location to another would typically require extra steps). That being said, I really believe that Hanna Code would benefit from more fine-grained access management. This could mean three different permissions: hanna-code-html, hanna-code-javascript and hanna-code-php. Or perhaps just two -- hanna-code to add all sorts of snippets and another, limited permission for creating only HTML + JS snippets. The way it is right now, I can't imagine giving a client access to creating their own Hanna Code snippets, but if it allowed me to limit that access to less destructive features this module would have a lot more potential. Edit: almost forgot to mention that of course you could already add the sort of thing you're talking about, though the syntax would be slightly different (filename as a variable). GUI doesn't make that impossible and you don't really have to use it unless you want to
  10. In function scope you'll have to use wire('page') or $wire->page instead of $page.
  11. RT @kaepora: "Programming is like building with Lego but I never run out of bricks, and if there’s no brick with the shape I need I can mak…

  12. Thanks guys, that was a lot of fun! I hope we can make this a habit.. and Antti, don't forget that tournament we talked about
  13. First Finnish ProcessWire meetup is happening right now. Interesting topics, new faces, fresh solutions.. and free coffee! #pwmeetup

  14. RT @chriscoyier: “_What Comes Next Is the Future_ is the definitive documentary about the web” :: http://t.co/h43050AQAH

  15. RT @brad_frost: Work hard. Don't be an asshole. Share what you know. https://t.co/vwpbxHuRSN

  16. Bash, mostly Kongondo explained the main reasons already and the rest was pretty much summed up by Paul M. Jones in his 2008 blog post titled "Another Smarty Emigrant": To be fair templating engines do have valid use cases, but those are almost entirely related to keeping things secure if you need to allow external or otherwise untrusted users (however limited) access to your codebase.
  17. Nothing wrong with asking, but the scope of your question here makes it difficult to answer in sensible timeframe. There's also a lot of valuable content floating around here that already answers different parts of your question, but I'm assuming you've browsed through those, considering that you even started a thread about that. Something you said in that thread made me cringe a bit, though: "I need to chat less and read more". As I've been repeatedly told, we all learn in different ways, but IMHO you need to read less and do more. As they say, "the best way to improve at building software is to build software", and that applies to sites too. Build a couple of sites of your own and you'll have a lot better idea about what works for you.. and what doesn't. Nevertheless, this is an interesting subject, so I'll start by trying to answer your questions briefly based on my typical process: I don't "create a database and install PW", I've got a script for that. Repetitive tasks are boring and automating them is fun. I use a previously created site as my starting point. This base site includes common templates, template files organised exactly as I like (something derived from Zend Framework file structure and an implementation of the front controller pattern), various include files (functions.php with common and usually render-related functions etc.) and modules I often end up installing. I don't know what a "base template code system" is, but if you're talking about template engines (Twig, Smarty etc.) the answer is "never". Those things are are horrible and wrong. If you're referring to something like partials (as in "not full template files but files you'll include within your template files") and helper functions, then yes -- both are useful in their own ways. The projects we've built before are my "code clip folder". I could go on and on about this and probably will at some point post something about the directory structure, template logic etc. but don't really have time for that now. If you'd like to know something more specific, please don't hesitate to ask. You'll definitely get more (and more helpful) answers if you limit the scope of your questions a bit.. though don't be offended if people point you to existing threads either, as that's just the way things work around here. In some ways this forum serves as our collective data bank and the more discussions about same subject are grouped together the easier it is to dig into that subject later
  18. Values for page type fields that store multiple values are PageArrays. Since PageArray extends WireArray, you can use it's methods here -- such as removeAll(). Running $page->countries->removeAll() before adding new items should do the trick. It'll clear the PageArray and you can start from clean slate, so to speak. You should also take a look at other WireArray and PageArray methods, as those provide some nice ways to manage stored items etc.
  19. Begging, you say? Seriously speaking, agreed. This is why I prefer selling apparel etc. over simply asking for money. $100 for a printed photo of Richard Stallman, even if it's autographed, is a bit much, but people still buy those to support a cause. Too bad someone already invented skyscraper plushies..
  20. According to Inputfield.php, collapsedLocked should be exactly what you're looking for: visible, but not editable. Is the description there outdated or am I missing something here? Edit: right, "otherwise same as collapsedYes".. that's a bummer. Sorry, can't see an obvious way to do this without some custom hooks right now.
  21. First of all, I'll assume that you've read enough to know that there are more than a few gotchas to be taken into consideration. The tricky part, IMHO, isn't implementing this for ProcessWire -- getting it right and making it secure is way more complicated. Once you got that figured out, you could set the token or whatever method you're using right after successful Session::login. Other part, logging the user in, depends on how and where you prefer this to happen. ProcessLogin::execute is one option you might want to consider. Hope that helps a bit.
  22. I don't see a problem with commercial modules. In fact, if that little extra cash allows the developers to spend more time working on them and publishing higher quality stuff others can buy (for a reasonable price) and use in their projects, everyone benefits That being said, high quality free modules (or commercial ones made available with a PWYW model) are still more than welcome and (IMHO) have a very important role in the future of this project. Personally I'd like to see that "donate now" button one day too.. and definitely some non-software products (clothing, mugs, pins etc.) When it comes to raising funds, FSF is a model example of doing it right.
×
×
  • Create New...