Jump to content

Adam Kiss

Moderators
  • Posts

    1,303
  • Joined

  • Days Won

    7

Everything posted by Adam Kiss

  1. Okay, this is me being idiot; if you've tested your images with '&', be sure to switch back to '&'only. Thanks.
  2. Hey all, I'm trying to add dynamically generated Google Chart Image to image field, but... it doesn't work $imgSrc = 'https://chart.googleapis.com/chart?chs=920x200&cht=bvs&chd=t:0,7,0,0,4,0,0,0,0,0,0,1,0,0,0,1,2,0,0,0,7,11,4,0,3,4,2,4,6,1&chds=a&chm=B,eeeeee,0,0,0&chls=3&chco=222222' $page->images->add($imgSrc); It fails with 'Exception: Unable to copy: ' and adds a bunch of data. I've got two questions: How can I affect the filename of the file created [thus add some extension, for instance it's PNG file]. And more importantly, why doesn't this work? I know for a fact that URL adding works. Edit: Actually, this is how I save this: $page->images->removeAll(); $page->images->add($commitsGraphSrc); //it's an URL for google chart API $page->images->add($languagesGraphSrc); //another URL for gchart API $page->save();
  3. There are also some array manipulation functions included you might want to try this: $navigation = $pages->get('/content/')->children(); $navigation->append( $pages->get('/footer/')->children());
  4. Or, alternatively, you can change the TinyMCE configuration to allow iframes in HTML; tags, that don't get filtered out in TinyMCE fields' HTML can be found in field config, namely 'TinyMCE advanced configuration'.
  5. Has anyone yet broke this to TXP Team? Do we know what's their opinion?
  6. Hello there! Is your name really Viking? Really? That is AWESOME!
  7. I'm 99% sure that some of the objects that you think you have set, in fact you haven't. Could you single out which one of your '$object->property' calls is throwing this one? (It could be that you haven't uploaded press_snippet file, for instance)
  8. You probably need to have all websites on one physical server, with directory structure like this [simplified example]: / /www/ /www/web.com/ ./index.php ./site/ ./wire/ - symlinked /www/example.com/ ./index.php ./site/ ./wire/ - symlinked /www/another-domain.com/ ./index.php ./site/ ./wire/ - symlinked /non-accessible/ (or any other server dir, possibly out of your publicly accessible directories) ./wire/ - physical directory, for all domains
  9. Hello all advanced users (Ryan, Antti, ?) Introduction: I am curious about how the template files get included, called, how they are run and such. Last week or so, I tried to create little MVC (or rather, V(C+M) ) directory skeleton, where templates itself would be classes generating data for 'views', which would be located in one of the directories in '/site/templates/'. However, when I set up Base class, set few of my templates to use this, added View object (which in theory loads file and dumps data in it), prepared some place for common functions, and prepared autorendering in snippets (creating renderXyz function would give the template object variable called $Xyz with generated object/array of objects). However, upon doing all of this, system felt really slow-ish, having generation time 0,5s-1s for localhost and simple, 3 or 4 field pages, which felt really unnatural - and I suspect my noobish object model So this brings me to my question: I noticed that there are TemplateFile objects, with render() function, and such, whole ProcessWire is 100% OOPhp, is there any recommended way I can use ProcessWire as any MVC framework, having autoloading, so I don't have to use require(); with objects for instance? If this doesn't make any sense for you, I'll try rephrase later, but I hope it does make sense.
  10. Hello Will (or Morris ), first, regarding size: There are already sites of all sizes: from 3 or for pages to thousands. Theoretically, there are no performance limits, since you can always add memory and CPU In reality, System tends to be slow-ish if you load 6k+ pages in a single page (note here please, that this is loading in one call, not having it in your tree). second, regarding taxonomies: There is absolutely no problem with this. You'll basically make one page, which will be parent of all of items, each item having virtually any data you please. Also, adding this items to your other pages (as tags to blogs, for instance) is as simple as having one 'page' field (one of the types of content you can have in ProcessWire), and selecting items you wish to link to this page. In the code, you'll have this simply available via <?php foreach ($page->taxonomy_items as $item){ //here is all data for linked taxonomy items } (note: this example assumes you named your taxonomy link field 'taxonomy_items')
  11. Adam Kiss

    For Antti

    I think your lion's awesome! I absolutely imagine you being the finnish guy, with green hat and everything. So funny, after all that time.
  12. Hey Andrew, it's always good to hear that somebody loves what you do (for Ryan), expand (Antti and other module creators) or add a little drop into the ocean here and there (for me)
  13. Since I haven't gone through this module and its comments, this might be OT: Aren't browser sending only data from form, which has the pressed submit in it? Meaning, if I have form1 with submit1 and form2 with submit2, on submit1 it sends only fields/data from form1 and on submit2 only data from form2?
  14. Thank you Ryan, you've just saved me a ton of nerves and time
  15. I think that xdebug turns on some kind of throttling to prevent memory consumption and such, not 100% sure though.
  16. Hi boys, I have a little problem here; I have a set of pages–each page has an image (exactly one), which was uploaded some time during last year. Now, since I somehow lost the files that were originally uploaded, I'd like to get all this images into one directory, so I can back it up for other uses. The problem is that I'd like them nicely named and in one directory, and copying/moving files/images in php was always a little black magic for me I'd like to do it this way: open a page with PW script get all the pages in one query for each of these pages, get its image save it into given (ANY on server) directory with '$page->name'.jpg name be happy and download the files. So, if any of you can help me out with the saving part (because everything else is dead simple), I'll be most grateful . Thanks
  17. I totally came here to wish this very same thing to everyone! Merry christmas and best everything next year!
  18. Adam Kiss

    For Antti

    I just thought you should know:
  19. Regarding autoinstall dependencies: I never understood why most of the CMS don't give some useful information about the modules. As I see it, you need two information for autoinstalled modules (everyone, in this case): whether user installed this module (yes/no) and how many other installedm modules have this module set as 'i depend on it'. And when you uninstall module, it can autouninstall all modules that are dependencies AND not user installed AND are not dependencies for other systems. Voilà, done. It also helps in other things - selecting dependencies to install, yearly mainenance e.g.
  20. Hey Nico, great idea! It'll sure come in handy, when we'll push initial list of modules, thanks.
  21. On some systems/setups, also X permission is needed – better to double check that as well.
  22. This topic has been moved to General Support. [iurl]http://processwire.com/talk/index.php?topic=803.0[/iurl]
  23. And regarding the installation instructions: new design is underway, so we might find a place for something like "you'll install it in 5 seconds through our uber-super-duper-greatest installer". Just FYI
  24. I'm thinking that the best bet might be educate here; since you see the name box only on the first of two screens when creating new page (I believe), it shouldn't be so hard. Also, it should be possible to hack this via some module (specifically for this client) – one that hijacks HTML on it's way out (maybe before:Page::render) and if it's this screen, find HTML for the name and switch it for something like 'URL part'
  25. Since Ryan already has more posts than all forum when I wrote this, it seems pointless. But it's great to see the progress PW is doing.d
×
×
  • Create New...