I have an idea regarding the creation of Extensions. When I’m trying to author and Extension, I frequently/always have to try and find another Extension that uses the same hooks or generally performs a similar function to what I’m trying to do - to see how things are even done.
Can Extensions be categorized somehow by the hooks they use?
I need to add a column to the Edit page table, and populate it with the contents of a custom field if the entry is from a certain weblog, or leave it empty otherwise. So, I look through the hooks and find: edit_entries_additional_celldata. Great! Now how do I use it? I would love to find any and all Extensions that use this hook so I can rip them open and see exactly how this hook has been used.
I have an idea how to use it, but instead of a few hours of experimentation, I’d love to spend a few minutes examining something that I know works already.
In case anyone wonders what my idea is: I think I decided to make an “images” weblog, rather than use the Gallery module for my current build - as everyone knows, weblogs are simply more flexible. I’d like to make an extension that shows a thumbnail on the Edit page from a weblog/field combo I specify. That’s all. Real simple, right? 😊
If something like this exists, could someone point it out to me and save me the few hours of dev time?
Yes, I’ve already written two extensions that add an extra column:
You can download those and open them up to see what I’ve done. There are only two hooks you need: edit_entries_additional_tableheader and edit_entries_additional_celldata. My MD Show Expired uses a couple more hooks than that, though, because I’m also adding a custom search filter.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.