Jump to content

cb2004

Members
  • Content Count

    305
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by cb2004

  1. Just as I was about to call it a night, here it is: $secureFile = $pages->get((int) $input->urlSegment1)->filesSecure->findOne("basename=$input->urlSegment2"); $options = array( 'forceDownload' => false ); if($secureFile) $secureFile->download($options); else throw new Wire404Exception();
  2. I cant seem to get downloadFilename to work with this, anybody else? $secureFile = $pages->get((int) $input->urlSegment1)->filesSecure->eq((int) $input->urlSegment2); $options = array( 'forceDownload' => false, 'downloadFilename' => $secureFile->basename ); if($secureFile) $secureFile->download($options); else throw new Wire404Exception(); It just comes in as 'download'
  3. Still love this module @Wanze. Does anynody elses files stay on the filesystem when deleted?
  4. Awesome module @bernhard, adding it to my default installation profile.
  5. I think the carousel implementation is perfectly done. Well designed, and perfect auto scroll speed. As for the whole site, great job people. As for the link you provided @Beluga, I would respectfully disagree. Running 100s of sites, especially ecommerce, carousels contribute to a massive spike in product sales. Dont read what works for others, implement what works for you.
  6. I would say go with another solution for now. I respect Kongondo for not rushing this out to market, it makes me more more excited to see it. Software development should never have timescales unless you are dealing with a client, which I know you are, but lets not rush good work. I am guessing this shouldn't even really be called Padloper anymore, so I wouldn't expect a free of charge upgrade, and in fact I hope there is no license fee reduction just because you have the previous version. I would like to reward Kongondo for his work as I do Ryan by purchasing his Pro modules, even if I don't use them.
  7. Hi everybody, I hope you and your closest are staying safe. I have potentially been staring at this a bit too long and have lost my train of thought. I have created a new action in admin using this hook (just in case it is useful to anybody) where I want to export the children to a CSV file (event participants): <?php $wire->addHookAfter('ProcessPageListRender::getPageActions(template=80)', function(HookEvent $event) { $page = $event->arguments[0]; $actions = array(); $actions['export'] = array( 'cn' => 'Export', 'name' => 'Export', 'url' => $page->url.'export/', ); if(count($actions)) $event->return = $actions + $event->return; }); Here is then my code for the CSV: if($input->urlSegment1 === 'export') { $array = $page->children->explode(function($item) { return array( 'title' => $item->title, ); }); $fp = fopen("{$page->name}.csv", 'w'); foreach ($array as $fields) fputcsv($fp, $fields); fclose($fp); } The CSV is getting created just fine, but how would I send this straight to the user (and then delete). I know about Batch Child Editor and that is a fantastic module, I just wanted to create something quick (easy) but its consumed my brain cells for the last hour. Cheers all.
  8. If you switch advanced mode back on in config, go to the template Advanced tab and uncheck this right at the bottom you should be golden.
  9. I hate hate hate hate (repeat however many times you would like) to say this, but WooCommerce is my weapon of choice for eCommerce. For the level of my client base, they are on the understanding that if I say I am not doing that with this software and you would need something more highend and secure, then they are ok with the functionality. That will be the only time you will ever hear me talk WordPress on here (until the new Padloper comes along). But, I did check out the module by @Gadgetto that @bernhard was talking about, and it is impressive. Yes you can plug everything into the frontend yourself with Snipcart, but the backend integration is lovely. If you are worried about the fees, then in my experience, you have a product that has too many competitors and there will always be somebody out there undercutting you. Just roll something out with a slightly higher price otherwise, test the water and adapt from there.
  10. Never commented on how this makes every default install I have, love it.
  11. Exactly, I am always on the latest dev version whenever I need to work on a site as it is so easy to update, and it is always stable in my eyes.
  12. Same here. Any chance of a fix @Wanze. I use this module a lot.
  13. My bad this time, <property> contains more data so I wouldn't be able to just use children()
  14. Here is some example XML <?xml version="1.0" encoding="utf-8"?> <branches> <branch> <properties> <property> <bullet1></bullet1> <bullet2></bullet2> <bullet3></bullet3> <bullet4></bullet4> <bullet5></bullet5> <bullet6></bullet6> <bullet7></bullet7> <bullet8></bullet8> <bullet9></bullet9> <bullet10></bullet10> <bullet11></bullet11> <bullet12></bullet12> <bullet13></bullet13> <bullet14></bullet14> <bullet15></bullet15> <bullet16></bullet16> <bullet17></bullet17> <bullet18></bullet18> <bullet19></bullet19> <bullet20></bullet20> </property> </properties> </branch> </branches> Without testing your code would just increment the counter in every property, and not every bullet. I am doing each one per line for now, but still wondering how to get this down to a few lines.
  15. Hi all, I think I have been looking at this too long and I am sure it is so simple. I am reading an XML file and it contains bullet points 1 to 20. Here is example code: foreach($xml->branches->branch->properties->property as $property) { if($property->bullet1 != '') $bullets .= "{$property->bullet1}\n"; } That would read the first bullet point, and then we have $property->bullet2 etc etc. Obviously I could list all 20 like that and just go with $p->myField = $bullets but how would I make this into less code. I was thinking of a foreach within the above foreach foreach(range(1, 20) as $bullet) { $li = '$property->bullet' . $bullet; $bullets .= $li; } And lots of variations of but thats drawing a blank. Cheers as always people.
  16. I have a scenario where I would like to lock down a PDF download, but still display an image of the PDF. I can display entries with check_access=0 but is there a way to use this on an image field?
  17. I am terribly bad at Ajax, I don't mind admitting it. Where would I start with picking a select in the form and then loading the children in another select on the form until there are no more children. @kongondo is this something https://processwireshop.pw/plugins/dynamic-selects/ can do? If yes sign me up.
  18. I wouldn't explore multi-site anymore. You could spit out a feed from site A and read it on site B. You could even import them into site B. I am on mobile right now, but we do this quite regularly so could post an example when I am in the office. RSS, XML, lots of options.
  19. Could this be related? This is an image field set to have just 1 file. Will try getUnformatted when I get a mo.
  20. So I have this working using: $session->redirect($page->file->url); However I tried using $http->sendfile and $files->send as I thought they would be better but they didn't work. Any thoughts?
  21. Hey @Macrura, so glad you are taking this on. Agree it is stable, just needs a little love. In the fork made by @gebeer this supports the regions US and EU, would be great if you could get this into your fork.
  22. I am coming up against a bug where I cant make use of the functionality 'Name format for children', and it doesn't seem like a hook is possible to save the name: $wire->addHookBefore('Pages::setupNew', function(HookEvent $e) { $page = $e->arguments(0); if($this->input->parent_id === '1') { $page->name = 'some-name'; } }); I have tried many solutions from the forums, nothing is achieving what I would like, even for example if I am trying it on the home page like the code above. Any help would be much appreciated.
  23. Yep, my bad. awesome job on that one. I just had to change 'template=user' to 'template=46' or 'template=members-detail' as my users are not within the normal section for this site.
×
×
  • Create New...