• Content count

  • Joined

  • Last visited

  • Days Won


bernhard last won the day on October 25 2016

bernhard had the most liked content!

Community Reputation

969 Excellent

About bernhard

  • Rank
    Hero Member
  • Birthday 09/20/1986

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Vienna, Austria
  • Interests

Recent Profile Visitors

9,654 profile views
  1. Hi @ryan thanks as always for your work and all the progress! may i ask about one special feature here that lots of us are waiting for since < 2016 and that was on the roadmap of 2016 and 2017 and still there are no news about it... I'm talking about client side image resizing... Roadmap 2016 Roadmap 2017 Please don't get me wrong - the intention of this posting is really not to point to you with my fingers (like "but you said you will do that..."). and of course, i could have tried to implement it on my own... but i'm not sure how much sense that would make. first of all, since it is on the roadmap for such a long time, it is risky to put effort in something that maybe solved by the core one week later and likely much better. secondly i'm not that familiar to javascript and last but not least, i think this should really be built into the core image field because i think that is a main feature of a content management software! if you don't think that you can make that happen soon it would be nice to know. maybe we could find someone in the forum that has the abilities to do it. i would also be happy to sponsor development, or at least a part, if someone else would be willing to join. ps: i know that we already have media manager and jquery file upload, but i don't think that this is a good solution. processwire is so easy and flexible in almost all situations that it just feels too bad to not being able to just put an imagefield on one template and make the client upload several large images and display them as a gallery... would really be happy to hear your opinion about that and of course, also the opinion of all the others
  2. great job! i already did a calendar using but without recurring events (thats a lot more difficult do implement and i see you also had to set a hard max of 2800 so far...). i guess you can count me to your customers before end of may 1) is the calendar custom css? can it easily be adopted to other styles/themes? 2) is there drag&drop support for events? i build this on fullcalendar+pw. but it's not a must have...
  3. you can just create a config-dev.php on your dev and pw will use this one (only if it is present, so you just have to make sure it does not get uploaded to your live site). interesting link. I'm thinking about this topic for quite some time and came up with this approach: but i think the most solid approach is to use the api (like the migrations module does or like i showed in the last posting). would be interested in your experiences though
  4. hi thor, if you copy over your files and database you will have an exact copy. only thing you would maybe have to change is the settings in /site/config.php (database settings, if you have different ones at dev and live). the only problem would be that you overwrite the data of the live website's database. for example if you had some user input while developing on your dev and then you upload your dev-db to your live-db you would lose this data. that's been discussed several times before (because it can be a littly tricky). see or migrations module:
  5. i didn't realize this part of his message and so i was totally confused by the posting of course you can loop over the returned array of images but not over the FIELD in a setup like he posted ( like $pagearray->fieldname ) maybe some selectors like this would be possible in your case? @oma
  6. I don't understand your question and maybe the others didn't as well because there is no answer so far... You cannot loop over an image field. You can loop over a pagearray and that's what you are doing. And you already have only one selector... Maybe you can use ->each() but that's quite the same, only shorter..
  7. Interesting, have to check my version because I also have image upload problems in one recent project. Is it related to images in repeaters in your case?
  8. I edited my post above. Sure you can have multiple super users but it also happened to me that I forgot the name of the initial admin and I had to find out in the database... User id 41 can be very handy to know in those cases
  9. Great tutorial Ben! $users->get(41) will always be the superuser It could even be a oneliner: $users->get(41)->setAndSave('password', 'mynewpassword'); But for tutorials it's sometimes better to be more verbose, so I would maybe show both ways.
  10. yes, that was the reason for my question i already have a query and it works well. it creates a db-view of all my data and then i can run an efficient query on this view easily without joining everything again manually. i think your pagefinder example code will save me some time next time together with tracy console panel
  11. hmmm thank you lostkobrakai for the quick response! i think my topic title was misleading... the problem is, that i have multiple queries in a foreach that i need to transform into a single sql query: $invoices = []; foreach($pages->find('template=invoice') as $item) { $invoices[] = [ 'num' => $item->id, 'client' => $item->client->title, 'net' => $item->getNet(), 'gross' => $item->getGross(), ]; } // output table of all invoice num | client | net | gross | --------------------------------------- 01 | john doe | 100 | 120 | 02 | max muster | 200 | 240 | getNet and getGross would be themselves a method like this looping all pagetable items: $sum = 0; foreach($invoice->items as $item) $sum += $item->net; return $sum; in my case i built a database view with all invoiceitems so that i can select everything easily and build sums quickly via sql sum(net) and not a slow foreach() $sum+=... the problem is just that is was really not easy to do all the joins and find the right fields and join them etc. maybe your code example could have saved me some time... or maybe there is an even better way? thank you again for your help!
  12. hi all! in my recent project i needed to query the database directly because of some heave datatables calculations that where too slow via $pages->find() operation in a foreach. so far, so good - everything works fine now. but the query got quite complex, hard to setup and hard to read (maintain). the problem is that you have to join all the fields to get all fields of one template. and this join operations can get quite confusing when you have lots of fields. any hints how i could simplify this setup?
  13. never mind, the simplicity of processwire was a big hurdle for many of us in the beginning ...and i'm still curious what setup would need lots of repeaters for structuring everything. usually you can keep everything very clean just by using different templates, different parents in the tree and doing the relations via pagefields. don't get me wrong. it's just my experience that whenever something felt complex/complicated it was most of the times a problem of my (or other forum users) setup i wish you lots of happy aha-moments
  14. you would not imagine how often i have thought that myself and then i found out how to do it the processwire-way and it just seemed too simple with something like a 3-liner "heavy use" of repeater sounds like you could maybe improve/change how you structured your content. in PW thats a very important part of your work. if you structure your project/data well, most of the time you end up with very simple and clean selector-calls like $pages->find('template=product'); // or $page->children('category=car'); of course that's just wild guesses, but if you want to share your setup i'm sure you'll get valuable feedback from lots of knowledable guys (and girls) here
  15. hi novalex! great that you found a way just take care if you have a more complex setup and need some advanced selectors the repeater setup COULD be a problem (or a little harder). if you have 2 regular fields forename and surname a selector would be: $pages->find('forename=john, surname=doe'); if you have a repeater setup, it would be: $pages->find('yourgroup.forename=john, yourgroup.surname=doe'); as long as it is simple like this it will work, but i can remember that it can lead to problems but don't remember exactly... just keep in mind that it could be easier to have "duplicate" fields and simple selectors than the other way round