Aside from the online help, is there anybody here who can help me how to use the program hooks the newbie way? 😀
Support Forum
depends on what you want to do… the hooks are located in various key spots of the forum code… if you edit the sf-hook-template.php (or in v4, edit sf-hook-template.txt and rename to sf-hook-template.php) and find the hook you want to utilize… simply add your code into one of the current hooks… each hook is commented as to when its called…
Got it! I just need to insert it between the ' ' of the return statement right?
same answer really… depends what you want to do.
If you just want to display a string of text then yes, you could put it between the quotes in the return statement. Whatever does get returned will display but perhaps a hint of what you want might help us anwser better.
At first, it will be for adsense…second, probably some small reminders for the forum itself. For adsense, I just need to insert the whole script isn't?
I don't have a clue. I don't use it so I do not know what they give you I'm afraid
yes, I believe you want the whole javascript code… I think it just echos it out, so you should be good… for the messages, just the text you want output, though I would check the custom tab on the spf manage options panel first as you may be able to do that there…
Yellow Swordfish said:
Yopu must not ‘echo’ anything in the hooks. Always return it.
I’m confuse…does it mean that I can’t place the entire code directly? 😐
Andy means, dont use a php echo statement anywhere in the hook… that you want to return a string to be output from the hook… either return a variable that contains the string or the string itself…
in your case, you can set a variable to the google adsense code (inside ” “) and return the variable…