Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 12-12-2012, 02:53 PM
mokujin's Avatar
mokujin mokujin is offline
 
Join Date: Oct 2005
Location: Czech
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The user will have to validate (or fill the code you gave) via Edit Profile - Additional Information ?
Reply With Quote
  #12  
Old 12-12-2012, 03:58 PM
vibethemes vibethemes is offline
 
Join Date: Nov 2012
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, user will fill the additional fields in "About me" tab and click save (ajax save).....my plugin gets triggered at user_presavedata hook. which means (correct me if I am wrong) that when user enters the value and clicks save, my plugin executes first before saving the value in the database.
My plugin then validates that the entered information is consistent (i.e the API call) and then I change user's usergroup and the value is saved in the profile field.....
Reply With Quote
  #13  
Old 12-12-2012, 04:23 PM
mokujin's Avatar
mokujin mokujin is offline
 
Join Date: Oct 2005
Location: Czech
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would rather create a custom page where your users can validate, add a new database table with codes inserted than using the method which you are trying to do.
Reply With Quote
  #14  
Old 12-12-2012, 05:55 PM
vibethemes vibethemes is offline
 
Join Date: Nov 2012
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would not be going for new database as the code is unique for every user and I validate it via a 3rd party call, so I am not aware of the codes the user is having...
Anyways, I believe that I am not doing this right:
PHP Code:
file_get_contents('some API URL'.$this->userfield["field7"].'.json'); 
as soon as I pass the contents of json everything works fine...
Reply With Quote
  #15  
Old 12-12-2012, 06:06 PM
mokujin's Avatar
mokujin mokujin is offline
 
Join Date: Oct 2005
Location: Czech
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So tell me, what your 'some API URL' is?
Reply With Quote
  #16  
Old 12-12-2012, 06:10 PM
vibethemes vibethemes is offline
 
Join Date: Nov 2012
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

~~ url removed ~~

just a sample...

--------------- Added [DATE]1355339588[/DATE] at [TIME]1355339588[/TIME] ---------------

I found a js error which appears when someone tries to change the profile field.


--------------- Added [DATE]1355340181[/DATE] at [TIME]1355340181[/TIME] ---------------

I tried with Curl also but no luck....any clues how/why am I getting this js error on profile field save?
Here's my forum link (in case you want to try):
http://forums.vibethemes.com

--------------- Added [DATE]1355341379[/DATE] at [TIME]1355341379[/TIME] ---------------

Update: API call works, validate working, some issue with json handling....working on it..

--------------- Added [DATE]1355370916[/DATE] at [TIME]1355370916[/TIME] ---------------

Finally got it working!!

Cheers!
( v )
http://forums.vibethemes.com
Reply With Quote
Reply


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 06:39 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04209 seconds
  • Memory Usage 2,210KB
  • Queries Executed 11 (?)
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)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete