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

XenForo AJAX Tutorial

Kier

XenForo Developer
Staff member
#1
Last week, I promised to do a tutorial for add-on developers, in which I would explain how to use some of XenForo's AJAX facilities.

I thought a video would make a good vehicle for this tutorial, as it makes the subject a little more accessible for non-developers who are interested in the system, and the first parts of it are now ready.

In this video, we look at the XenForo Overlay system, and how to get content loaded into overlays, and then we investigate how to load other pages into the current page with AJAX, including any extra CSS they may reference.

Further parts of this tutorial will follow.

Or view on Vimeo.com
 

Jeremy

Well-known member
#7
I love your videos, and will watch this when I get back to my room... (I'm surrounded by a bunch of people who wouldn't be happy if I started to watch a video... haha)
 
R

ragtek

Guest
#12
These videos never play for me on this site through FF, however they play from the uploaded site in FF fine http://vimeo.com/16893821

Anyway thanks for this great video :)
For me it also not plays from there:(

I really really hope, that we will have a real documentation.
It's nice but really hard to read nonstop the existing code if you want to know how something is working:(
 

Jeremy

Well-known member
#13
Kier... just... wow. I can't believe it was THAT easy to do an AJAX insertion. I was ready for a Step 2 to be hard javascript. I'm pretty sure even I could do that! Question tho, your append has a border around the content. Is it possible for us to write our template in such a way that that doesn't occur?
 

RickM

Well-known member
#14
Ahh great! Just started on my second custom mod and will be needing this :D

Cheers Kier - really glad to see you've not gone potty prepping for the IB lawsuit!
 

Kier

XenForo Developer
Staff member
#16
Question tho, your append has a border around the content. Is it possible for us to write our template in such a way that that doesn't occur?
My insert has a hard border because the content being inserted had class="sectionMain". There's nothing to say that it has to have that, or any other class - the styling of the inserted content is entirely at your discretion.
 

Jeremy

Well-known member
#17
That's definitely good to know. It should make XenForo's add-on's 20x nicer to use, because let me tell you, without this, you'd never have gotten something like this if I programmed it.
 

Jamie

Well-known member
#20
I am not a coder and I am amazed that the thought you guys are putting into this system!

You make me want to learn how to code!

Jamie