Jump to content

Adam Kiss

Moderators
  • Posts

    1,303
  • Joined

  • Days Won

    7

Everything posted by Adam Kiss

  1. Oh my god! Great minds thinking alike indeed. Please read this:
  2. Hi everyone, today I just got so angry with me not releasing anything, even though I work on multiple things, that I just pushed to my Github repository this new module I've been playing with. It adds the ability to hook onto Textarea as Textformatter and upon loading, it parses the textarea and replaces parts enclosed with double curly brackets with respective tags. Tags can have multiple parameters, even though final syntax haven't been selected yet. The last (major) problem I currently have (besides this isn't module yet, only working PHP Class) is how to provide extensibility without having developers to touch the code of the Module–Ideally, without having any file in the site/modules/ directory to customize. The current 0.1 code can be found here: https://github.com/a...ter-ProcessWire Edit, 16.4.2012: Hillariously, Diogo had created something solving the same problem here: . To be honest, I feel like my solution is (possibly) more robust, even though Phillip's is a little further, as it already works. I will take it okay, if you'll thinking this is too much, and Diogo's solution is enough, as there is little point in having two modules this alike – granted, one's functionality is subset of the other's, but still. Diogo, if you went further with your code then it's currently shared, I'd like to give the Class already written to you (if it helps). If not, I would be glad if you could join me in creation of this robust, configurable module.
  3. Thanks, I couldn't find this anywhere (is it written somewhere)? Yep. it works [wire has to be replaced full, because]: mv wire wire-bckp && cp -r ~/pw-latest/wire ./ no problems; I just got scared, probably. Doh.
  4. I am upgrading older PW2.2 (probably alpha? beta? release) to the latest by replacing index.php, wire/ directory and htaccess. After running PW, I've got following error. I understand that DB changed, but how do I fix this easiest? Thanks
  5. Ryan, the freeze isn't the full time while you work on dev, I mean rather something like preparing everything you need locally and then: discard local db changes live->local db push recreate needed db changes (as in merge local+live) local->live This could be done in matter of minutes, if well prepared (for instance, every new 'local' page is created through one script, for instance) and I think freezing anything for few minutes is possible (even on ecommerce sites, 10 minutes can't hurt your sales that much short of work day hours). Of course, this involves rather unnecessary logistics, and something more elegant should be in PW
  6. neil, I am not 100% sure, but I think that google and the bunch already know they way around it.
  7. Well the list after save solved only the smallest of the problems and was written for 2.0, if I remeber... from that times, PW grown a lot, so there might be something more complex needed
  8. I am there, but it's awfully silent!
  9. Ryan, haven't you previously mentioned that you made something like versioning before? I would really love to have something like this: You have local/live version; you make a snapshot of a live version, and push the changes to local version. You work on the local, disregarding the live version. When you're finished, you'll take new snapshot of the live and merge it into local version. Now you can push your new local dump live and you're in sync. I think this comes into play not only with external editors (who can't work with your local version, obviously), but also to other automated things out of your control: I for instance have visit tracking code on section of website, because I later recalculate lists with this data. Also, when you have new comments and such on the website, you'll like to merge this with your local (possibly outdated version). Only other way to do this (as far as I know) is to do all the dev on your local version, do live->local db dump, freeze live, do local changes and push local->live. And while it might sound simple when written, it really feels cumbersome...
  10. It's nice, this really could be used on the side (as the extended cheatsheet version). I for instance like this generated documentation much more than tutorial-like written documentation, when I'm deep in the code doing something.
  11. Just a note: WillyC's post of course assumes you have exec() rights to your server.
  12. Pardon me, sort of hijacking the thread, but why don't you use standard ProcessWire fields for the structured data? (Like title, author, who? when? etc)
  13. This really sounds like bug – after we can confirm, that you haven't made any other changes, that could possibly affect this. After all, AFAIK, caching doesn't really matter if you're logged in AND superuser – any cache is ignored for 'admin' (or 'root' or... you get my point).
  14. Is there any way to hijack the render() method? e.g. I would load a page and render the 'preview' or 'thumbnail' version [full version is being loaded on page load, apart from render() (hopefully)] <?php $photos = $pages->get('/example/page/get/')->children('template=photos'); foreach ($photos as $photo) { $photo->render(); }
  15. I would totally switch the TinyMCE for CK Editor. Sorry for offtopic
  16. No, not array fields, only regular textareas - one for keywords, one for description: those are regular fields you use, or is there any more?
  17. Looking into code (just briefly), it seems that that two liner are two queries
  18. I think you don't actually need repeaters for this: there is a definite number of 'SEO' things you can add to meta: Just add two fields into your pages, and in template either take their data where it's populated and use default/none where it isn't.
  19. Hey Rob, that would be awesome - I strongly feel that there really is a hole, when it comes to database syncing. While I probably won't pick this up (I'm not one of those talented developers), is there any possibility of linking us (or the one that will pick this up) to that ex-colleagues code? (in case it's open source, or he is willing to share it with PW community, if you're in contact).
  20. Sweet updates! While this theme isn't completely my taste (I don't really like geometric bauhaus-like fonts or big red search bar), I love that you're keeping this theme up to date and on top in terms of quality and thoroughness.
  21. No thank you for doing so much for Content Management Systems Anyway, I think this is a matter of preference - you obviously like to know what is code doing by looking at what function you're using. I, on the other hand, prefer the 'here is add method, it will deal with whatever you choose to pass as parameter'. I think it's very nice that you, as a lead developer discuss stuff with community-healthy discussion beat anything else, when it comes to collaboration.
  22. I actually am so lazy I have following in my config.php: switch ($_SERVER['HTTP_HOST']){ case 'www.domain.com': case 'domain.com': define('DEV_ENVIROMENT', 'LIVE'); break; case 'beta.domain.com': case 'staging.domain.com': define('DEV_ENVIROMENT', 'STAGING'); break; case 'www.domain.local': case 'domain.local': case '10.0.2.2': default: define('DEV_ENVIROMENT','LOCALHOST'); break; } on the top, and then on the bottom I have groups of configuration from the original generated config.php (well, one is generated, rest is copy-paste-change) in ifs: if ('LOCALHOST' === DEV_ENVIROMENT): This way, I only ddeploy database & code and everything is running like nothing ever changed :3 Of course, deployment strategies differ, when you need to sync data back and forth-for instance, on this one system I prepare and test any new stuff (even in db), import live (changed db) and recreate the db part of the new stuff (already programmed and tested) and push it back to production (or staging).
  23. Hello all, I wanted to make a pool of pages today. So I created a variable, $pool, and iterated over pages, whose children I wanted to add. All good here: $pool = new PageArray; foreach ($parentPages as $parent){ $pool->add($parent->children()); } However, it took me good 25 minutes to realize, that my code wasn't really working. So, I glanced on docs a little, and changed add for append $pool->append($parent->children()); To my surprise, neither this works. You must use following: $pool->import($parent->children()); So, my question to Ryan is: 'why is this like this'? I would guess (and I believe jQuery's add/append/prepend also operate over arrays, not only single items). And question to community: do you think add/append/prepend/... should work for PageArray also, or only for single Page? I am all for PageArray. I probably also could do necessary typing. To be precise: Both add() and append() could only call import(), which calls add() for each Page() back, prepend would be a little harder. Also, trwtf is me for not reading the docs 100%.
×
×
  • Create New...