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

Add-on tutorial?

Discussion in 'XenForo Development Discussions' started by Tott3, Oct 7, 2015.

  1. Tott3

    Tott3 Active Member

    Hope this is the right place for this.

    Are there any add-on tutorial that are up-to-date? To get one started on how to develop Xenforo add-ons.

    I found one that looked pretty decent. However, it seems a bit outdated and I got stuck somewhere along the way as some functions/buttons were missing or not in the same place on my installations. In his video he's checking version 1.1.1 I believe and that's quite far a part from 1.5.1 as I'm using.

    This is the one I've found: https://xenforo.com/community/resources/screencast-creating-xenforo-add-on.694/

    I got stuck on the "linking" part at 1:25 in the video, part one. I don't got that drop-down menu that he's using.
  2. Furai

    Furai Member

    Oh, I'd be interested in that as well. I really need to do some forum changes that would be best done as an add-on. I have some custom login things which I have to apply every upgrade.
    Tott3 likes this.
  3. Cyb3r

    Cyb3r Well-Known Member

    It's still up-to-date, just make sure of these things:
    1. Debug mode is enabled.
    2. You have already created your add-on.
    3. You are creating the template in the master style.
    If all these is done then you should see a drop down list under the large text box on creating a template with your add-on in the list. :)
    Last edited: Oct 9, 2015
  4. Tott3

    Tott3 Active Member

    I managed to find it somehow :eek: I shall have a second look at it then!
  5. Tott3

    Tott3 Active Member

    Well, I got stuck again as it doesn't find my eventListener for some reason. I'm getting "Callback Laddad_Demo_Index::LaddadDemo is invalid (Invalid Class)."

    Here's my PHP code, which is saved inside of "/public_html/laddad_net/dev/library/Laddad/Demo"

    Here's my index.php files which is saved inside of the "Demo" folder.

    class Laddad_Demo_Index{
        public static function LaddadDemo($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template){
  6. Cyb3r

    Cyb3r Well-Known Member

    From the first sight I see you have different file name, it should be Index.php not index.php as written in the class name, haven't looked at the code but that should be the main problem.
    Tott3 likes this.
  7. Tott3

    Tott3 Active Member

    Gaaaah, thanks man. Stupid case sensitive, like forgetting a bloody semi-colon.. :p

Share This Page