Jump to content

patricktsg

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by patricktsg

  1. Nice one, maybe for gif's you could just resize front end with an inline style. Not sure if it's possible but if the file type selected and uploaded was a .gif then use the conditional display in the PW admin to show fields for setting a width / height and just output those params in the style
  2. Maybe try increasing the script execution time: https://easyengine.io/tutorials/php/increase-script-execution-time/
  3. Is the DPI of the GIF very high? I know this can occur with jpegs when the server tries to create a thumbnail of hi-dpi images that just exhaust the resources of the hosting account / server. I have successfully uploaded animated gifs before to PW, they were around <1.5mb and 72DPI
  4. Something probably off with my loop, the code below is on my "entries.php" template page, it's outputting the title and description of each entry fine but the repeater fields just repeats the first set of images from entry 1 throughout the loop. <?php // Functions $entries = $page->children; $entry_array = array(); $image_array = array(); foreach ($entries as $entry) { // Define the fields wanted $title = $entry->title; $description = $entry->entry_description; $images = $entry->images; foreach ($images as $image) { $imageUrl = $image->url; // make a thumb version $imageDescription = $image->description; // Build array from repeater $image_array[] = array( 'image_url' => $imageUrl, 'image_description' => $imageDescription, ); } $pageUrl = $entry->httpUrl; // Build the array from the fields $entry_array[] = array( 'title' => $title, 'description' => $description, 'images' => $image_array, 'page_url' => $pageUrl, ); } // Json encode the array $entries = json_encode($entry_array, true); // Dump the data // echo $data; ?>
×
×
  • Create New...