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

Development tutorials for non-licensed users

Discussion in 'XenForo Pre-Sales Questions' started by Dannymh, Oct 7, 2014.

  1. Dannymh

    Dannymh Active Member


    I am trying to consider whether I should move my forums over to xenforo. However with my current forums (myBB) I have a lot of custom addons such as a football tipping competition and other thread based actions.

    I like what I see from Xenforo but before moving across I need to make sure that I can re-program these items into the xenforo framework. I don't want to dump $140 on the software only to find I really struggle in getting my custom code and addons up in any kind of timely manner.

    Whilst there are some tutorials there doesn't seem to be much in the way of API documentation and information about finding specifically how to make a robust addon that requires both admin and user interaction.

    It is hard to justify a move before making an assessment on these.

    Is there anything other than the few skinny resources available in the resource manager?

  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Dannymh

    Dannymh Active Member

    Thanks I had already found the forums and the resources, but am really surprised at how unorganized these are. No API documentation, no hook list and explanation, no real real depth here, just a loose knit mishmash of user written tutes.

    Whilst I can see that there is probably a pretty powerful framework behind this, it isn't really very easy, there isn't a decent database driven hello world or get started tutorial. I have gone through a few of these, and still feel like I can only do 1% of what I need to and is obviously available at some level
  4. rainmotorsports

    rainmotorsports Well-Known Member

    Hook list? If you mean template hook's those are deprecated anyways. Template modifications replaced them for the most part. Code hooks? You have a list of code event's when you create the listener for them. You can extend any and every controller, view or model and a quick look at the page you want to add something to is going to tell you what controller or view you are extending.

    Database operations are split into 2 categories for me. Datawriters obviously need a tutorial and there is one out there. Xenforo uses part of the Zend 1 framework and while a quick look at some free plugins (which you can't download yet) should show you everything you would ever need to know I am also sure Zend developers will feel right at home. Not to mention being able to just check the manual for Zend and related tutorials.

    I mean a simple read query is pretty simple:
    $db = $this->_getDb();
            $query= "
                SELECT blah
                FROM blahblah
                WHERE blahblahblah = 1";
            $returnvariable = $db->fetchAll($query);
    Model View Controller threw me for a loop and as someone who isn't even fluent in PHP this can be a fun experience. While there is technically no documentation on classes and functions it can be generated automatically and in fact there is a site that has this published. I would link it but I am honestly not sure of the sites standing here. As most platform developers will tell you, just look at the core code if you want to understand something.

    Typically looking at a page, its template and one or two of the three files behind it will tell you what you need to know to add what you want. A basic understanding of mvc, php and mysql is most of what is required. DataWriters where the only thing I had a hard time wrapping my head around personally. A quick look at any free addon that does something similar to what you want usually gets you pretty far as well. Adding the navtab for your addon is not only an easy line of code it's in hundreds of addons. Something that retrieves info from the database and adds it to the side bar or another part of the page... has to be a dozen examples or more. Full standalone addon, my personal reference was the XenStaff addon from a long time ago. Extending a core function and adding data from a query is where the real fun begins and even with documentation you need to read the core code, do some var dumps and long hard thinking.
  5. sbj

    sbj Well-Known Member

    What do you mean by this?
  6. rainmotorsports

    rainmotorsports Well-Known Member

  7. Jake B.

    Jake B. Well-Known Member

    Here ya go: http://dietarygaming.com/xfdocs/
    sbj and Sheratan like this.

Share This Page