Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Jul 2014, 18:59
Preech Preech is offline
 
Join Date: Aug 2002
AJAX and how it is used

I have been working on a mod for about a month now, I won't disclose the details as of now.
Anyway, the only issue I am having is load content after click a link. I don't even know where to start with how vbulletin and ajax are working.

Could someone just give me a quick lesson on how it is used in the php files, and how it is called in the templates. Help is greatly appreciated.
Reply With Quote
  #2  
Old 27 Jul 2014, 19:47
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Well, I'm not an expert on the subject so hopefully someone else will give a more complete answer, but the short answer is that you could look at ajax.php to see the server side stuff. In fact, you could put your response code in a plugin using hook ajax_start. On the browser side, it's handled in the .js files that are in the clientscript directory, so the templates just include a js file. I didn't follow all the code but it looks like the heart of it is a call to YAHOO.util.Connect.asyncRequest().

Last edited by kh99; 27 Jul 2014 at 19:55.
Reply With Quote
  #3  
Old 28 Jul 2014, 15:00
Preech Preech is offline
 
Join Date: Aug 2002
Okay. I have started looking in the js files

--------------- Added 28 Jul 2014 at 17:12 ---------------

I still don't see how it's being used within the templates....I'm really lost.

--------------- Added 28 Jul 2014 at 17:52 ---------------

Okay. I got it. Seems I didn't need to use that after all. I finally figured out what I was doing wrong. I decided to just use this. I am using this to show templates without leaving from the page.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I am posting this example code...so hopefully it will be useful for someone else to work off. It's not mine, but I found this by searching google.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Social Group and Album Enhancements [AJAX] Album Next & Prev Links Use AJAX Abe1 vBulletin 3.8 Add-ons 63 22 Dec 2013 06:33
Administrative and Maintenance Tools [AJAX] vB Forum Titles AJAX Editor 1.0.1 Deceptor vBulletin 3.8 Add-ons 58 15 Apr 2013 16:49
Social Group and Album Enhancements [AJAX] Album Next & Prev Links Use AJAX Abe1 vBulletin 4.x Add-ons 14 15 Mar 2011 17:53



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:36.

Layout Options | Width: Wide Color: