Jump to content

horst

PW-Moderators
  • Posts

    4,064
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. Hi interrobang, I cannot really follow what you are try to do - or I cannot find the specs for that the option can be a template filename: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/modules/PageRender.module#L244 http://cheatsheet.processwire.com/ $page->render() also doesn't show anything, but it could be that there is missing newer stuff because ist seems to stick with the 2.3 stable. From where do you get that with the template filename?
  2. I actually have build a site that is hosted by Hetzner in Germany and they have the badest setup for shared server that I ever have seen. PHP is only running as fcgi, not as apache module and the MySQL Server is not reachable via localhost but is on a different machine / IP. (so every request to the DB needs to use DNS-System too. I have the same site running for development at http://all-inkl.com - There it is running much much times faster! So, the owner will change to all-inkl now.
  3. Your code seem not to make any sense. 1) Please can you explain to me what the variable $image in the first line should hold. (and what it actually holds) 2) and what do you want to do with a loop in the second line? (and where does $images come from?) You should go step by step. FIrst you should inspect the first line of code. If this does what you expect / want, go on with the next step. And really, you should _read_ the doc kongondo has you pointed to, once or twice more.
  4. @pwired: if you really cannot use the drag-drop upload in the backend, you may use your own ftp upload, separated from the /site/assets/files/ folders. Something like this: - myImageUpload - site - wire With your uploadfolder you have to create subdirectories with the id of the pages / folders where the images should belong to. After successfull ftp-uploaded some images you can manually run an importerscript that scanns your uploadfolder and import the images via api. Also this script should delete the images (and folders?) in the uploaddirectory after import into PW. This way you will not have any drawbacks or side effects with the DB-(meta)data or sanitizing of the imagefilenames etc.
  5. I must say I cannot really follow what you have setup, but If you have to do a redirect for a whole site / domain, I'm pretty sure you cannot do it _after_ all PW-instructions in the htaccess. Instead you need to put it at first and the PW-stuff after it. BTW: to say "This does not work" is less helpfull for people who want try to help. For example: a detailed description of what you get when requesting a URL that should redirected would be much better.
  6. As far as I have noticed with my projects there are no problems with that. I store the choosen language in session and at the beginning of a respond in (head.inc or _init.php or something that like) I do a language check. So this is called with all requests, regardless of GET, POST, AJAX or whatever. It is no difference. EDIT: And regardless if you store it with a session or not, the urls you call in your ajax request will point (or should point) to the urls of the actually choosen language variation: if en is default your url could be "/parentpage/subpage/" and if you have a language de it would/should be "/de/parentpage/subpage/". Only the homepage "/" is different, that's why I use session and language checking.
  7. Ok, I think you 1) need to build fields for all the properties a object can have, 2) build a template and add all the fields to it and 3) than you create a root-page in the pagetree for the parent that may contain children. The children will be one page for one object. Whereas the first three steps can be done manually, the import of the objects should be done by a importer script. If you also can use a CSV-file, you can find a module for the import: http://mods.pw/j If you cannot, it's also easy to write your own individual importer-script. Please ask if you need further assistance. It would be good if you have a unique property for each object with your import-data.
  8. If I understand right, you have created an export-xml from all (content-)objects of a local version of your site?, - now you want to import it with the live-site? Does this export-file comes from a PW-Site or something other?
  9. I'm not sure, but maybe this can help? http://processwire.com/talk/topic/58-any-pointers-on-creating-a-mobile-version-of-a-site/
  10. horst

    Museum website

    Hi Mats, this is a comprehensive and well organized, good looking Site. Good work!
  11. Hi, Soma has said in the old thread somewhere that it would be nice to have a sortable table so that everyone can choose his/her fovourite sorting-column. And with the relation, or should it be better called weigthen?, it is a bit like with Pete is Nr 1 (id): I prefer it, so it is the initial used sorting But the jquery-datatables uses cookies to store your last settings. I have set it to 48 hours. And that, (trying out datatables), was the intention to set this up.
  12. Hi and a happy new year, I have found some old code from here and have put it together with the jquery datatables. The result is uploaded here: http://ranking.pw.nogajski.de/ Cheers
  13. @ryan: thanks for the support via PM. I haven't done any further work on that because I'm on vacation and only sometimes online via mobile. @ryan: thanks for the support via PM. I haven't done any further work on that because I'm on vacation and only sometimes online via mobile.
  14. Hi Ryan, thanks for the reply. PW reads them in by the filesystem and that seams to use the created or lastmodified timestamp. When I start uploading 5 images with names 001.jpg - 005.jpg together per AJAX (or a ZIP with the same 5 images) as the result the sort order is uncontrolled. Some small images first and all together very un-ordered. Both upload variations, AJAX and ZIP, are actually not very customer friendly if she has the need to use the images name as sort order. If the PHP-UNZIP will be implemented that it allows a controlled unzip and pw-import file by file, it would be helpfull for that. Alternative: a (optionally) configurable sortorder (by name or unsorted/by time) for imagefields would be nice.
  15. You can do a call with your selector but with a limit=2 for the getTotal() call. This has less overhead.
  16. Hi, I have bought a ProCache licency for 3-sites and have got one key together with the download link. When I try install it on a site I get an error: Unable to validate license key. Do I need to register it somewhere? If so, where? Or do I need to do something else?
  17. Hi, I use the zipupload for images with the default unzip command, I think. $config->uploadUnzipCommand = '/usr/bin/unzip -j -qq -n /src/ -x __MACOSX .* -d /dst/'; And everything works fine. Zip is uploaded, images are unzipped and added to the imagesfield. Except the resulting sortorder in the imagesfield isn't fine. If I have images like 001.jpg, 002.jpg, 003.jpg, ... I want to have this order with my imagesfield, but the images gets stored unorderd. How can I get the images stored in (alpha) numeric order with zipupload?
  18. Hey Martijn, - right, but I've thought it was this one, ...
  19. in the first post of the thread is the download link of a zip-archive: http://processwire.com/talk/index.php?app=core&module=attach&section=attach&attach_id=695 it contain pngs, pdfs, eps's and svgs
  20. Today I have added a hook to the module that add pim_* variations to pageimage-variation-collection. This is usefull to not have mass orphaned (pim_)images on the disk when original images got deleted. I have had this code ready for many weeks and would have done some more (workaround for GDlibs buggy sharpening on pngs with alpha-transparency) before update the module. But I haven't had time for this. So, there are no other changes in module version 0.1.1 what is available now at github and in the modules section. Cheers!
  21. Hi, maybe a bit OT but worth to mention I think: PHP has a nice function to create and open a pointer to a temporary file - but with the advantage that it first write to memory and only flush content to the disk if a specified amount of memory is reached: $mb5 = 5 * 1024 * 1024; $fp = fopen('php://temp/maxmemory:' . $mb5, 'rb+'); // then add content to the pointer ... fputs($fp, "hello\n"); // At the end rewind and echo out the content: rewind($fp); echo stream_get_contents($fp); The first 5 MB will kept in memory and if the content hits the limit it gets written into a temporary diskfile. see: http://www.php.net/manual/en/wrappers.php.php
  22. @retinafunk: WOW! --------- found this and thought it maybe of interest: https://github.com/webcreate/infinite-ajax-scroll/blob/master/src/jquery-ias.js#L630 ?
  23. Looks good. I'm actually working on a DB for a colleague and I have imported 2000 pages and 35.000 images similar like that. For testing I use breaks in the loop to just test only one import, or use a counter and import 5 or 10 images before breaking. When seeing it works well I comment the breaks. Also I make a SQL-Dump before testing/modifying/importing. And I write logfiles. And I love importer-scripts!
×
×
  • Create New...