Activity Stream
48,167 MEMBERS
6723 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member
    Website's:
    Doxsters.net

    Default Implementing a Hook/AddOn System in PHP?

    I was wondering how to do this, and I understand how I'd get it to dynamically add addons, etc. I was wondering if anyone could maybe post the basic logic of a hook system, and addon system similiar to that of vBulletin?
    timtamboy63 Reviewed by timtamboy63 on . Implementing a Hook/AddOn System in PHP? I was wondering how to do this, and I understand how I'd get it to dynamically add addons, etc. I was wondering if anyone could maybe post the basic logic of a hook system, and addon system similiar to that of vBulletin? Rating: 5

    Need a Designer/Web Developer? Click Me

    MSN: PM me for it.
    Email(Preferred):[email protected]

    "Power Corrupts. Absolute Power Corrupts Absolutely"

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    pspmafia.com zrev.net
    litewarez did something along these lines awhile back, search for his work called PHP Framework.
    Trusted & Respected Members:
    ACiD | Narutoroot | JmZ | Jackson | Phamous | litewarez





  4.     
    #3
    Member
    Website's:
    Doxsters.net
    Yeah, I thought about going through other people's code, and working out how they do it. Only thing is, I know that if I do look through it, I'll end up using bits of their code. That's why i want just the logic, So i can learn to code it myself

    Yah, im wierd like that

    Need a Designer/Web Developer? Click Me

    MSN: PM me for it.
    Email(Preferred):[email protected]

    "Power Corrupts. Absolute Power Corrupts Absolutely"

  5.     
    #4
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    not really hard to do

    create a class class called hooks and a folder called hooks

    PHP Code: 
    class Hooks
    {
        public function 
    run($hooks)
        {
             
    //each hooks should be in the directory called hooks and asub folder
             /*
                  Hooks
                      - startup
                      - before_db
             */
             //$Hooks->run('before_db') would run threw all the php files on the startup_db folder and include them, all you have to do is run the specific folder at the specific time in your system.
        
    }

    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  6.     
    #5
    Respected Developer
    Website's:
    X4B.org
    I prefer to do something like

    PHP Code: 
    class Hooks
    {
        public static function 
    run($hook,$vars)
        {
              
    extract($vars);
    foreach .... {
    inclde('hooks/'.$name.'.php');
    }
    return 
    compact($vars);
        }


  7.     
    #6
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    I Usually use a registry system so i would not need to use vars this is why, in the hook i would do

    Code: 
    $Data =& Registry::get('Data');
    $Data->SiteData += Registry::get('Database')->simpleAssoc("title",'site_data');
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Implementing SEO
    By Yashraj in forum vBulletin
    Replies: 1
    Last Post: 3rd Mar 2014, 05:48 PM
  2. Replies: 0
    Last Post: 12th Dec 2013, 05:49 PM
  3. Looking for Capcha hook
    By AJ Blacklisted in forum IP.Board
    Replies: 14
    Last Post: 12th Nov 2011, 10:40 AM
  4. Hook For Forum Statictics in vbulletin 3.8.6
    By Palooo 2009 in forum vBulletin
    Replies: 0
    Last Post: 17th Jul 2010, 11:36 PM
  5. The google hook up
    By bmoeller in forum Webmaster Discussion
    Replies: 9
    Last Post: 12th Feb 2010, 08:33 AM

Tags for this Thread

BE SOCIAL