Leaderboard
Popular Content
Showing content with the highest reputation on 05/20/2017 in all areas
-
Introducing our newest [commercial] module: Recurme Processwire Recurring Dates Field & Custom Calendar Module. http://www.99lime.com/modules/recurme/ One Field to Recur them ALL… A Recurring Dates InputField for your Processwire templates. The InputField you’ve been waiting for. Complex RRule date repeating in a simple and fast user interface. Use the super simple, & powerful API to output them into your templates. example: <? // easy to get recurring events $events = $recurme->find(); // events for this day $events = $recurme->day(); // events for this week $events = $recurme->week(); // events for this month $events = $recurme->month(); ?> <? // Loop through your events foreach($events as $event){ echo $event->title; echo $event->start_date; echo $event->rrule; echo $event->original->url; ... } ?> Unlimited Custom Calendars. Imagine you could create any calendar you wanted on your website. Use recurring events with the Recurme field, or use your own Processwire pages and date fields to render calendars… it’s up to you. Fully customizable. Make as many calendars as you like. Get events from anywhere. Recurme does all the hard date work for you. Unlimited Custom Admin Calendars too. Hope you like it , Joshua & Eduardo from 99Lime. ## [1.0.1] - 2017-05-29 ### changed - Fixed $options[weekStartDay] offset in Calendar - Fixed ->renderCalendar() Blank Days - Fixed missing ->renderList() [renderMonth][xAfter] - Removed ->renderCalendar() <table> attributes border, border-spacing - Fixed ->renderCalendar() excluded dates - Fixed rrule-giu.js exclude dates - Fixed ->renderList missing space in attr ID (shout out to @Juergen for multiple suggestions & feedback).16 points
-
@ryan, you mentioned Pro module updates in this week's post. When you're working on the pro modules it would be great if you could give the pro module documentation some attention. The documentation that does exist is only in the pro module subforums and the forum post format doesn't provide a good interface for browsing or searching individual module methods or for formatting the documentation and code examples. It is much inferior to the current core API reference docs, which doesn't seem right considering the pro modules are premium commercial products. Keeping the documentation in the pro forums also has the effect that if a pro module purchaser does not renew their support/upgrade license then they are cut off from the documentation. Not that cost of ongoing support/upgrades is unreasonable (your pro modules are fantastic value for money) but I think the essential documentation should always be available to pro module purchasers. A third-party pro module was launched today and the presentation of its features and documentation is excellent. This got me thinking about the issue.4 points
-
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: https://modules.processwire.com/modules/migrations/ https://processwire.com/blog/posts/introduction-migrations-module/3 points
-
@Roych, you might find it easier to stick with your original event markup (i.e. as primarily HTML) rather than echoing the entire event markup in PHP. You can switch in and out of PHP as much as you like, and treat PHP similar to how you would work with a template language like Twig or Smarty: <?php $events = $pages->find('template=calendar-post, limit=8, Start_date>=today, sort=Start_date'); ?> <?php if(count($events)): ?> <?php foreach($events as $single): ?> <!-- Event --> <li> <div class="date"> <span> <span class="day"><?php echo strftime("%d", strtotime($single->Start_date)); ?></span> <span class="month"><?php echo strftime("%h", strtotime($single->Start_date)); ?></span> <span class="year"><?php echo strftime("%Y", strtotime($single->Start_date)); ?></span> </span> </div> <div class="event-content"> <h6><a href="<?=$single->url?>"><?=$single->title?></a></h6> <ul class="event-meta"> <li><i class="fa fa-clock-o"> </i> <?php echo strftime("%H:%M", strtotime($single->Start_date)); ?><sup><?= $out = __("h"); ?></sup></li> <li><i class="icons icon-location"></i> 340 W 50th St.New York</li> </ul> </div> </li> <!-- /Event --> <?php endforeach; ?> <?php else: ?> <p>No upcoming events at this time!</p> <?php endif; ?>3 points
-
2 points
-
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 though2 points
-
Hi @rick, I can't share my custom profile because it contains pro modules. And it's set up to suit my preferences and idiosyncrasies which would surely be different for each person. But it's very easy to make your own custom profile. If you find yourself installing the same modules or creating the same kinds of page structures over and over for each project then the idea is: Create a new installation on your localhost using the "blank" profile Customise /site/config.php how you like, e.g. imageSizerOptions, useMarkupRegions, setlocale() Install your favourite modules - include the Site Profile Exporter Set up any admin tweaks with AdminOnSteroids and/or AdminCustomFiles Create the fields, templates and template files you tend to need for every new site (it doesn't hurt if there are some that aren't always used as you can always delete them in any project that doesn't need them) Create any page structures you want to have pre-existing (I have a "news" section, and a "selects" section for Page Reference options) Export your site profile Then when you are creating a new project you just copy the profile folder to the root before installing PW and select it during the install process. I keep my starting profile on localhost and update/re-export it from time to time with the latest module upgrades and any new tricks and tweaks I have learned.2 points
-
This week we’ve got ProcessWire 2.8.62 (corresponding to 3.0.62 master), a look at some current work-in-progress, and some nice momentum in ProcessWire usage and market share. https://processwire.com/blog/posts/new-2.8-version-current-projects-and-pw-usage/1 point
-
Tag will be removed when re-edit body field. A video demo worth thousand words.1 point
-
This is what I have done, the problem is, the custom page label format does not display in the select dropdown. Am I missing something previously stated? EDIT: You are right Robin S, thanks for the clarification it was a typo on my behalf. Now working as expected. (Yes I feel stupid)1 point
-
Hi All, I am trying to allow users to upload a profile image. What I've done: Created a new field (crop image) called "avatar" and added this to the users template Using the code shown below I can successfully upload images. What I'm not sure of how is: Is the field type correct and best way How to display the thumbnail of the image once uploaded thanks <?php $upload_path = $config->paths->assets . "files/avatar_uploads/"; $f = new WireUpload('avatar'); $f->setMaxFiles(1); $f->setMaxFileSize(5*1024*1024); $f->setOverwrite(true); $f->setDestinationPath($upload_path); $f->setValidExtensions(array('jpg', 'jpeg', 'png', 'gif')); if($input->post->form_submit) { if(!is_dir($upload_path)) { if(!wireMkdir($upload_path)) throw new WireException("No upload path!"); } $files = $f->execute(); if ($f->getErrors()) { foreach($files as $filename) @unlink($upload_path . $filename); foreach($f->getErrors() as $e) echo $e; } else { //$u = $users->get($user); //$u = $user->name; //Save the photo to the avatar field $user->of(false); $user->avatar = $upload_path . $files[0]; $user->save(); $user->of(true); @unlink($upload_path . $files[0]); } } ?> <form class="forum-form" accept-charset="utf-8" action="./" method="post" enctype="multipart/form-data" > <input type="file" id="attach" name="avatar" multiple="multiple" accept="image/jpg,image/jpeg,image/gif,image/png" /> <input type="submit" name="form_submit" value="Submit"/> </form>1 point
-
The reason it wasn't detected was, that no module was in the root directory of the module, but all each of the three modules resides in its own subdirectory.1 point
-
Ok, I got it. It turns out it's because this particular site is still using php v5.3.x which doesn't like the "Array Initialization Construct: []" I've worked around it by using "array(" instead: $result = $MailChimp->post("lists/$list_id/members", array( 'email_address' => $page->email, 'status' => 'subscribed', )); Cheers, Paul1 point
-
I recommend: https://processwire.com/blog/posts/introducing-tracy-debugger/#mail-interceptor-panel When Adrian is back, we should ask him to add a setting which makes it possible to always intercept emails in DEVELOPMENT mode of the module, so that we do not forget to set it.1 point
-
@horst, I can see how that upgrade would be difficult to do gracefully. Will post back if I have any ideas. Regarding CroppableImage3 and the ProcessWireUpgrade module: I think the reason why the upgrades module doesn't see available updates for CI3 is due to the module class name that is showing in the modules directory. The class name shown is "CroppableImage3" but I'm not sure where that comes from because it isn't actually a class name that is used in the modules (correct me if I'm wrong). Did you enter that manually? Or maybe it comes from the name of the GitHub repo? When the upgrades module queries the modules directory it is looking for the classnames... FieldtypeCroppableImage3 InputfieldCroppableImage3 ProcessCroppableImage3 ...but it doesn't find a match for any of these, therefore they are left out of the table of upgradable modules. Maybe it would be best to follow the example of several of the other fieldtype modules, where the primary name of the module would be FieldtypeCroppableImage3 even though it auto-installs two other modules.1 point
-
+1 But why not the "full documentation"? I purchased ListerPro without actually knowing what I'm gonna buy, I was just wild guessing. I do like what I have but was surprised by the low number of Actions it comes with, for example. I've also been thinking about ProFields, but descriptions and proper examples of the usage of those fields are scarce, so I cannot really see if I really need them or all the features I need can be done with the built in core fields. Speaking of ProFields, they are listed here: https://processwire.com/talk/store/ But there is this one here: http://modules.processwire.com/categories/premium/ which is rather outdated as far as I can see. And there are the old video demonstrations, also rather outdated.1 point
-
I will update module with latest phpFastCache (v6). I think this update will come next month.1 point
-
great job! i already did a calendar using https://fullcalendar.io/ 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...1 point
-
1 point
-
Yeah, I forgot the config file, you are right, I will take a note as the dev has different settings and logins of course. So basically that means having a live copy? Sounds great! I actually did this just an hour ago, and indeed, my other site is an exact copy. But it's just a few pages and test data, so it was not a problem. Now with live data in the future. I don't think that would be a big problem unless you let users create tables and fields on your live site. Let me explain why (and please correct me if I'm wrong). Unless you change fields name by renaming them which you created before, which is not something people usually (and PW even warns about that regarding data loss) from the short time I tested the software it seems it creates a new ID and tables for everything. So it's very unlikely you will end up with the same ID for a new field, page, user, etc. If you just copy the dev DB to the live DB then, of course, that would overwrite everything, including your production data but that is not how I would do it. I would compare the DB and tables and just merge the differences (the dev would usually have the new stuff but no data). And differences would just be the new fields, pages, etc. which don't exist yet on the live DB, so there would be no data there to overwrite there. Maybe I'm wrong, but PW creates a new table for fields, so those will not exist in the live site yet. Now, if you let users create pages and other things, then you are probably right, and I see how that can create a conflict. In that case, maybe you can do the opposite before starting developing. Copy the production BD over to the Dev DB so you have a similar match. Personally, I never did that because I'm always afraid of using real users data with testing sites, in case it emails them something for example while I'm testing to a real customer with a real email. So usually I just use dummy data on my dev installations. This is what I use for databases in case someone is wondering: http://sqlyogkb.webyog.com/category/290-database-synchronization1 point
-
@Robin S it was due to an needed upgrade from Pim1 to Pim2 because of changes in the naming conventions for images in PW > 2.6.?. At this time Pim1 already was installed and used in many sites. When people upgraded their PW version in those sites, they could not / cannot simply change Pim1 with Pim2. There was a manually action in changing API calls in template files needed. This was / is the reason for this weird behave. For the simply case of first install of the module, I can use a PW version detection of course, but that wasn't the problem. The problem was / is, that in prior PW versions with use of Pim1: i must used the Pim1 as first / only module, to get the people informed about update changes via upgrade-module(s) must ommit an automated change from old naming convention to the new one, because sites possibly would break down if I would raise a need to recreate every image (!) So, yes, I was and I'am very unhappy with this situation. If someone has a better solution, please tell me. ------- BTW, with the CroppableImage3 I run into something similar: Croppable3 isn't recognized by the widely used upgrade-module from Ryan, so people don't get informed about updates of it. I believe, many sites are running a version prior to 0.9.17. Everytime someone updates an older PW version site to a newer version, they run into a bug that was already fixed a year ago in version 0.9.17. People than always report that they just upgraded from x to PW > 3.0.31* (or similar), and the module now wouldn't work anymore. But it is already fixed. They all need to do a manual update, but how can I inform them? The updater should do so, but doesn't do.1 point
-
Hi @horst, I tried out this module today and it's nice, thanks. But the installation process and the PIM1/PIM2 thing was clear as mud to me - I got it worked out in the end but I don't understand why the module is set up that way. I get the need for different module versions according to which PW version you are running, but couldn't PIM1 and PIM2 be separate modules be in separate GitHub repos and you just install the one you want? Or better - could there just be a single module that checks the PW version number and uses the right code for that version? That way pimLoad() and pimSave() wouldn't have to be renamed and choosing/installing/using the module would be simpler for the user.1 point
-
Custom format is working normally for me in a Page Reference select field in 3.0.62. This also works for me. Are you sure the 'something' Page Reference field you are using in the custom format returns a single page? If it returns a PageArray then I would expect this not to work.1 point
-
I think the pagination behaviour with $pages->find("sort=random") is unexpected and so have opened a GitHub issue. Looking at the PageFinder source code it isn't difficult to see how a seed could be used with the random sort, but the relevant method isn't hookable so any fix will require a core change.1 point
-
Thanks, Rick. I will try to do some testing with what you mentioned. It seems pages is the way to go.1 point
-
User submitted data is nothing more than a group of fields that define the type of data you want to save, such as text (user name), images (avatar), etc. Those fields are then assigned to a template, which is nothing more than a grouping definition for those fields, eg, user name, address, etc. That template is then assigned to a page, which is basically the interface between the user and the database. You code how you want the user data entry form to appear, assign each data element to the appropriate field, then save the page. You use the current user (the one logged in) to determine which page to display. For example, $pages->get("page->createdUser = $user->id") returns an array of pages that $user created. No other user will see it, nor can they hack it. Your code determines what is accessible. You can define additional permissions using those modules mentioned earlier to further restrict what any particular user may do or not do. For example, if ( $user->hasPermission('whatever') ) { do something }.1 point
-
Hi Robin, Thanks for your kind words. To answer your question, no there is no "edit this occurance" button... although we have gone back and forth on that one for a while. However, you can still get the desired effect by duplicating your event for just that special instance and removing the occurance from the original. You basically are just doing the job of the "edit this occurance" button manually. The next release of Recurme will include selecting multiple additional dates to add to a recurrence. That will also solve your needs nicely. Hope that makes sense. Happy coding.1 point
-
Wow, this looks amazing! I've been wishing someone would make a full-featured PW calendar module for a while now and this looks like it fits the bill. So thanks! A question: it looks like it's possible to disable an occurrence of an event, but is it possible to create a one-off variation of an occurrence? For example, if there is a weekly yoga class on a Tuesday but on one particular week it has to move to Wednesday, can I locate that occurrence and edit it individually? Similar to this, from Lightning calendar... P.S. the links on the 99lime.com home page to "Responsive Menu" and "ProcessWire Go" are non-functional.1 point
-
Hi @Thor What I said about the author may not be the actual name. I think it is $page->createdUser, which indicates the user (author) that created that page. Sorry for my broad terminology. And Yes, page edit field permission module is a finer control over access. When you say 'submitted data' that implies a form action, either front-end or admin, so yes, you will need to code for your specific conditions. For example, User-A submits whatever through your front-end form. Your code will need to sanitize that form data, then save that data to the desired page. After you process the form data, and before you save the data, you can specify other properties, such as created user, or whatever fields you defined for that template. Later, you can retrieve one or more pages that the user created, or has access to, or however you define it, for whatever purpose you intend. That means User-B won't see what User-A has done. You could also retrieve all pages, regardless of user, to display to any user if you desire. Take the case of a user profile. ProcessWire, by default, only shows the profile data to the current user, and not another user. But it doesn't prevent you from retrieving all user profiles and displaying a list to any user if that is what you want to do. As I re-read your initial post, it is clear that you do your research. What you are asking for your project is very doable in ProcessWire. Even if you find you need to create custom tables, ProcessWire makes that very easy to do -- see the wire database pdo. There is a ton of information in this forum as well as the normal API reference, captain hook, etc. Should you have any questions during your development, there are many far more talented members here that will be glad to jump in and help out.1 point
-
@Robin S This. This right here is why you are a hero member. Props to you for the profile explanation. I never knew the procedure. I will put this into practice immediately. PS. Where is that damn "Buy-a-Beer" button? Somebody needs to make that happen.1 point
-
Welcome @Cody Connor, SVG upload into an image field should work fine, I did it several times. Could it may be your SVG, that you try to upload, that is causing a problem? Could you try this SVG out for example? SVG_logo.svg Also you could take at look at your developer tools console while uploading if it throws any script error. Regards, Andreas1 point
-
https://github.com/processwire/processwire/blob/50f2834a0ae2a9f9f2ac53439184ebdc04db2f54/wire/core/PagesTrash.php#L53 So there is id, parent id and sort position of trashed page in that name.1 point
-
I thought we already had seeds... http://cheatsheet.processwire.com/pagearray-wirearray/getting-items/findrandomtimed-n/ http://processwire.com/api/ref/wire-array/find-random-timed/ though not sure if this will work for your use scenario...1 point
-
Uh? Typo...? http://processwire.com/api/fieldtypes/images/1 point
-
More recommended literature: https://processwire.com/blog/posts/processwire-2.7-is-here/#access-control-and-permissions https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-templates-or-parents-for-users https://processwire.com/api/ref/#users & -access and – of course – a lot can be learnt by testing and studying these to: http://modules.processwire.com/categories/users-access/1 point
-
The answer is; It depends. ProcessWire permissions are Field/Template specific. Out of the box, you can define which roles/permissions apply to any field or template (see Access tab). When you create a field and assign it to a template, its 'data' is subject to the access control you defined, or it's parent, if none is defined. Ryan wrote another module to expand on this functionality here. Also, you can test the author id of a page whether it matches the current user in order to limit access. The thing I have learned in my short time working with ProcessWire is that there are many ways to accomplish what you want. But that is the second edge of that sword in trying to decide the best approach for your needs. So the bottom line is, if you want some data to be restricted, then you restrict access. That isn't meant to be a flippant answer, rather to show that you can make things as simple or complex as needed. ProcessWire doesn't limit you. BTW, welcome to the forums!1 point
-
I've been using PW for quite a while, now, so I would like to give back to the community that helped me so many times. I had this customer that wanted to use the Google Translate API to automatically translate the site, so I built this function that takes advantage of it without the need to use the API on every page cycle. I put it on a file that gets called on the _init.php, so that I can use it on every template. Here it is: <?php function googleAutoTranslate($page, $field) { // Turn off outputFormatting $page->of(false); // Get current language and field content for this language $current_language = wire('user')->language->name; $field_content = $page->getLanguageValue($current_language, $field); // Is there any content for this language? if($field_content != '') { // Do nothing! } else { // No content, lets translate... // Get default language text $text = $page->getLanguageValue('default', $field); // Translate only if there's content in the default language if($text != '') { // Translate it $apiKey = 'YOUR API KEY HERE'; $default_language = 'pt'; // Your default language here! $url = 'https://www.googleapis.com/language/translate/v2?key=' . $apiKey .'&q=' . rawurlencode($text) . '&source=' . $default_language . '&target=' . $current_language; $json = json_decode(file_get_contents($url)); $field_content = $json->data->translations[0]->translatedText; // Save translated text $page->$field->setLanguageValue($current_language, $field_content); $page->save(); } } // Turn on outputFormatting $page->of(true); // Return result return $field_content; } ?> Whenever you use a field on a template that should be auto translated, just call the function with a page object and the field name, like so: echo googleAutoTranslate($page, 'body'); Features: Translation occurs only once per field, so you don't need to keep paying translations (it stores the translation into the field language); You can correct the translation in the admin area and it won't be overwritten; If you need the translation to be made again, just delete the field content in the needed language. For the translation to occur, content must exist in the default language. I had to fight a little to get this working, so I hope this helps anyone, who comes across this particular need. Nice Things To Have If someone wants to give it a shot to make this into a module, please do. It would be nice to have a checkbox "Enable Google auto translate for this field", when you edit a field input features. Don't Spend Too Much Mind you that the Google translate is a payed service! and needs a Credit Card to get it going (even with $300 free credit); With a relatively small site (and the tests made to get this to work) I already spent about 80.000 translated characters = $3, Hope this helps someone!1 point
-
Does no one has an idea? I have used the code from this post on the lates PW dev version (3.0.58) https://processwire.com/talk/topic/6277-image-upload-field-and-display/ For testing purposes I have copied the code from this post and put it into a new template. Unfortunately this code leads to this error message: So this upload example code doesnt work in PW 3.0.58 any longer. Here is the complete code example if someone wants to test it. <?php $upload_path = $config->paths->assets . "files/avatar_uploads/"; $f = new WireUpload('userimage'); $f->setMaxFiles(1); $f->setMaxFileSize(5*1024*1024); $f->setOverwrite(true); $f->setDestinationPath($upload_path); $f->setValidExtensions(array('jpg', 'jpeg', 'png', 'gif')); if($input->post->form_submit) { if(!is_dir($upload_path)) { if(!wireMkdir($upload_path)) throw new WireException("No upload path!"); } $files = $f->execute(); if ($f->getErrors()) { foreach($files as $filename) @unlink($upload_path . $filename); foreach($f->getErrors() as $e) echo $e; } else { //$u = $users->get($user); //$u = $user->name; //Save the photo to the avatar field $user->of(false); $user->userimage = $upload_path . $files[0]; $user->save(); $user->of(true); @unlink($upload_path . $files[0]); } } ?> <div id="content"> <form class="uk-form" accept-charset="utf-8" action="./" method="post" enctype="multipart/form-data" > <input type="file" id="attach" name="userimage" accept="image/jpg,image/jpeg,image/gif,image/png" /> <input type="submit" name="form_submit" value="Submit"/> </form> </div> "userimage" is the name of the imagefield "files/avatar_uploads" is the name of the temp folder Best regards1 point
-
I have added an image field "avatar" to the user template. The field settings are "Maximum files: 1", "Formatted value: Single items (null if empty)". So I believe I should be able to get the URL of this image in my template with $user->avatar->url But this returns /site/assets/files/1217/ If I add the avatar field to any other template besides the User template I can get the URL as expected. For the user template if I use $user->avatar->first->url I get the URL okay. So it's like image fields added to the User template don't honour the "Formatted value" setting. Has anyone else experienced this? If so I guess it's bug and I'll file an issue on Github. Edit: If I get a specific User page it works normally $pages(1217)->avatar->url So it's just an issue when trying to get the image from the User object. Is this difference from the Page object likely to be intentional?1 point
-
This seems like it might go back a very long time: https://processwire.com/talk/topic/1125-images-field-returning-array-even-when-max-files-set-to-1/ I feel like I have come across this before too and been in a hurry and just used ->first() rather than trying to debug it. A couple of things that work other than first() $user->of(true); echo $user->avatar->url; or this: $u = $users->get($user->id); echo $u->avatar->url; Both of these work. In a rush so not sure why - I don't see why the $user object seems to have outputformatting off by default - maybe this is intentional, but I don't recall.1 point
-
After a few days of research I found this solution for my above problem. Complete code is-- <?php if ( isset($_POST['submit']) ) { $upload_path = $config->paths->templates . "images/"; $pdfs = new WireUpload('upload'); $pdfs->setMaxFiles(8); $pdfs->setOverwrite(false); $pdfs->setDestinationPath($upload_path); $pdfs->setValidExtensions(array('pdf','xps','pptx')); // execute upload and check for errors $pdf_files = $pdfs->execute(); if(!count($pdf_files)) { $pdfs->error("Sorry, but you need to add a photo!"); return false; } $rep_id = array(); $page->setOutputFormatting(false); foreach($pdf_files as $pdf){ $building = $page->test_rep->getNew(); $building->save(); $rep_id[] = $building->id; $page->test_rep->add($building); } $page->save(); $page->setOutputFormatting(true); if(count($rep_id) === count($pdf_files)){ $count = 0; foreach($pdf_files as $pdf){ $page->setOutputFormatting(false); $repeater_id = $rep_id[$count]; $field_rep = $page->test_rep->get("id=$repeater_id"); // test_rep is table and test_rep_field is field of the table $field_rep->of(false); $field_rep->test_rep_field = $upload_path.$pdf; $field_rep->save(); $page->save("test_rep"); $page->setOutputFormatting(true); $count++; } } } ?> <form action="<?php $_SERVER['PHP_SELF'] ;?>" method="post" enctype="multipart/form-data"> <p>Click the "Select Files" button below to upload your photo.</p> <input type="file" name="upload[]" multiple /> <button type="submit" name="submit">Submit</button> </form> I hope this will help someone while uploading files in repeater fields.1 point
-
thanks that did the trick. The code is used: foreach($user->avatar as $image) { $large = $image->width(500); $thumb = $image->size(100, 100); $avatar_thumb = "<img class='img-circle' src='{$thumb->url}'' alt='{$thumb->description}'' />"; } <div class="user-image"> <?php echo $avatar_thumb; ?> </div>1 point