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

First Plugin dev question

Development and Programming

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

OK, I am about to try my hand at writing a plugin. To start simple I am going to wrap EE’s imagelib so that you can get image properties in your template code.

I envision usage like this: {exp:img_prop img_url="http://site.com/path/to/image.jpg"} width = {width} height is {height} … {/exp:img_prop}

So, I think I only need one function (the main class) and in there I call the imagelib stuff then with a switch statement, put the relevant data in $TMPL->tagdata via swap_var_single.

Does that sound about right?

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

Just to close this off, I managed to struggle my way through and I do have my very first plugin that works like I mentioned above.

Thanks to Derek for his patient help.

       

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.