Jump to content

Adam Kiss

Moderators
  • Posts

    1,303
  • Joined

  • Days Won

    7

Everything posted by Adam Kiss

  1. So it still generates empty directory for each page, that has either image or file field? why is that? can't the folders be created/deleted each Page::save based on total number of files for page?
  2. I would like the invalidation to remove old files as well, yes
  3. Thanks Ryan Is there any API call to purge (/delete/invalidate) cache? If I'll use this as a part of module, I can't rely on site administrator setting up things properly
  4. Yeah, it did... partly. Mainly: Is the cache tied to page, or do I have to supply the differentiation Does it work only for string (HTML), or can I supply also objects (and it'll take care of serialisation?) Is the cache autodeleted? Meaning: do I only check for presence (if I want to save CPU time) How do I invalidate cache (upon Page save, for instance) Is this available for modules? Thanks
  5. Hey Ryan, could you write a little on how to start with MarkupCache please? How it is used, what are the situations you want to use it and such; I for instance would like this to use with textformatter: I am running quite heavy processing on parts of page content, and would like to cache the result, so I don't have to rerun it again, but I am not sure, where goes what with MarkupCache. Thank you
  6. I thought that was edit button, I'm mobile today. O tapped random thibgs to edit Somehow I made the reply text smaller as well.
  7. Oh Marty's on fire alright, but it seems that new things in PW are coming faster than usually lately, so I thought you have somewhat less client work or so.
  8. OT: Re: Embed.ly - They totally lost my trust with that reversed gradient on hover in navigation. Doh. --- Also, Ryan, are you on fire or have you just finished million client projects? You seem to work 50 hours a day, lately.
  9. Currently, no. I've had just too much stuff going on, but that will (hopefully) change soon - I'm slowly trying to transform myself from 'work until 120% done' to release small, release often.
  10. Antti: but do you do this for your templates too? Edit: Oh, I see what you did there; You are adding a custom hooks to fake class methods, right?
  11. Just a note: The rule of thumb of moving Drupal to PW is: do it ASAP.
  12. @Soma - I guess that could work, but this is probably better to use just to group the templates together and then parse the PageArray and set correct order, so you don't run into problem with different orders needed with 'XX-template' system. Example: on search, you need 01-tpl1, 02-tpl2, 03-tpl3. On a different listing, you'll need 03-tpl3, 01-tpl1, 02-tpl2 in this order, and then you're screwed. But this is just a note, you may not run into this issue (if you have one search only, for instance
  13. TL;DR: I basically wrap the original Page object (the one that is returned from PW when you call $page or PageArray->eq(0), for instance) into my own PHP class, so I can add my own code to different template classes. This is makes it easier (for me, at least) to separate the logic part (when deciding stuff based on input or urlSegments, for isntance) from the HTML code generation itself – it's very "MVC-ish"
  14. I, for instance, use different mail library, because builtin mail() is often acting funky when working with UTF-8. Also, swift::mailer is awesome.
  15. Or, alternatively (of you don't want to read the other thread) – you just get 'starttime' and 'endtime' of the timespan (in the timestamp format) you wish to get pages for and do simple query: $archives = $pages->find("template=blog, created>=$starttime, created<=$endtime");
  16. Hey all (and Ryan, mostly ) During me playing with PW, I noticed that you can set different PHP Object for pages, instead Page. SO what I do now: I have custom Autoloader added (in the end of config), have custom classes for all templates (extending Page class), and all templates are redirected to index.php, which only calls some default function $page->render(); Why? This allows me now do stuff like this: '$page->children()->renderListItem();', which I find superclean. I also teamed up with Steve (netcarver) to see whether there is some performance hit. There is, but minor one - application went from 24 rqs/s down to 21 rqs/s, which I am pretty much okay with. But (there is always one), I am curious whether there are any other implications? This possiblity is hidden in the advanced settings, which you recommend only to module makers – but I would need to turn this on for each page I'll be working on, so... I am asking. Are there any?
  17. I have a config based on some $_SERVER variables (looking for URL to switch to correct database) and just copy stuff; I manage most of my websites myself, so I do changes locally and just push new db dump to live together with changed files. If the rare occasion happens where client does some stuff on live version (or I need to push something live), I take the db in the other direction (live->localhost) and deal with the uploaded files (If only my server supported git; this would be like million times easier).
  18. Even though I'm not a fan of this 'conceptual art', I think the site is rather well done; The minimalism makes great sense here, is well executed and I like this overall very much! good work D.
  19. Very well, but where do you suggest this comes from? There is no such thing as 'site name'. Maybe some $_SERVER[] value? (showing something like www.domain.com)?
  20. By the block syntax I meant this: {% blocktag: param1=value, param2=value %} {% /blocktag %} I think I should be able to capture this, I just thought you have the code ready for this already, that's why I just asked how to do it; I think that one ungreedy regexp with two capture zones could be okay for version 1 (one simple ungreedy regexp could not deal with stacked/multiple tags of the same type) Regarding the hookability: Ryan, can you provide the crudest possible way of doing this with Textformatter, please? thank you!
  21. She seems like a nice person! Good job on the "minimalistic artist" type of site, congrats!
  22. Interesting idea with the extendability via the Hook system–that also solves the problem I had – You basically only create a file, let our module know that it has some hooks avail. and add that module to PW... Great idea! Now: How do I make the plugin hookable? How do I make the syntax blocks? Do we want to support this also in template files? I think You've mentioned you have the first two things solved already, could you send me the code? (Ideally, could you fork the GitHub repo, create dir _ideas and move your files there?) Regarding the third one, I thought of this as a way to easily mention field from inside of other field, so you don't have to split your blog posts or create your own tags. But how do we support it in template files, when you have so many ways of creating your template files?
  23. That's what I got for being lazy to edit... Anyway, Pete, Antti, Ryan, and others... any ideas? I'm baffled mostly with the custom functions part, how to let sitebuilders extend this, nicely.
×
×
  • Create New...