Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Roi Dayan

    (@roidayan)

    hi,

    It think this will require customization that is not wanted.
    In one request the plugin gets multiple events with the small image.
    Then to get big image the plugin need to request it per event.
    so if you have 20 events then it’s additional 20 requests.

    need to check if this can be done with the first request only.

    thanks,
    Roi

    Thread Starter ross84cr

    (@ross84cr)

    Hi Roi, thanks for your reply.

    I found this string in php file in Ninja Code:

    $pic_big = isset($obj[‘data’][$x][‘cover’][‘source’]) ? $obj[‘data’][$x][‘cover’][‘source’] : “https://graph.facebook.com/{$fb_page_id}/picture?type=large”;

    Is it possibile to use in your plugin? If yes, where?

    Thx

    Plugin Author Roi Dayan

    (@roidayan)

    yes. thats the url. but as you can see it’s for specific event. this means after getting, for example, 20 events, need to get image per event. it means 20 more requests.
    maybe there is a better option then doing 20 more requests. need to check that.

    if you still want to go this way of adding more requests then you need to edit query_fb_events(). at the end of the function $data contains all events needed to be displayed already sorted.
    need to iterate over it and do another request per event and replace the picture attribute with the result from the request.

    Plugin Author Roi Dayan

    (@roidayan)

    I found a better way and you won’t need anymore queries.

    in line 344 change picture to cover:

    $p = array(
    ‘fields’ => ‘id,name,picture,start_time,end_time,place,description’,
    ‘limit’ => 100
    );

    then in line 134 change picture url to cover url:

    $event[‘pic’] = $event[‘picture’]->data->url;

    to:

    $event[‘pic’] = $event[‘cover’]->source;

    this will get the original image.

    Hi Roi, I would also like to resize the events image. I changed the lines you mentioned, but the event image does not load. Do I also need to add the link which ross84cr wrote? And if so, where do I need to paste it?

    Plugin Author Roi Dayan

    (@roidayan)

    I’m not sure but maybe an event has to have a cover photo which is different from the normal picture for an event?
    Can you share the facebook page link so I can check?

    Here is the event page: https://www.facebook.com/etageost/events
    I would like to show the large cover photo in the facebook events widget.

    Plugin Author Roi Dayan

    (@roidayan)

    hi,

    sorry for the late reply. I don’t see a problem with the events page. I can get cover images just fine.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Size IMG Event’ is closed to new replies.