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 extension: need a name for it

Development and Programming

Avi Block's avatar
Avi Block
27 posts
16 years ago
Avi Block's avatar Avi Block

This is somewhat in the spirit of FieldFrame, but I think focuses on one area which FieldFrame doesn’t. Have you ever wanted a streamlined method of creating new variables and conditionals for your weblog? For example, lets say you needed to display a calculation based on based on values of other fields in your weblog? Lets say you wanted to easily create new conditionals which are dependent on many variables.

As an example, in a personal project, I need to distinguish between 15 minutes before an event begins, between 15 minutes and start time, and after start time. The cleanest way to do this is with conditionals {if before_fifteen}, {if in_session}, but the code behind is pretty ugly.

How about this something like this?

Just create a class:

class Event extends ModelSupport {
     public function isBeforeFifteen() {
          //some code
     }
     
     public function getCountdown() {
          //some code here
     }
}

Hook this up to your weblog with a configuration file (not in the database, because configuration files are easier), and you’ll get to conditionals {before_fifteen} and {not_before_fifteen} and one variable {countdown} for free!

This of course requires PHP5, because it relies on reflections.

My biggest problem, is that I have no idea what to name it!

If anybody is interested in this, or has some other ideas, please let me know and i’ll make it available (right now it is in a pre-alpha stage…I’m working on features as I need them for a current project).

I also have other plugins that I might make available such as a “master template” plugin to facilitate keeping a common layout throughout your templates, in a DRY fashion, using the “two-step” view pattern.

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

Sounds interesting, how about “Indeependent Conditionals”. Would like to take this one for a spin, I am always using php in my templates for my conditionals, so this would be a step up in EE.

       
Digital Delivery's avatar
Digital Delivery
3 posts
16 years ago
Digital Delivery's avatar Digital Delivery

Sounds like an interesting project.

The name has to be condeetioner, with a neat little shampoo bottle shaped logo.

       

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.