1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding a Zend library?

Discussion in 'XenForo Development Discussions' started by EQnoble, Sep 22, 2011.

  1. EQnoble

    EQnoble Well-Known Member

    Would anyone happen to know how to add a Zend library to /library/Zend and include it globally into xenforo?
     
  2. Mikey

    Mikey Well-Known Member

    as far as I'm aware you don't need to do anything on XenForo's side. If it's in /library/Zend - simply include it in your script.. before you extend it.. like so
    PHP:
    require_once('/library/Zend/Service/Twitter.php');
    function 
    MyTwitterLoginScript extends Zend_Service_Twitter {
    // stuff
    }
    As far as I know, the entire ZF is packaged with XF anyway. Looks like a pretty complete set that I'm looking at.
     
    EQnoble likes this.
  3. EQnoble

    EQnoble Well-Known Member

    If you wanna take look I can pvt msg yah what it is exactly...part of the thing is included with xf but the other part is not.

    I have my niece right now and currently she is occupying my monitor watching a pup named scooby doo and if I don't make it full screen again she is going to give me a piece of her mind.

    Thanks for what you posted, as soon as my computer is no longer being commandeered by this adorable toddler I will try and figure out if that is relevant to what I am trying to add. ( I really am a newb with zend and other than this I am adding I doubt I will ever be adding another Zend library to the core as like you said pretty much everything is xf's packaging already)
     
  4. James

    James Well-Known Member

    Wouldn't you still be able to make use of the autoloader in the Zend directory?
     
    EQnoble likes this.
  5. ragtek

    ragtek Guest

    You don't need the require.... The autoloader will handle this for you:p
     
    EQnoble and Mikey like this.
  6. Mikey

    Mikey Well-Known Member

    my apologies ;)
     
    EQnoble likes this.
  7. EQnoble

    EQnoble Well-Known Member

    Thanks for replying everyone...I am still trying to figure out what I am doing exactly...but I will get there at some point.

    PHP:
    function MyTwitterLoginScript extends Zend_Service_Twitter {
    // stuff
    }
    So this the only line needed?
     
    James likes this.

Share This Page