Jump to content

adrian

PW-Moderators
  • Posts

    10,796
  • Joined

  • Last visited

  • Days Won

    346

Everything posted by adrian

  1. No problem here with 2.3.11 logging in with different IP addresses. Have you tried this setting in your config.php $config->sessionFingerprint = false;
  2. Moderna: http://modules.processwire.com/modules/moderna/ Although with all the new additions that Ryan has developed for the new default theme for the dev version of PW, I am now just using the default theme.
  3. landitus, I haven't tested with FormBuilder (I don't have a copy). The "error" is just a php notice. Even though I can't seem to reproduce it in normal use, I think it's just needs another check to make sure $value->$key is set. Regardless, it shouldn't stop the module from working. Is the formatting actually working for you when you output the results of the form somewhere?
  4. Not at the moment, although that is a great idea. I'll look into it and see what I can come up with.
  5. Yeah, sorry for the confusion - I did read the announcement post for jQueryDataTables, but when it came to upgrading ModulesManager, I apparently didn't put two and two together! So I can't read and apparently can't add up either
  6. Thanks kongondo - I didn't read things properly and assumed that the new data tables plugin would override the old one. I uninstalled the old, installed the new and the modules manager is working again!
  7. DataTables is working - see attached. v 1.0.0
  8. Hey Soma this sounds great, but I just installed JQueryDataTables which installed fine, but then I went to upgrade the ModulesManager and got this error: Warning: chmod(): Operation not permitted in xxx/wire/core/Functions.php on line 187 and this message whenever I try to open the modules manager: ModulesManager: ModulesManager requires 'JqueryDataTables' module since version 2.0. Any ideas?
  9. There are two PW modules (not available in the modules directory) that might be of use. They are both mentioned in this thread: http://processwire.com/talk/topic/1344-captions-for-images-in-tinymce/ One is by yours truly and is a PHP solution and another by teppo which used JS.
  10. Hey Joss, I have actually been playing around with your profile - everything looks great, but I did notice that the collapsed (mobile) version of the menu has "MENU" in grey with a weird box below it. I don't think this is expected behaviour. Any ideas?
  11. I am also using dsnmasq on my local dev setup and I think all you should have to do is uncomment this line in the standard PW htaccess file: RewriteBase /
  12. I thought I should also clarify that if you use Soma' approach, you will still need to iterate through the $images array like this: $images = $page->imageK1->slice(0,3); foreach($images as $image){ echo "<a class='fancybox' rel='gallery1' href='$image->url'>"; echo "<img src='$image->url' height='150'></a>" }
  13. PS There was a slight omission in my original code. I missed the counter to up the value of $i on each loop. This should work just fine to echo out the first four images $i=0; foreach($page->imageK1 as $image){ if($i==4) break; echo "<a class='fancybox' rel='gallery1' href='$image->url'>"; echo "<img src='$image->url' height='150'></a>" $i++; }
  14. If you're using Soma's slice approach, you need to use your image field: imageK1 echo $images = $page->imageK1->slice(0,3); Did you try $page->imageK1->eq(1)->url; rather than those first(x) which won't work because of what Soma mentioned?
  15. There are a few ways you could do this, but this approach is pretty straight-forward: $i=0; foreach($page->imageK1 as $image){ if($i==4) break; echo $image->url; } Or if you do want to specify the second image, you are looking for ->eq(1), remembering that numbering starts from 0, so 1 is actually the second image. EDIT: Sorry, see corrected code below: http://processwire.com/talk/topic/5359-acces-picture-1-to-4-of-an-imagefield/?p=51662
  16. Hey Soma, that has also bugged me a little about my module. The reason I went with that approach was to support users entering select options using Option 2: Option 2. MULTIPLE FIELDS - the first line is used for the field names and the first field must be 'Title'. Subsequent lines are the values for the fields, eg: Title, Number of Beds, Number of People, Kitchen Facilities Single, 1, 1, Fridge Only Double, 2, 2, Fridge Only Suite, 3, 6, Full Kitchen Obviously in this case it isn't possible to re-use existing templates. However, I would definitely like to improve the module so that if you're using Option 1: Option 1. TITLE FIELD ONLY - enter one option per line, eg: Single Double Suite you could specify the existing parent and child template to use. Do you have any specific suggestions that you think would be best practice? I am going to make my goal for the next release to be able to add "As used by Soma" to the module description EDIT: New version now allows for re-use of templates and also automatic creation of manually named templates if you want to override the automatically generated names (which are based on the field title).
  17. You should definitely look through that video and understand how these are built - it will be a great learning experience into how PW works, but once you do know, you can cheat with this module that allows very quick setup of all the different select types: http://modules.processwire.com/modules/process-page-field-select-creator/
  18. Hey Ryan - the small square isn't all the time and I think it may not be happening with more recent dev versions now that the background on the dropdowns is solid and there isn't a border property? Doesn't matter anyway now that you've fixed the permissions I agree with you in principle that generally sites shouldn't open new tabs/windows, but I think users have come to expect that links to external sites and internal links that can break a form submission will be in a new tab/window. Maybe it isn't critical in this case since it is a backend link and even content authors should be able to get used to it.
  19. Thanks Soma, I was trying to remember that option last night, but couldn't remember exactly what it was, or where I had used it.
  20. Hey Macrura, if I understand correctly, this module is working on the Admin, so you need to get the template of the page that is being edited. If you do $page->template / wire('page')->template, it won't work, because this will be the template of the "Edit" page, which will be the admin template. What you need to do is something like this: $page_id = (int) wire('input')->get('id'); $edited_page = wire('pages')->get($page_id); if($edited_page->template != 'camp') return; I think that should do the trick!
  21. More importantly, that Type Wonder site looks awesome - what a great idea!
  22. Also, don't forget about PW's $session variable, which may also come in handy in addition to cookies, or instead of, depending on your needs.
  23. Sounds like a good solution to me - the only thing you should need to pass to the form is the ID of the product (and maybe the number of them they are buying). You can grab all the other details via the PW API once you are at the form - you can even echo these out above the form so the user is sure of what they are buying. Then you can send these details to the form submission processing script to be used in the email via hidden form fields, or just get those details again from the product ID. If you are building a shopping cart with multiple items, then obviously you'll want to make use of cookies to store the product IDs and the number they are buying. Then the form script would read the cookies.
  24. Well there are lots of options here, but based on your first post it sounds like you'll be having them submit a form and then send the email, so all you need to do is include the code to send the email in the script that processes the form submission, which would then presumable redirect to another page to say their order/payment has been received. You could also send an email via an AJAX call. Lots of options, but if you have a more detailed question, let us know. You could certainly use a PW field, or a series of fields to contain the various components of the email so these are editable by your site authors. Hope that helps.
  25. You can use PHP's default mail function: $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); But personally I would recommend installing the free SwiftMailer class (swiftmailer.org). It is incredibly powerful and can easily send mail using SMTP, can include both HTML and plain text versions in the one send, allow you to add attachments which is great if you are using a PHP PDF generating class to automatically generate a receipt, and lots more!
×
×
  • Create New...