Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 09-13-2007, 04:19 PM
JPnyc JPnyc is offline
 
Join Date: May 2005
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default combining AJAX calls

I was about to embark on a project but figured I should come here first and ask if such a thing is even possible. With the Ajax features already included in vBulletin 3.5 and up, can calls to other objects/page elements be added onto the existing Ajax features/functions?

In other words, if when Post submits or edits are updated by Ajax, can I also update other page elements with the same function call/user event?
Reply With Quote
  #2  
Old 09-14-2007, 09:11 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, if there are hooks available in the correct places.
Reply With Quote
  #3  
Old 09-14-2007, 06:47 PM
JPnyc JPnyc is offline
 
Join Date: May 2005
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I created a plug-in containing the function calls I need, and hooked it on Ajax start, then I tried it on Ajax complete, that I tried it on edit, but no dice. Can anyone give me a clue how I can get these functions called on Ajax post submits an Ajax edits submits?
Reply With Quote
  #4  
Old 09-20-2007, 12:10 PM
JPnyc JPnyc is offline
 
Join Date: May 2005
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone give me a clue which hooks?
Reply With Quote
  #5  
Old 10-04-2007, 04:43 PM
JPnyc JPnyc is offline
 
Join Date: May 2005
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would the Ajax_start and/or Ajax_complete hooks call anything when posts are submitted or edited with Ajax enabled? Or would the post-editing hooks still apply? I've tried a few to to no avail thus far.

--------------- Added at 00:15 ---------------

Wow, thanks for all the help, folks. Might I suggest a forum name change to "gofindyourownanswers.org" ?
Reply With Quote
  #6  
Old 10-11-2007, 04:30 PM
JPnyc JPnyc is offline
 
Join Date: May 2005
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I still can't solve this. Am I better off writing my own AJAX script and just calling it onclick of the edit/submit buttons, or is there a way for me to piggyback on the existing AJAX functions in vb 3.5.7? The page elements I wish to reload are randomly loaded serverside with PHP. They're included in a plugin, and placed into vars for placement into forum templates, if that helps to any degree.
Reply With Quote
  #7  
Old 10-11-2007, 05:48 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you want to do something like update the user's post count in all the posts instead of just the new one?
Reply With Quote
  #8  
Old 10-15-2007, 12:43 PM
JPnyc JPnyc is offline
 
Join Date: May 2005
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi, thanks for the reply. No, we have three advertising positions that need to be called along with the Ajax functions, and reloaded to the page via Ajax. What I don't know is if there is any way to add them to the existing Ajax functions in 3.5, or if I have to write a separate Ajax script and call it either on click of the edit/submit buttons, or via a plug-in.

In short, I really have no idea of how to address this, regarding the direction to go in. So far I'm even having difficulty locating the Ajax script in 3.5. It's easy to find in 3.6
Reply With Quote
  #9  
Old 10-15-2007, 07:31 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

IMO, it would be easier to fire your own ajax routine to fetch the ads when the user clicks "post" than to try and piggyback on the vb routines.
Reply With Quote
  #10  
Old 10-16-2007, 01:35 AM
JPnyc JPnyc is offline
 
Join Date: May 2005
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, thanks. That's how I'll approach it then
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 12:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04413 seconds
  • Memory Usage 2,237KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete