Facebook Importer ( loading cover )

Home Forums Calendar Products Events Calendar PRO Facebook Importer ( loading cover )

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1153040
    jazzinconcert
    Participant

    Hi there,

    i wonder if it is possible to customize the facebook importer the way the other modules/add ons can be.

    In my case i would like to prevent the importer loading images when importing the event from facebook.

    Actually i edited the origin php file in line 559 and commented ‘cover’ out:

    /**
    	 * retrieve a facebook event object that is available at the root of the FB graph API
    	 * example: https://graph.facebook.com/12345
    	 *
    	 * @param string $object_id the object to retrieve
    	 *
    	 * @return array the json data
    	 */
    	public function get_facebook_event( $object_id ) {
    		return $this->get_facebook_object(
    			$object_id,
    			array(
    				'fields' => implode(
    					',',
    					array(
    						'id',
    						//'cover', 
    						'description',
    						'end_time',
    						'name',
    						'owner',
    						'start_time',
    						'ticket_uri',
    						'timezone',
    						'updated_time',
    						'place',
    					)
    				),
    			)
    		);
    	}
    

    Is there a way to do it in the child theme so that in case of updates i wouldn’t get lost of the editing?

    Next, is it possible to assign some facebook events where the cover is loaded and others where the cover is not loaded by the importer?

    One more thing, will there be an update of facebook importer for wordpress 4.6 ?

    Thanks for help
    Thomas

    #1153223
    jazzinconcert
    Participant

    It would help if it’s possible to disable the image import from facebook.

    In Germany it’s a little difficult with the law & rights due to photos on websites. I hope you will integrate that function in the new event aggregator !

    #1153807
    Brook
    Participant

    Howdy Jazz,

    What you want is not yet possible. We have  talked about making those fields filterable, but I am not sure if that is going to be technically feasible due to upcoming changes. Let me double check on a couple things with our strategist and get back to you on some possible paths forward.

    Cheers!

    – Brook

    #1153841
    jazzinconcert
    Participant

    Hi Brook,

    thanks for reply!

    For now, is there a chance just simple turn off the image/cover grabbing by the importer … the way i described in the code isn’t working …. 🙁

    I got it in the version before… but i can’t rebuild it in the actual version…

    Thanks
    Thomas

    #1154698
    Brook
    Participant

    If your goal is just to delete the photo before it gets saved then I do have a way. The filter ‘tribe_fb_event_img’ found inside Importer.php can be used to stop the image from saving. Something like this code should do that:

    add_filter( 'tribe_fb_event_img', '__return_false' );

    And that could be inserted in your theme’s php file.

    Technically the images will still get imported to your server, so you are not truly filtering the Facebook API Request. But the image will get deleted along with any other temporary data once the Facebook import job is done.

    Would that work?

    Cheers!

    – Brook

    #1154730
    jazzinconcert
    Participant

    Hi Brooke,

    the filter works 🙂

    Thank you very much !

    But you should think about to implement that function in the plugin.

    I’m sure there are many users who need this. Espacially in countries with a strict copyright law to photos etc.

    Maybe you can work together with tis guy: http://www.quickfeaturedimages.com/ for implementing automated delete of images and automatically set a new image as featured image.

    #1155435
    Brook
    Participant

    That’s a good idea. We certainly keep our ear to the ground for more feedback like this. Another thing thing that will be happening within the year is that all of our snippets will start getting hosted on our site as miniature plugins, and we will be able to track how popular they are. Popular snippets will become built-in features 🙂 . We like to make sure something will be used a lot before we make it an option, that way our backend does not get packed with 100s of options that literally 99% of people will consider “bloat”.

    Thank you again for letting me know that worked and sharing your feedback. Feedback is very helpful for shaping our future plugin choices. Cheers!

    – Brook

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Facebook Importer ( loading cover )’ is closed to new replies.