1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

show all hooks available

Discussion in 'Add-on Releases [Archive]' started by DroidHost, Jun 4, 2011.

Thread Status:
Not open for further replies.
  1. DroidHost

    DroidHost Well-Known Member

    This is not a big add on ...
    it will help many ....

    this add-on Will Show all the Hooks available in the style and there position(location)

    it can be disable from options
    and it will work only for userID == 1

    Attached Files:

    Rob Fritz, Trekkan, daveb and 26 others like this.
  2. borbole

    borbole Well-Known Member

    This will come in handy to a lot of admins. Nice work :)
  3. Vincent

    Vincent Well-Known Member

    Nice job! :D
  4. Allan

    Allan Well-Known Member

    Héhé great ! (y)
  5. Dan

    Dan Well-Known Member

    Very useful! Thanks!!
  6. DroidHost

    DroidHost Well-Known Member

    Thanks guys ....
    Hope we will meet again in more advanced addons
    :) :cool:
  7. Panupat

    Panupat Well-Known Member

    You learned fast, I'm envy :)
  8. Tilkißey

    Tilkißey Well-Known Member

    i like the idea
    very nice work (y)
  9. Itworx4me

    Itworx4me Well-Known Member

    Is there a way to only show the Ad hook templates?
  10. Tilkißey

    Tilkißey Well-Known Member

    i think these codes will work correctly
    open and edit Listener file (which is included the first post)
    class DroidHost_ShowHooks_listener
    public static function 
    templateHookShow($hookName, &$contents, array $hookParamsXenForo_Template_Abstract $template)
    $options XenForo_Application::get('options');
    $showHookName $options->showHookName;
    $visitor XenForo_Visitor::getInstance();
    $userid $visitor['user_id'];
    if (
    $showHookName == and $userid == )
    $contents .= "<span class='subHeading'>$hookName</span>" ;

  11. ragtek

    ragtek Guest

    you could include a second check

    $hookName2 = substr($hookName,0,3);
    if ($hookName2 == 'ad_'){..
  12. ragtek

    ragtek Guest

    no this would also show all hooks with ad_ in the title. for example 'dad_hook', 'ragtek_pad_post' would also be shown;) and because it cuts the title, you'll only see ad_hook & ad_post
    Tilkißey likes this.
  13. Tilkißey

    Tilkißey Well-Known Member

    i forgot it :pff:
    thx (y)
  14. EQnoble

    EQnoble Well-Known Member

    Well this looks useful...I'll give it a whirl
  15. ragtek

    ragtek Guest

    i'm using something similar in my add-on, but with some extras (because i don't think that we'll ever release it:D ) some suggestions=>

    1. sometimes hooks suround some elements, so show: hook foo start ... hook foo end
    2. we've included the hook params. On mouseover you could show the name & params
  16. EQnoble

    EQnoble Well-Known Member

    awww no sharey :-( lol
  17. ragtek

    ragtek Guest

    no, ATM it's impossible
    Our developer tools are too "custom" with too many dependencies and hardcoded paths & other applications.
    Once we finish the refactoring, we'll share it...
  18. DroidHost

    DroidHost Well-Known Member

    why 0,-3 ?
    I think 0,3 this is the correct count ?
  19. DroidHost

    DroidHost Well-Known Member

    I will try ...
    I am not good as u guys ,,,
  20. ragtek

    ragtek Guest

    yes, you're right(y)
    i shouldn't post code without testing it:D
Thread Status:
Not open for further replies.

Share This Page