Jump to content

benbyf

Members
  • Posts

    804
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by benbyf

  1. OK soooooooo, may have fixed it. Doing everything over Ajax and somehow it was working originally using the basic implemtation in the docs. However I finally got to the bottom of it and it wasn't keeping take of the price after returning from Stripe to finalise. So I added a flip flop variable for the price so if it's not there it grabs it from the session. $amount = $itemPage->price; // save price for later if($amount == 0){ $amount = $session->get('price'); }else{ $session->set('price',$amount); } $payment->addProduct($title, $amount, 1);
  2. I acheived a subscription service on this site http://betaville.co.uk/ using the PaymentStripe module as payment and my subscribers module with some tweaks. Although note that I'm in the process of creating a new members module set that will supersed the subscribers module.
  3. Amazing, I'll check this out. My question would be through would it still allow one user logged in using two fingerprints (e.g. logged in on my phone and laptop)? Sounds promising.
  4. Is there a way to restrict logins for users so that one user can't be loggedin in two places at the same time? e.g. auto logout user after inactivity (of say 15 minutes..?), or logout action and disallow login if user still "logged in" somewhere?
  5. Let me know if you still need someone for the work hello@benbyford.com
  6. I run all private projects on Bitbucket and open source on GitHub. Never had a problem with either for small and medium sized web projects mainly.
  7. Always liked this and sums up how we should be thinking. Make things better people :) https://t.co/7le0meiC48

  8. Do we really need a new PW.com theme? Think the new admin theme update will be a great help and a dedicated store for modules will help if we can make that happen. Think the current PW is fine for now, with other lower lying fruit.
  9. RT @Lady_Ada_King: re CSS, Just cause something is easy to get started with does not mean it is simple or easy to master. Same applies to l…

  10. I tend to do this sort of thing where I attach all the user based fields to the current user i.e. $user->fieldname instead fo creating a new page each time, then simply create a profile template shows those fields. which is fine if you have to be logged in, in your case you could enable page url partials in the profile tamplte and look for the partial (your user name input) to get the same effect.
  11. PaypalPayments - having problem on Process step not validating. There was an error, which went away after chaning the settings to use Curl, but now it always returns "Payment canceled or something went wrong" after sucessful retunr from paypal. I orginally had different pages for each checkout item, but now doing the whole checkout process on one url. @apeisa Happen to know what might be happening here at all? Thanks!
  12. RT @TechCrunch: 5 reasons why Apple's animoji are dumb https://t.co/zooXFIq3hk https://t.co/K6jHxUFOU0

  13. @APPG_AI the event today being live streamed somewhere?

  14. Works well if you change null for $this. Was erroring before.
  15. yep, if you look at the first post error this is the module that was having the issue reported on it.
  16. True, but it was mainly to get faster page speeds so the resizing was needed. however it doesnt seem to work for some reason (gif's are bloaty)
  17. AHHHHHHH worked it out. Silly me, think it's actually something i've hit on before in PW, it doesnt like resizing gif's My code was this: $imageSmall = $image->width(460); $imageMedium = $image->width(720); echo '<div class="slide"><img src="'. $image->url .'" srcset="'. $image->url .' 1440w, '.$imageMedium->url.' 720w, '. $imageSmall->url .' 460w" alt="'.$image->description.'"></div>'; now is this and works like a dream taking out the resizing for gif's: if($image->ext == "gif" || $image->ext == "GIF"){ echo '<div class="slide"><img src="'. $image->url .'" alt="'.$image->description.'"></div>'; }else{ $imageSmall = $image->width(460); $imageMedium = $image->width(720); echo '<div class="slide"><img src="'. $image->url .'" srcset="'. $image->url .' 1440w, '.$imageMedium->url.' 720w, '. $imageSmall->url .' 460w" alt="'.$image->description.'"></div>'; }
  18. That seemed to produce an even worse Apache level error it was super scary
  19. gif's dont store dpi data, however I did manage to upload a tiny giff and its works but over 2mb its crashing, is it maybe a memory allocation setting somewhere that needs increasing? I'm running Nginx
  20. Running into Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 12288 bytes) (line 190 of /srv/users/serverpilot/apps/hortons/public/site/modules/ImageAnimatedGif/ImageAnimatedGif.module) I'm running PW 3.0.42. Not come across this before on a image field with a gif uploaded, anyone have any insight? Thanks
  21. benbyf

    DropboxAPI

    great, will be sending you some Pull Requests in the near future
  22. benbyf

    DropboxAPI

    Hi! Great module. Two requests: Could the token step be incorperated into the admin settings or a required Process module? I've been thinking for ages to whether it was possible to view the contents of a folder from dropbox on your site and create public links to files - use case: upload your resources to this folder in dropbox and they'll automatically appear on the site? Thanks!
  23. Just for other peoples reference I've been using @adrian's coding here: as a function in my module: protected function createRepeater($repeaterName,$repeaterFields,$repeaterLabel,$repeaterTags, $icon){ $f = new Field(); $f->type = $this->modules->get("FieldtypeRepeater"); $f->name = $repeaterName; $f->label = $repeaterLabel; $f->tags = $repeaterTags; $f->icon = $icon; $f->repeaterReadyItems = 3; //Create fieldgroup $repeaterFg = new Fieldgroup(); $repeaterFg->name = "repeater_$repeaterName"; //Add fields to fieldgroup foreach($repeaterFields as $field) { $repeaterFg->append($this->fields->get($field)); } $repeaterFg->save(); //Create template $repeaterT = new Template(); $repeaterT->name = "repeater_$repeaterName"; $repeaterT->flags = 8; $repeaterT->noChildren = 1; $repeaterT->noParents = 1; $repeaterT->noGlobal = 1; $repeaterT->slashUrls = 1; $repeaterT->fieldgroup = $repeaterFg; $repeaterT->save(); //Setup page for the repeater - Very important $repeaterPage = "for-field-{$f->id}"; $f->parent_id = $this->pages->get("name=$repeaterPage")->id; $f->template_id = $repeaterT->id; $f->repeaterReadyItems = 3; //Now, add the fields directly to the repeater field foreach($fieldsArray as $field) { $f->repeaterFields = $this->fields->get($field); } $f->save(); return $f; } // usage public function install(){ $fields = array('title','body'); $this->createRepeater("text_repeater",$fields,"Text repeater","", "file-text"); }
  24. Done quite a bit of Googling and haven't quite worked out how one would create a field of type repeater and add fields to it via the API in a module. Anyone have any links or examples?
×
×
  • Create New...