QUICK NEWS

{NEW} - A new css video is up.

{OLD} - New video courtesy of Skhilled, Thanks for posting it up.

Video of the moment:


Internal Links

SMF Sites

Quick Info

Converting mod to use hooks

Started by lurkalot, Aug 03, 2019, 05:44 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

lurkalot

Is there anyone here familiar with using hooks in both SMF 2.0.15, and 2.1?  I'm wanting if possible to convert a very simple mod to use hooks instead of making file edits, and require some guidance if anyone is willing to hold my hand and walk me through it please.


Bigguy

I wish I knew more about them myself. If I could help I would but I would think someone will be along with ideas soon. ;)
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

lurkalot

Thanks Bigguy.  It's not a big issue, but I'd like to learn, and someone showing me how to do this on a very simple mod which only makes about two small file edits atm, I might actually be able to take it in. 

I have looked at other mods but I think they have more hooks, and just confuse the heck out of me. Start small is my theory.  To be honest it might not even be possible to use hooks for this, I've no idea.  :-[   

Bigguy

Check out the slide tab mod. It uses hooks but only a few. It may give you some ideas.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

lurkalot

Thanks did just that. ;)  Have to say it's not clicking with me yet. lol.. :-[ 

Bigguy

Me either and I have had that mod for awhile, lol. From what I understand you put the meat and potatoes of the mod in a file:

meatpotatoes.php

and than use hooks to call the file....somehow.....I think.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Skhilled

I'm officially lost too! LOL I took a look at the SMF docs for hooks to see if I could make heads or tails of it cause I've always been curious on how that works:

https://wiki.simplemachines.org/smf/Integration_hooks

Nope, it just did my head in. LMAO I think I need a better understanding of PHP coding, etc. first as well as how SMF is coded to understand it better.

Bigguy

"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

lurkalot

Thanks.  Tino just sent me a modified version of my mod,  he has converted it to use hooks for 2.1 for me.  So now I have the perfect thing to compare where I was going wrong. 

I have a lot to learn from the looks of it.

Bigguy

I think we all do. Which is not a bad thing at all. :)
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

beast




   If ya got any questions. Don't be afraid to ask.  ;D  :D  ;) I can say  :dontknow  with the best of them  ;D

Skhilled


lurkalot

Quote from: Skhilled on Aug 04, 2019, 02:44 PMLook under my avy...

lol..  Very true.  Though I do tend to learn something new every day, there's some things that just won't go in, no matter how hard I try.  ;)

Skhilled

I hear ya! LOL You just need them explained in a way that YOU can understand. Everyone see things and understands things differently. ;)

lurkalot

Quote from: Skhilled on Aug 05, 2019, 08:23 AMI hear ya! LOL You just need them explained in a way that YOU can understand. Everyone see things and understands things differently. ;)

Absolutely spot on there.  :rgton