We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New to Extension dev - can I call other EE plugins from an extension?

Development and Programming

Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

I am exploring the idea of tying into ‘gallery_cp_insert_entry_end’.

I would like to get the EXIF data for the uploaded image, and then set the images date field to the ‘datetimeoriginal’ date in the EXIF data.

That way when I sort my gallery, it will be sorted by the date the image was taken, not the date is was uploaded.

To make my life easier I was hoping to call Lodewjik’s EXIF plugin to get the data. Is this possible?

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
17 years ago
Jamie Poitra's avatar Jamie Poitra

Hey Erin,

Depending on how Lodewjik’s functions work you may be able to use his plugin as a class within your extension.

You could call his plugin inside an extension function like this:

if ( ! class_exists('Exif'))
{
    require PATH_PI.'pi.exif'.EXT;
}

$EXIF = new Exif();

Then any functions you wanted to use could be called like this:

$EXIF->function();

However, his functions may rely on getting data from the $TMPL class and if thats the case then this may not work out for you. In that case you could alway ask him if he is averse to you using pieces of his code within your own extension instead of calling it straight from the plugin like this.

Jamie

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.