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

XF 1.0 Creating a Simple Modification

Discussion in 'Have You Seen...?' started by Kier, Sep 10, 2010.

  1. Kier

    Kier XenForo Developer Staff Member

    By exposing code events and allowing listeners to attach to them, XenForo makes it easy to alter its default functionality with simple callback classes.

    The API for doing this is well-defined and documented, so modifications made in this way stand a very good chance of remaining backward compatible through future version updates.

    This video shows me creating a simple add-on that allows us to see how an existing thread would look with over a thousand pages.



    As usual, it's a large, HD video, so I suggest you view it at its original size by clicking the full-screen gadget in the bottom-right corner of the video.

    Edit: If for whatever reason you can't view the video here, view it directly on Vimeo (but please leave comments here, not there).
     
    Liam W, Eagle, RoldanLT and 34 others like this.
  2. Lawrence

    Lawrence Well-Known Member

    Nice video, Kier. Wow, that didn't take much to create the addon, nor did it take any time. I liked how you covered changing set options, too.
     
    AmericanForum.com likes this.
  3. Tigratrus

    Tigratrus Well-Known Member

    Have to go do some lawn type work... But on first brush it looked like a great improvement on prior systems! :)
     
  4. GameR

    GameR Active Member

    Nice try.

    The Api i not really like, about static call. But the administration is really nice! God job.
     
  5. Vincent

    Vincent Well-Known Member

    Whoooaaaah! Nicenicenice, it makes me wanna start already :(
     
    AmericanForum.com likes this.
  6. James

    James Well-Known Member

    Great work, I can't wait to get my hands dirty with it!
     
  7. AmericanForum.com

    AmericanForum.com Well-Known Member

    " The API for doing this is well-defined and documented, so modifications made in this way stand a very good chance of remaining backward compatible through future version updates."

    Nice ... the past, present and future is planned in the same code. :)
     
  8. Hatsu

    Hatsu Member

    Well, that looks interesting and I'm looking forward to it :)
     
  9. Cezz

    Cezz Well-Known Member

    Very nice plugin system I like it...

    As for the fon't size decreasing on the navigation so more numbers will fit this is worrying, when we get to forums that have 20k or ever 100k pages of threads how small are those numbers going to look?
     
    itopidea likes this.
  10. Been Told

    Been Told Well-Known Member

    Really impressed. I could actually follow this tutorial and I'm having a strong suspicion, that I will actually be able to create XenForo addons myself! That is what I've really really been hoping for.
    The promise of good documentation is also something that really makes me feel better about my chances of writing addons myself.

    Thanks so much for this :)
     
  11. Mert

    Mert Well-Known Member

    It looks great and i am so excited to get my hands on the code to start modifying things.
     
  12. Been Told

    Been Told Well-Known Member

    I'm 99% certain that all it takes is one line of CSS to change that behavior. I highly doubt it's hard-coded.
     
  13. Kier

    Kier XenForo Developer Staff Member

    Optimise for the common case. Threads with over 9,999 pages? I don't think I've ever seen one.
     
    AmericanForum.com and Grover like this.
  14. SneakyDave

    SneakyDave Well-Known Member

    that itself is important, but even if there are changes to the underlying API, it appears that required changes to plug-ins shouldn't be too difficult, unless what you describe as "events" are heavily modified.
     
  15. James

    James Well-Known Member

    I love how the Listener Editor shows us what the arguments are :)
     
  16. Brogan

    Brogan XenForo Moderator Staff Member

    You could always increase the posts per page (ppp) to 30, that would instantly reduce the number of pages by 30%.

    So a 20,000 post thread with 20 ppp would have 1,000 pages.
    On a 30 ppp thread, that would be just 667 pages.
     
  17. Dean

    Dean Well-Known Member

    I have the exact same thoughts.

    At some point we need a young childs voice in some of these to infer how simple things can be. : )
     
    Alien, Been Told and Jeremy like this.
  18. Jeremy

    Jeremy XenForo Moderator Staff Member

    I cannot wait to go back to my dorm and watch this. Looking forward to programming for XenForo.
     
  19. Cezz

    Cezz Well-Known Member

    You won't see a thread with over 9,999 pages but you may see a forum with over 9,999 pages... 20 threads per page 10,000 pages would only be 200,000 threads quite possible.
     
  20. Cezz

    Cezz Well-Known Member

    Again I am talking about threads in a forum instead of posts in a thread as the same navigation setup is used there... if you get above 9,999 pages then you would be going into the 10k page mark and that font may become very small then.
     

Share This Page