-
Posts
87 -
Joined
-
Last visited
Everything posted by tinacious
-
Yes, please do! I'm flattered that it's the best you've seen. Thanks! Please share once you do. Thanks, Pete! Agreed! I think even though ProcessWire is easy for us, it still seems daunting for users. Having a library of videos to refer clients to sounds like a great idea! That was why I created it. I wanted to show clients how easily they could add content to their website.
-
I'm a Toronto-based web designer and developer. Tinacious Design is my ProcessWire-powered website and it includes my web design and development portfolio and information about my services. See the website here: TinaciousDesign.com The back-end uses a modified version of the Moderna admin theme. I also posted a video on Vimeo showing the behind-the-scenes process of adding a new portfolio item.
-
Thanks Ryan for this information. The ImageSizer thing sounds great. I will do this for images and have users later email me non-image files normally. Knowing that there is a solution for working with data attributes with the Form Builder, this will definitely be top of my list next time around. You seem to have taken lots of security issues into account. For form uploads and file handling, Form Builder seems like a great options for future projects. For this one, I will take the current path and use your ImageSizer recommendations. Thanks.
-
Interacting with the file upload field as a repeater field
tinacious replied to tinacious's topic in API & Templates
I will check the machine for this project when I'm in later this week to see what the memory limit. My home machine is at 128 but I've adjusted it since its default, which I can't remember off-hand. Both my home machine and the machine for this project use MAMP. I will check the limits for the other one later this week and keep you posted. Thanks. -
Ryan, thanks for that info on security. Using Diogo's example, would it be safer to get users to upload a file and have the download link available on the page created as opposed to emailing the file? I would like to use the ProcessWire file upload functionality to have users upload a file (and limit the file format). I'm just wondering how to handle that and pass it through ProcessWire and have it post to the new page that is created. In the email that sends I was thinking of just supplying basic information and a link to the new transaction page. That would avoid the need (and security issues) with emailing a file. Assuming I have a file field with the name and id of snapshot_file, I'm guessing I would create a file field and limit its types and then do something like: $snapshot = $input->post->snapshot_file; // and in the new page creation section $tr->snapshot_field = $snapshot; I'm just wondering the specifics of passing a file through ProcessWire into a field, e.g. file sanitizer, etc. The Form Builder looks like a great option. It sounds like you've already thought of everything for it. As someone who loves to have control over my markup and CSS, I was avoiding this option because of the need to use a jQuery UI theme and the extra work required to workaround the way it outputs the HTML, assuming that it renders the form similar to FormTemplateProcessor in that it outputs the HTML in an unordered list. One of the plus sides to this is there are lots of classes to work with in the CSS! For this project I'd like to continue on this path but as Form Builder is a quick way to make forms, I can definitely see myself choosing it for quicker development in the future, especially for larger forms. For this form I needed to add some data attributes for use with jQuery. As a somewhat off-topic question related to Form Builder, is the ability to add attributes (specifically data attributes) to inputs an option with the Form Builder?
-
Interacting with the file upload field as a repeater field
tinacious replied to tinacious's topic in API & Templates
Yep. I added them in myself. I've attached a screenshot. All the other file formats I've added have been uploaded successfully just not PPT or PPTX. I get stuck at this 100% page forever and the description field never appears. Also if I save it doesn't upload either. It doesn't work if I zip it either. Uploaded successfully: swf, png, jpg, pdf, doc, docx -
Interacting with the file upload field as a repeater field
tinacious replied to tinacious's topic in API & Templates
OH I was just being super redundant trying to make the file field a repeater when it already had that functionality. Duh. Thanks nik! Unfortunately I'm still having problems uploading PPT and PPTX files. They are well under the allowed file size. Even zipping them doesn't make this happen. Has anyone else had this experience? -
WOW diogo, thank you! After a really long time trying my hand at this I was finally able to get it to work! That's amazing, thanks! One more thing... Just to complicate things EVEN more... I wanted to upload files and have them emailed through this form as well. How would I handle files for this? I'd also like to restrict it to images and zip files. <input type="file" id="screenshot" name="screenshot"/> I'm guessing something like this: $screenshotfile = ; // not sure what to do here to grab the file $tr->screenshot = $screenshotfile; // then create a file field for the template in PW Thanks for your help!
-
I've created a repeater field called supporting_files. In it there is a file field called file. The file field has one description field. I am having more than one problem with this: Initially when it loads, I've set it to show 3 but it doesn't show any. When I click "Add" it tells me I have to save to be able to use it. I cannot seem to upload a PPTX file, although maybe it's just huge and not not responding. Normally it tells me the progress for images but for files it doesn't seem to so there's no way of telling if it's uploaded successfully. How do I grab this information? I've tried to grab it like this: <?php if($page->supporting_files) { foreach($page->supporting_files as $file) { echo $file->file->url; // this shows the path to the folder where the file is but not the file's URL echo $file->file->description; // this doesn't show anything } } ?> Unfortunately that doesn't work. From what I remember this is how I've interacted with image fields and repeater fields, though I've had problems with the repeater field before (but it has been updated and fixed since then). I haven't tried interacting with single file fields yet so I'm not sure if it's the file field that's the problem. It uploads to the file system just fine, I see it there, but how do I grab the URL and description? This also only outputs 1 line when I have 4 files uploaded though only the PDF seemed to have successfully uploaded, the PNG, SWF and PPT did not—I was just grabbing random files. It outputs the path to the folder the file is in on the file system but it doesn't get the complete path. In the screenshot you'll see just one file but I've tried it with many. So essentially, $file->file->url outputs the folder it's in and it only grabs 1 of 4 files. If you need more info to help me, let me know. Thanks.
-
Thanks, that's very helpful!
-
Hello. I have a client who wants the ability to upload a large file (~350 MB) and share it. I'm wondering if there will be any issues with uploading large files through ProcessWire and what should be done to prepare to make sure this all runs smoothly before I begin development. Thank you for your help.
-
Hi Diogo, thanks for including some code. I think I can figure out the jQuery part with what you supplied but the ProcessWire part still seems a bit complicated. Here's an example of a form I've started in my order.php template which will be accessible from domain.com/order <div class="section"> <div class="container"> <?php echo $page->body; ?> <form id="orderForm"> <label for="customer_name">Full Name</label> <input type="text" id="customer_name" name="customer_name"> <label for="email">E-Mail</label> <input type="email" id="email" name="email"> <label for="quantity">Quantity of Product</label> <input type="text" size="5" name="quantity"> <h2>Add-Ons</h2> <input type="checkbox" name="addons" value="firstoption"><span>Add-on 1</span> <input type="checkbox" name="addons" value="secondoption"><span>Add-on 2</span> <input type="checkbox" name="addons" value="thirdoption"><span>Add-on 3</span> <h2>Do you want this premium service too?</h2> <input type="radio" name="premium" value="YES"><span>Yes</span> <input type="radio" name="premium" value="NO" checked><span>No</span> <input type="submit" value="Submit Your Order"> </form> </div> </div> Would my PHP code look something like this? $page->of(true); $page->customer_name = $sanitizer->text($input->post->customer_name); $page->customer_email = $sanitizer->text($input->post->email); $page->quantity = $input->post->quantity; $page->add_ons = $input->post->addons; $page->premium = $input->post->premium; $page->save(); The form action would be domain.com/order and the method post? I want to email the values to myself. I'm not 100% sure how to do that with the ProcessWire API outside of the FormTemplateProcessor module. EDIT: I tried the above and it definitely didn't work. I guess I'm not sure how to go about doing this.
-
Hello everyone and thanks in advance for your help. I am looking to create an order form with a list of services where clients can choose which services they would like to pay for. I require some to have a text field to specify the quantity, others will be multiple choice with checkboxes, and others will be yes/no radio buttons. I wanted to elect a price to each item so when the item is selected a corresponding price that is associated is added to the total, which ideally would be displayed somewhere in a sidebar/always in view so that the users can see the price change as they add/remove services. This part I'm assuming would need to use jQuery/Javascript. I also want it to support file upload and to email the form to me. I was looking at a variety of modules: I have worked with the FormTemplateProcessor module before for sending basic contact forms via email. I like it and was considering using it to build this form. I'm still unsure about integrating payment processing and price updating features I was looking at incorporating. [*]I was also looking into the premium ProcessWire Form Builder. This looks like the easiest way to build a complex form. The only down side I can see is having to choose a jQuery UI theme, though I read I could create my own using ThemeRoller, though I generally prefer to have full control over form element styles in my stylesheet. Also for this one I'm unsure about how to integrate payment and price updating [*]Shop-for-Processwire module also looks great for a shopping cart and check-out scenario This looks like a great base to work with for the payment processing, as well as displaying an accurate price (though it seems like it would require a page load) I'm not sure how to go about translating a product/shopping cart scenario into an order form scenario. Also I'm not sure how well it would play with a file upload, though I haven't tested it. Can I add some hidden value to each of these items somehow, and with jQuery have these values add up and display a price, and with ProcessWire/PHP have it do the same and send a tallied price to my email, with a list of services, etc.? Does this price tallying need to be done twice, once in each language? With all of this research I still can't figure out what is the best approach to take to accomplish this task. Am I on the right track? Can anyone guide me in the right direction? Hopefully this question is clear. If not, please let me know and I'll add more details. Thank you for your help.
-
Almonk, this is a great module. Is it possible to get the PDF to render the print version of the page instead of just the items on the page? I poked around and noticed it grabs the body but am wondering how to get it to grab other items—I think I have a pretty good idea about this—along with the markup I've created for it in the template file. Is this possible? Like, PDF the page as I have created it, after PHP renders it? I'm unfamiliar with PDF generation so I'm not sure if this can be done but I thought I'd try asking. Thank you!
-
Hello. I find that when I make new ProcessWire sites I am often re-creating similar fields and templates. Is it possible to export/import/reuse this "setup" easily? I don't want the content just the fields and templates. Is this possible? I guess I'm looking for a solution similar to Drupal's Features export. Thanks for your help.
-
Hi everyone. How do I get ProcessWire to echo the date? I've created a new field using the datepicker called pub_date. When I use $page->pub_date nothing shows. Is there more to it than this? Thanks.
-
Migrating ProcessWire from localhost to web host
tinacious replied to tinacious's topic in General Support
Strange... This worked for me the first time and then I go to try it with another site it didn't work. Luckily, exporting and reimporting the SQL database is easy. -
Hi everyone, I would like to target the last image in the fieldset and apply a specific class to it. How would I do that? I've tried this and it applies it to all: if(($page->images->last()->name) == 'whatsnext.png') { echo $whatsnextclass; } It's not targeting that specific image, it's just checking to see if that exists. I don't know how else to go about this. Help please? Thanks!
-
Amazing. Thanks.
-
To fix this after the fact I just deleted those unpublished fields and re-added them. So basically: do not "Save without Publishing" on repeater fields otherwise you won't be able to publish those fields.
-
There is a bug with the repeater fields. You can't create more than a certain amount, and if you do you need to publish the page because if you save without publishing, those fields will be marked unpublished and there's no way to publish just one of the repeater fields in that group. Weird.
-
Ok so I re-created the page using the template. It seems as though this bug—where the repeater fields do not appear upon publish (but show perfectly in preview)—happens if you modify the template while you're creating the page. Once the template has been created, you can create a page and it'll be good to go. Recreating the page is a work-around to this until it is fixed.
-
I'm also having a similar issue. When I create and preview the page, it shows up great. When I publish it, it doesn't show up. I'm also using repeater fields. There must be a bug with it or something. Here is my code: <?php $counter = 1; foreach($page->step as $item) { $step_title = $item->single_line_text; $step_desc = $item->message; echo '<div class="hire-number"><p>' . $counter . '</p></div><div class="hire-main">'; echo '<h2>' . $step_title . '</h2> <p>' . $step_desc . '</p></div>'; $counter++; } ?> I will try creating a new template using the fields and see how it goes.
-
This looks amazing. I was just thinking how I need to use this feature for a site I'm building and this is perfect. Thanks.