Remove Default Facebook Import Photo

Home Forums Calendar Products Event Aggregator Remove Default Facebook Import Photo

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #28042
    Scott
    Participant

    Hello,
    I would like to turn off the default photo that shows up on an event if the event imported from Facebook has no photo.
    Is this a setting?
    If not, how do I remove it in the code, and how can I placed this edited file in my theme so as to not be written over when your plugin is updated?

    #28207
    Barry
    Member

    Hi Scott, the image I believe you are referring to is automatically generated by Facebook. Our plugin has no way of differentiating this from a photo that has been assigned by the account holder, so it’s rather a tricky problem.

    Perhaps you could pose the question to Facebook and ask if there is a setting to turn off the automatic assignment of that calendar graphic?

    #28210
    Scott
    Participant

    Thanks for the response. I have check my Facebook account and the default photo on each event is this 5uwzdFmIMKQ.png. Where would I add an exception in the code to not add a photo if this is found?

    #28212
    Barry
    Member

    Doing this in an update-resistant manner (ie handing you some code to stick in your theme’s functions.php file) looks to be possible but is not straightforward, unfortunately.

    The original filename for the default image – 5uwzdFmIMKQ.png which we would need to test against – is not exposed through any actions or filters during the import process and it is also given a new, unique name. Without “double hitting” Facebook, which would be a relatively resource intensive way of doing things, we just can’t do this.

    You could edit the core plugin files directly, however I would advise against that.

    #28837
    Barry
    Member

    Hi Scott, Tim – one of our devs – agrees that it would be useful to have a hook in here and has suggested that you could patch a core file (get_facebook_photo() line 268, the-events-calendar-facebook-importer.php) as follows:

    https://gist.github.com/4124500

    You can then create a custom filter. This will be added to the next release of the plugin so there is no need to worry about the change being wiped upon updating.

    #29238
    Barry
    Member

    Hi Scott: I’m not sure there’s much else we can do for you here and we haven’t anyway heard back from you in over a week now – so I will now close this thread.

    If we can help in any other way please simply create a new topic 🙂

    #978297
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Remove Default Facebook Import Photo’ is closed to new replies.