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

How to bolt on to existing SAEF code?

Development and Programming

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

Hiya,

Was just wondering if anyone knows if this is at all possible?

I am wondering whether you can add extra parameters to ExpressionEngine tags such as the SAEF so that you could possibly have something like this :

{exp:weblog:entry_form code_call="yes" weblog="default_site" return="site/index" preview="site/entry"}

…rest of form code…

{/exp:weblog:entry_form}

Note the code_call=”yes” parameter above that I have slipped in there. Was just wondering if it’s somehow possible to add something like that and if it is set to yes then an extension with an associated hook gets fired and if no the extension and hook don’t get fired?

Is it even possible to somehow add extra parameters in to the form like that and if so does anyone have any idea as to how I would go about doing that?

Best wishes,

Mark

       
Arun S.'s avatar
Arun S.
792 posts
16 years ago
Arun S.'s avatar Arun S.

Sure, the weblog_standalone_form_start hook allows you to completely take over the SAEF. So, in theory, you could do whatever you wanted (within reason, of course).

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

Hi Arun,

Thanks for that. I had seen that hook actually but I’m a bit scared by it unfortunately 😉

Would that mean that I would have to re-create the whole of the SAEF code in my extension? If so then two things come to mind here :

1 - I probably can’t do that due to my newbie rating on extensions. 2 - I wouldn’t be able to copy the code from the mod.weblog_standalone.php file and use it and then distribute the extension.

If I have to write code which basically does all that the mod.weblog_standalone.php file does then if ever anything changes in ExpressionEngine then I would probably have to re-visit my code, not really something I want to do in this instance 😉

Or… is it possible using that hook to allow ExpressionEngine to create the form but for me to somehow take parts of it over in some way?

Thanks again for all your help lately, it’s much appreciated.

Best wishes,

Mark

       
Arun S.'s avatar
Arun S.
792 posts
16 years ago
Arun S.'s avatar Arun S.
I had seen that hook actually but I’m a bit scared by it unfortunately

I know what you mean. The description is fairly intimidating. Though, I suppose it’s liberating once you know what you’re doing 😉

Or… is it possible using that hook to allow ExpressionEngine to create the form but for me to somehow take parts of it over in some way?

I think that’s the entire point. You’re able to access whatever data is passed in through the tag and manipulate it however you want. Now, I assume it runs as normal unless you explicitly disable/manipulate it.

But I’ll leave it to more experience EE devs to fill you in on how exactly that’s done.

(btw, you’d probably get more traction in the Extensions forum. might want to ask a mod to move it 😊)

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

Hiya,

I had seen that hook actually but I’m a bit scared by it unfortunately
I know what you mean. The description is fairly intimidating. Though, I suppose it’s liberating once you know what you’re doing 😉
Or… is it possible using that hook to allow ExpressionEngine to create the form but for me to somehow take parts of it over in some way?
I think that’s the entire point. You’re able to access whatever data is passed in through the tag and manipulate it however you want. Now, I assume it runs as normal unless you explicitly disable/manipulate it. But I’ll leave it to more experience EE devs to fill you in on how exactly that’s done.

I’ll have a little play around see if I can figure anything out, thanks.

(btw, you’d probably get more traction in the Extensions forum. might want to ask a mod to move it 😊)

Actually the reason I posted here was because if this had gone into the Extensions form I fear that it may have fallen down a black hole. Unfortunately seems to be the way in those forums 😉

That is apart from very helpful souls like yourself of course for which I am eternally grateful.

MODERATORS - If you do feel that this should be in the Extensions forum instead then please do feel free to move it there although I really hope it gets more attention than some of the posts I’ve placed in there in the past 😉

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

Moved as per (ahem) request.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
Moved as per (ahem) request.

Hmmm that’s a very cheeky way around it Ingmar!! 😉

Hope this doesn’t get relegated to the black hole now though 😊

       

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.