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

Question about basic extension development difficulty.

Development and Programming

lumpenprole's avatar
lumpenprole
6 posts
17 years ago
lumpenprole's avatar lumpenprole

Hey all,

I’m a pretty experienced programmer, but fairly new to EE. I’ve been reading through docs and forum posts and I’m getting the impression that if I need a functionality that’s not provided, I should probably develop a module instead of an extension because I might have an easier time of it.

That’s a little counter-intuitive to me since the range of functionality seems more targeted for an extension than a module, but I can do it either way. So, is this correct?

Plus, you know, any other advice for a first-time EE developer would be greatly appreciated.

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
17 years ago
Ingmar Greil's avatar Ingmar Greil

You know, it depends. An extension, really, is generally changing certain aspects of how EE behaves, very often in regard to the control panel. You are, for all intents and purposes, replacing or enhancing a chunk of EE itself, inserting your code at one of the provided “hooks”, doing something, and then handing the data back to EE.

Modules, on the other hand, are really more all-purpose PHP scripts, generally with a CP of their own, quite often with a db table dedicated to them.

       
lumpenprole's avatar
lumpenprole
6 posts
17 years ago
lumpenprole's avatar lumpenprole
You know, it depends. An extension, really, is generally changing certain aspects of how EE behaves, very often in regard to the control panel. You are, for all intents and purposes, replacing or enhancing a chunk of EE itself, inserting your code at one of the provided “hooks”, doing something, and then handing the data back to EE. Modules, on the other hand, are really more all-purpose PHP scripts, generally with a CP of their own, quite often with a db table dedicated to them.

Yeah, that’s the thing. I need to make a file upload with various text fields associated and a rational ordering system. I have the file upload being done with an existing extension, but haven’t been able to find a good ordering extension. So, I can either make a module that has all that, or make an ordering extension. I was all set to do the extension, but lots of posts say that you should start with a module to get to know the internals of EE. So I’m trying to figure out my next move.

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
17 years ago
Ingmar Greil's avatar Ingmar Greil

I see. Well, good luck either way 😊

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

You could create an extension and module that work together. I do this quite a bit and it seems to work well.

If you are ordering files on per entry basis this could be added to the extension. If you need some other kind of ordering a module is the way to go but you will still need the extension to modify the EE internals.

       
lumpenprole's avatar
lumpenprole
6 posts
17 years ago
lumpenprole's avatar lumpenprole

So, in order to have something like a drop down box that populates with the existing order, I’d need to do an extension, right?

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Drop down box in the publish form?

       
lumpenprole's avatar
lumpenprole
6 posts
17 years ago
lumpenprole's avatar lumpenprole

Yeah, if there are 10 entries, I want to have a drop down box on the publish page that lists 1-11 as possible slots. Then, it will handle re-ordering all the existing ones if it’s less than the last.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Sounds like an extension to me

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Probably best to download an existing extension that adds a new publish field… Try LG Member List it creates a select box and on save it changes the content of the custom field.

       
lumpenprole's avatar
lumpenprole
6 posts
17 years ago
lumpenprole's avatar lumpenprole

Hm, I don’t think that will work because I need the custom drop down to populate from the db dynamically. So it will list all the existing numbers. So that if there were one entry, it would show 1,2. If there were two entries, it would show 1,2,3. Etc.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham
Hm, I don’t think that will work because I need the custom drop down to populate from the db dynamically. So it will list all the existing numbers. So that if there were one entry, it would show 1,2. If there were two entries, it would show 1,2,3. Etc.

You can access the db from within your extension code.

       
lumpenprole's avatar
lumpenprole
6 posts
17 years ago
lumpenprole's avatar lumpenprole

Right, okay, so what I’m trying to figure out is if a custom extension is the best way to go, or a custom module. I’m guessing you’re falling on the custom extension side.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

well i’m not sure of your full functionality but if its a custom field in the publish form it has to be an extension.

       
lumpenprole's avatar
lumpenprole
6 posts
17 years ago
lumpenprole's avatar lumpenprole

Ah, well that pretty much answers my question then. Thanks.

       

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.