Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 08-23-2013, 06:35 PM
SwalyAaron SwalyAaron is offline
 
Join Date: Jan 2013
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Calling the AJAX memberlist search

I have a custom vbulletin powered page, one of the field asks to input a name of a member on the forums, I know that vbulletin has an ajax function in private.php?do=newpm and in profile.php?do?newbuddy tried looking in the files couldn't find anything.

Anyways how can I call that ajax function?
Reply With Quote
  #2  
Old 08-23-2013, 09:37 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<label for="bccpmrecips_ctrl" class="full">{vb:rawphrase bcc}:</label>
<div id="bccpmrecips" class="popupmenu nomouseover noclick nohovermenu">
        <input type="text" class="primary full textbox popupctrl" id="bccpmrecips_ctrl" name="bccrecipients" />
</div>
<script type="text/javascript" src="clientscript/vbulletin_ajax_suggest.js?v={vb:raw vboptions.simpleversion}"></script>
<script type="text/javascript">
<!--
        bccrecip_sugg = new vB_AJAX_NameSuggest('bccrecip_sugg', 'bccpmrecips_ctrl', 'bccpmrecips');
        //bccrecip_sugg.allow_multiple = true; 
//-->
</script>
I think this will do it. I got this out of the PM page template and modified it a bit. you can change those element id's, just observe how they match up with params in the JS function. I doubt you want multiple names so I commented out that part
Reply With Quote
  #3  
Old 08-24-2013, 07:39 AM
SwalyAaron SwalyAaron is offline
 
Join Date: Jan 2013
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nerbert View Post
Code:
<label for="bccpmrecips_ctrl" class="full">{vb:rawphrase bcc}:</label>
<div id="bccpmrecips" class="popupmenu nomouseover noclick nohovermenu">
        <input type="text" class="primary full textbox popupctrl" id="bccpmrecips_ctrl" name="bccrecipients" />
</div>
<script type="text/javascript" src="clientscript/vbulletin_ajax_suggest.js?v={vb:raw vboptions.simpleversion}"></script>
<script type="text/javascript">
<!--
        bccrecip_sugg = new vB_AJAX_NameSuggest('bccrecip_sugg', 'bccpmrecips_ctrl', 'bccpmrecips');
        //bccrecip_sugg.allow_multiple = true; 
//-->
</script>
I think this will do it. I got this out of the PM page template and modified it a bit. you can change those element id's, just observe how they match up with params in the JS function. I doubt you want multiple names so I commented out that part

I've actually tried that before, even copied the whole PM box just can't get it to work. Thanks though.
Reply With Quote
  #4  
Old 08-24-2013, 08:35 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will take a look at this tomorrow when I am watching a crappy football game -- Beginning of professional season, they are worse then high school players. Looks to me like that code should work as long as you have the right dependencies.
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 11:49 AM.


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.07417 seconds
  • Memory Usage 2,184KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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