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

Quick Newbie Questions

Development and Programming

Ben Johnson's avatar
Ben Johnson
29 posts
17 years ago
Ben Johnson's avatar Ben Johnson

Hi.

I wrote my first EE plugin this morning to dynamically determine a date. The plugin works as far as I can tell when you put the tag right in the template, but it doesn’t seem to work when used in a {exp:weblog:entries} parameter. Plugins can be used in parameters right?

Thanks,

Ben.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi Ben,

Tricky this one. They are not (I think) totally supported. Whilst they can work it all depends on how you have programmed it and how you need it to work. I have a plugin at the bottom of my post here that I made which does do what you are talking about, well what I mean by that is that my status plugin is used as a parameter inside a weblog tag but not all ways will always work.

Can sometimes be a bit hit and miss depending on what you are doing.

Hope that helps.

Best wishes,

Mark

       
Ben Johnson's avatar
Ben Johnson
29 posts
17 years ago
Ben Johnson's avatar Ben Johnson

That does help. It’s a tricky situation. I’m writing a site for an academic institution, and they’ve got to display posts according to school year. So I wrote the plugin to figure out what the proper years are for current posts based on whether or not the current date was before Sept. 1. It works in that it outputs “2007”, but doesn’t work in the parameters (year=”{exp:schoolyear:begin}”). I guess this is just one of those times.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi Ben,

Don’t give up just yet 😉

If you download my Retrieve Statuses plugin and open it up you can possibly see if I am doing anything different to the way you are at the moment. That may give you a hand in getting yours to work?

Hope that helps?

Best wishes,

Mark

       
Ben Johnson's avatar
Ben Johnson
29 posts
17 years ago
Ben Johnson's avatar Ben Johnson

Wow. Thank you.

I can’t believe I missed that. You guys are amazing.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

I knew there’d be something I would miss to tell you! 😉

My plugin requires that exact parameter and I meant to say so sorry about that!

Good catch Victor 😉

Hope you can get your plugin working now Ben?

Best wishes,

Mark

       
Ben Johnson's avatar
Ben Johnson
29 posts
17 years ago
Ben Johnson's avatar Ben Johnson

Yep, working perfectly now. On to the next quandary… 😉

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Excellent 😉

You will learn to love your quandaries!! 😉

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Yep that’s always a nice thing to do 😉

In this instance though it may be a little specific to your site but always nice to see other plugins to learn from.

Best wishes,

Mark

       

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.