I don't understand Integration Hook

Started by mattizzy, September 21, 2018, 02:54:30 AM

Previous topic - Next topic

mattizzy

In know you'll tell me to look at plugins and all that but it's not easy to find plugins using that.

I have seen some plugins but it still gets confusing.

can I use integration hook to do anything that the regular search and replace command in install.xml  can do?

I have gone through the Online manual on Integration hook, but it wasn't helpful.

In the manual, they just write accepts and sends without an example function of how to do it.

I love how Smcfunc Online Manual is, they gave example codes.

I don't know if anyone can help me or tell me how I can override something with integration hook.
I am only an SMF Addict. I think I took overdose.

d3vcho

"Greeting Death as an old friend, they departed this life as equals"

mattizzy

Quote from: d3vcho(void) on September 21, 2018, 03:04:23 AM
You already had a look at this? https://wiki.simplemachines.org/smf/Integration_hooks
Quote from: d3vcho(void) on September 21, 2018, 03:04:23 AM
You already had a look at this? https://wiki.simplemachines.org/smf/Integration_hooks

Yes, I checked. Display.php has no hook??
I was trying to perform preg_replace on the first message.

How can I override context['page_title'] or anything I insert in my hook interface??
I am only an SMF Addict. I think I took overdose.

Pipke

You could also download a mod that uses hooks and see how it is coded/build. So did i ;)
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Kindred

not every single location in the code is hooked...

What is your ACTUAL end goal?
Don't tell us how you think it should be done...   tell us what you are actually trying to accomplish
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mattizzy

Quote from: Kindred on September 21, 2018, 12:39:20 PM
not every single location in the code is hooked...

What is your ACTUAL end goal?
Don't tell us how you think it should be done...   tell us what you are actually trying to accomplish

I am trying to Replace $context['page_title_HTML_safe'] to be add  TITLE - sitename for topics
I am only an SMF Addict. I think I took overdose.

Kindred

look at the Optimus Brave mod. That is one of the things that it already does
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: