Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/30/2012 in all areas

  1. This is a fun question to answer, so thanks for asking it. It really gets down to much of the motivation behind the system. For me it really comes down to time. Time is the most important thing to me. I'm getting old and need to focus on the things that give me more time, and that's what it's all geared around. For others, it's money. But time is money. Either way, you have to ask: "what is saving me time?" That's all you need to know to answer the question. But here's the long version: How much time does it save you to use a template engine vs. PHP API? I would suggest that using a template engine saves you zero time (maybe even costs time) vs. using a clean PHP API like in ProcessWire. Ultimately you are just typing different characters with a template engine, in about the same quantity, to do the same thing (example). Nor is a template engine performing any heavy logic, thinking or processing behind the scenes… it's mainly just substituting one thing for another. It's not saving you any time or mental/logical energy. It's this whole abstraction layer taking up space that isn't contributing anything to the bottom line. So the benefits of a template engine aren't very clear, relative to using something like ProcessWire's API. And I don't think it matters whether you know PHP or not, as the learning curve is identical between PHP and a template engine, for accomplishing the same things. The only difference is that PHP will go much farther, when/if you want it to. Then look at the amount of time it would take you to construct raw DB queries (or through some abstraction layer like ActiveRecord). A simple selector that you write in a few seconds translates to a rather long and complicated SQL query that might have taken quite some time to create and optimize manually. Whether in ProcessWire or somewhere else, to create the SQL query, you would have had to maintain internal knowledge of the database, tables involved, indexes, left and right joins, orders, grouping, limits, security and much more… So I would suggest that ProcessWire's selector syntax is saving HUGE amounts of time (and thus cost) by abstracting away a whole lot of technical details and optimization. At the same time, it's part of a larger system that has also abstracted away the complexities of DB design and optimization, and brought it all into the context and thinking of a website. You don't need to know anything about databases or indexes, or that they even exist. I would also suggest that ProcessWire gives one the impression that they can easily pluck data from anywhere in their site as if it was already in memory… and in the context of a website, not a database. In terms of time and cost savings, is there any comparison between this and a template engine?
    5 points
  2. This was the first full site I built with Processwire. We launched it several months ago, but I immediately got swept up in another project, and forgot to post it. In case the name didn't clue you in, it's a site for my bother's company. http://www.renobuilding.com
    3 points
  3. Just want to make sure I've got it written down as to what specifically would help: Addition of an option to support intentionally-empty translations, and not have them count towards the untranslated count. Addition of a tool that finds all translatable files and also calls out those that don't have any translations (i.e. new files) Addition of a tool that bundles all translation files into a ZIP or something like that, ready for download. Does this sound right, or anything else? I can't get started on these right away, but thought it would be good to get them written down so they can become part of the roadmap at least.
    3 points
  4. Apologies in advance if this is old news, but for anyone who hasn't realised how trivially easy PW makes this, just give it a try. Google Analytics (GA) has a newish feature - 'Content Experiments' (multivariate testing if you want to be posh), and this is so easy to do with PW, it's almost unbelievable. What it boils down to is testing different variations of a page to see which performs (gets more sales, signups, leads, whatever) better, either between 2 versions (A/B testing) or more (multivariate testing). Say you have a page with a download link (or 'sign up for newsletter' or whatever), and you want to test size, colour, position or whatever of the download link - Install Ryan's Page Clone module Clone your page as many times as necessary, so you end up with /download-page/ (the original) /download-page-1/ /download-page-2/ etc [*]Edit page titles so they are the same as the original [*]Set the copies to hidden, so they don't appear in navigation, search, etc., but are still accessible by their URL [*]Change whatever in each copy (link colour, button size/colour) [*]Create a Goal in GA (I'm not a GA expert by any means, so you're on your own with that bit, but it is quite easy) [*]Create a new experiment under Content > Experiments and point it at your original and variations [*]GA gives you a bit of JS to add after the <head> tag of the original page, which allows them to redirect to the variations as necessary, so you need this in that page's template. [*]Sit back and bask in how easy it was and await GA doing the hard work Eventually, GA will detect which variation performs better, and you can end the experiment and dump the other page variants, replacing the original with the winner.
    3 points
  5. @everfreecreative: I think Ryan meant what does that given echo output - did you try that exact thing Ryan wrote? If $templates->get() succeeds, it returns a template object and echoing that object should give an id. If it echoes nothing, then the problem is that a template can't be found. Then again, if it does echo a number (I think that's what it resolves to), the problem is somewhere else . You could also try the same echo with hardcoded template name and tell us results from both (at least this one should output a template id).
    2 points
  6. First pw site... http://www.stokar.com/ composer's management agency. Processwire was great for this!; took on every challenge and request the client had with ease. Thanks to Ryan, and to everyone on the forum - it was an essential resource for working out all of the code to make this site work. -marc
    1 point
  7. Those commented translations in default.php are kind of a placeholder/short cut, and you are seeing a side effect of it. Typically translatable text consists of static text in a file. But the translation being done in this instance is actually on dynamic text. So the commented translation calls are picked up by the parser as translatable copy, but obviously those function calls never execute (since they are commented). Instead, the admin template runs the navigation titles through the translation function, with dynamic text (actual page titles). So if it encounters one of those placeholder words/phrases in a page title, a substitute translation will get used when available. When you removed the __("Templates") line, ProcessWire considers that abandoned since it no longer appears in the file. But "abandoned" is a runtime state, not a permanent one. That state exists only to notify you during translation time what words/phrases no longer appear in the file. The file still requested a translation for that word "Templates" at runtime, and it found that there was one, so it delivered it. You would have had to delete the abandoned translation to fully get rid of it.
    1 point
  8. Great example of putting together a nice collection of fonts. Works really well.
    1 point
  9. Hey, just saw your website and I have to say: It's REALLY AMAZING! BUT: You should use ProcessWire instead of Textpattern / Nico
    1 point
  10. Love it. Love the cleverness of the headline too - I was immediately wondering why the full stops were there, but it works well as a sentence and separate statements too. Good stuff!
    1 point
  11. Hi Nico, Thanks. I built the site and all the sites in the portfolio long before I knew about Processwire. As soon as I get some extra time I'll be migrating it over.
    1 point
  12. Hi yellowled, sorry my english is not so good as yours - this is probably why my sentence (which i see now) misunderstood. And NO i didn´t wan´t to "critisizing work people"! I want to help you/pw-community to translate PW into German - also like you in my freetime! i want to exchange with all german-speaker how i can help on the project and bring it ahead. But i see you have other more important parts in pw - thats ok i know that. So i can´t do more as to say sorry when you and/or the others feel that i´m too pushy that was not my aim.
    1 point
  13. Is the field a text field or textarea? maybe try: echo $templates->get(trim(strip_tags($page->form_name)));
    1 point
  14. Just to make this clear, I don't think this forum should have subforums in any language other than English.
    1 point
  15. Hi, Here's my first site using Processwire: Hoof is a Graphic Design studio in Melbourne I run with 2 friends/colleagues. http://www.hoof.net.au/ I've had a lot of assistance with this from everyone in the forum answering my questions, thanks so much for all the help! If you are reading Diogo - I have the PHP book you recommended its great, there's a few lightbulb moments there. I'll be able to pick apart and improve my templates a bit now. Its been said many times already… processwire is a pleasure to use. I'm looking forward to learning a lot more. Regards, Alex
    1 point
  16. First of all, Pete is completely right: translation/internationalization is hard. It's tedious, nobody likes to do it, it sucks. I think I already mentioned that I'm involved in another open source project, which has very few developers, so we have to rely on non-developer help. Most of that is done in the translation area. From that experience, I would recommend to make creating and maintaining translations as easy as possible, even for "normal" users. It will help spread PW even more if it is properly translated in as many languages as possible. Personally, I would be fine with the grep command. However, a lot of people have to work on servers or in small hosting plans which don't offer shell access. For those people, some kind of non-shell solution would be helpful. Doesn't have to be integrated in PW or the admin backend at all, it could as well be an extra PHP script or something. Just a solution to get the translatable files without shell access, maybe marking "new" translatable files, if that's possible. I have to agree that PW's internationalization already is pretty comfortable. I also think it's perfectly acceptable to have some parts which are not (yet) translated. In my opinion, you can not use most open source software without knowing at least some English. Seems impossible. But once PW starts to attract the "non-technical users" (which, as far as I can tell, it already is), there will be more people wanting to use it which barely understand English. Or not at all. Trust me, it will not keep them from wanting to use it anyway. You'll very soon get inquiries whether we could have a subforum in Spanish or something.
    1 point
  17. First of all, I push quite a number of new and revised translations to GitHub today. Haven't checked for new translations yet since I did those on a server without ssh access, which makes it hard to check for new translatable files. Second, I admit I only skimmed those screenshots, but I am pretty sure most of this stuff is properly translated in the standard admin theme. I never use anything else, so I can't really tell whether it's related to the admin theme. You should check with the standard admin theme. Also always consider that there still are quite a number of parts of PW which are not translatable at all.
    1 point
  18. I give up. Now I removed the title and all translation for the "Templates" and it still shows "Vorlagen" as the title when I go to Setup->Templates. The translation in ProcessTemplates for module Title is empty. So is the page title for german for both "Templates" pages. DB has no occurence of the word "Vorlagen" and I also emptied cache, but still it remains there magically. Edit: NO really. I found it out. It looks it's something with my teflon theme. When switch to default admin theme the Title shows "Templates" as it should. BUT when I searched for the word in the theme there's no presents of "Vorlagen", so I found out that the translation of the file /site/templates-admin/default.php had abandoned translations still in there (from testing with adding them in the default.php) from which it took the title even when I deleted them in default.php. Now deleting them from in the translation abandoned ones, it's finally gone!
    1 point
  19. That makes sense, and I like that your method allows you to omit commonly confused characters, and specify the length of the password. Like I said, lots in there for me to learn from.
    1 point
  20. I think I'm with you there ryan - I use jQuery a fair amount but I never feel like I know it inside out and don't often use the same sort of functions as I would in PW so I'd never really get confused. I often look up jQuery functionality as I need it as it's never quite as straightforward for me as PW is.
    1 point
  21. Hi, I did this one for design agency Ant Design in my "coding-for-other-designers" role: http://aotr.com.au/ Regards Marty
    1 point
  22. Hello, I am going to resurrect this old post to share my "related pages" approach. It uses the described pages-as-tags and then looks for pages with the same tags. The more tags are shared, the more "related" the other page is, thus getting it further up on the list. foreach($page->tags as $tags) { $tag = $sanitizer->selectorValue($tags->title); $related_pages = $pages->find("tags.title=$tag"); foreach($related_pages as $related) { if($related->id != $page->id) $related_id[$related->id]++; } } arsort($related_id); foreach($related_id as $key => $val){ $rp = $pages->get($key); ?> <a href="<?=$rp->url;?>"><?=$rp->title;?><br><? } I just translated this to PW from a Perl module I had, so please feel free to correct my PW syntax since I'm new to this. Thanks, thomas
    1 point
×
×
  • Create New...