Chris
Forum Replies Created
-
AuthorPosts
-
Thanks Alex/ Kiran,
Is there anyway I can reference an external image url instead of copying the image across to the uploads folder?
Hi Kiren,
For reasons beyond my control the rest API is not an option.
Could you tell me if there is a quick fix for the function I have written to overide the dummy post and allow it upload images correctly as everything else is working.
Thanks Kiren,
Please could you explain if/ how you post the image url correctly, is possible to do this without uploading to wordpress?
Thanks Guys,
SO API is the best route.
Could you provide a simple request example to create a new event. Just a few fields to get me going, and the correct way to post the image URL.
Also which function am I looking for in admin_functions.php
Thanks Kiran,
Could you just tell me the correct way to add the image, as we could of saved alot of time if you had not recommended using the dummy function.
Unless you can see an error with the way I am calling the save function? As I cannot.
$startDate = strtotime($event->startdate);
$endDate = strtotime($event->enddate);
$startTime = strtotime($event->openingtimes->doorsopen);
$endTime = strtotime($event->openingtimes->doorsclose);
$venue = $event->venue;$image_array = array($event->imageurl);
$post_info = array();
$post_info[“listing_type”] = ‘gd_event’;
$post_info[“post_title”] = $event->eventname;
$post_info[“post_desc”] = $event->description;
$post_info[“post_images”] = $image_array;
$post_info[“post_category”] = array(‘gd_eventcategory’ , array(‘Events’));
$post_info[“post_tags”] = array(”);
$post_info[“geodir_video”] = ”;
$post_info[“geodir_contact”] = $venue->phone;
$post_info[“geodir_website”] = $event->link . ‘afilate’;
$post_info[“starttime”] = date(‘G:i A’, $startDate);
$post_info[“endtime”] = date(‘G:i A’, $endDate);
// $post_info[‘post_address’] = $event->address;
$post_info[‘post_city’] =$venue->town;
$post_info[‘post_region’] =$venue->postcode_lookup;
$post_info[‘post_country’] =$venue->country;
$post_info[‘post_zip’] = $venue->postcode;
$post_info[‘post_latitude’] = $venue->latitude;
$post_info[‘post_longitude’] = $venue->longitude;
$post_info[“post_dummy”] = ‘0’ ;
$post_info[“event_start”] = date(‘F j, Y’, $startDate);
$post_info[“event_end”] = date(‘F j, Y’, $endDate);
$post_info[‘is_recurring’] = 0;
//pretty_export($post_info);
if(get_page_by_title($event->eventname, OBJECT, ‘gd_event’)) return;
geodir_save_listing($post_info, true);Hi Kiran,
The problem is with the plugin, you can see from the error it is not my customization.
Yes, that is the post object I am passing to the save function.
This reply has been marked as private.I have left the output from the post object there
This reply has been marked as private.Hi Kiran,
Here is an example link, the only thing I can see is that it is HTTPS.
https://d31fr2pwly4c4s.cloudfront.net/9/1/0/920336_0_hh-pub-quiz-75-cash-first-place-prize.jpg
Ah, I think it may be because i am not passing it through apply_filters(‘event_dummy_image_url’, $dummy_image_url);
Can you tell me what this function does and how I can apply it to my URL?
It looks like this problem:
https://codeboxr.com/fix-remote-file-is-incorrect-size-for-wordpress-import-error/
Would it be possible to override this in my plugin?
-
AuthorPosts