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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-07-2009, 07:50 AM
David LeBow David LeBow is offline
 
Join Date: Aug 2008
Location: Switzerland
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Automatically create thread when a member profile changes?

I expect it's possible, I expect I could find it eventually, but I expect that 30 people have long since solved it, so I thought I'd ask first:

Is there code around which creates a thread each time a member profile changes?

We have a relatively small forum where people are relatively interested in the profile information in particular. It'd be useful to have a post appear in a forum: "Bill Bloggs has uploaded his CV", "Janet Jackson has updated her medical history"... that kind of thing.
Reply With Quote
  #2  
Old 01-08-2009, 12:49 PM
David LeBow David LeBow is offline
 
Join Date: Aug 2008
Location: Switzerland
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Youch. Impossible question, or wrong way to ask?

Cover me, I'm going in...
Reply With Quote
  #3  
Old 01-08-2009, 01:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't recall having seen anything like what you are talking about. Have you tried searching the mods area?
Reply With Quote
  #4  
Old 01-08-2009, 02:07 PM
David LeBow David LeBow is offline
 
Join Date: Aug 2008
Location: Switzerland
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes... but it's the proverbial needle/haystack thing, I'm afraid. I'll have a look through the code looking for hooks and use an educated guess.

Is there a documented list of vB hooks around?

As always: thanks for the help.

(I hope that you've got a really lucrative contract with vBulletin and that it's not all just for the Karma...)
Reply With Quote
  #5  
Old 01-08-2009, 02:56 PM
Rene Kriest Rene Kriest is offline
 
Join Date: Jun 2008
Location: Germany ./. Reality
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by David LeBow View Post
We have a relatively small forum where people are relatively interested in the profile information in particular. It'd be useful to have a post appear in a forum: "Bill Bloggs has uploaded his CV", "Janet Jackson has updated her medical history"... that kind of thing.
There are addons around that record the profile changes with more detail but only in adminCP.

However I would like to see vb record any changes at least for the forum admin(s).
Reply With Quote
  #6  
Old 01-08-2009, 03:00 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's one of the 3.7.x hook lists - https://vborg.vbsupport.ru/showthrea...ighlight=hook* But, the best thing to do is find the code/script called when a user hits Save on the Profile Page. Take a look at that page and find a hook to use and write a plugin to create a thread.

Karma is a wonderful thing.
Reply With Quote
  #7  
Old 01-08-2009, 03:04 PM
David LeBow David LeBow is offline
 
Join Date: Aug 2008
Location: Switzerland
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ha - there's a post in the hooks thread you reference which asks the same question:

"Are there any hooks that fire off after a user updates their profile?

I need to write a plugin that reflects profile changes in a secondary application and rather than do a batch job every hour, it makes sense to use a hook if there is one available.
".

Oddly enough... unanswered since September. I'm guessing that I have my work cut out for me...
Reply With Quote
  #8  
Old 01-08-2009, 03:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Taking a quick look at the Edit Options page on my profile (3.8 RC1), I see that the form calls profile.php?do=updateoptions . So, look in there are at the do=updateoptions and I'm sure you will find what you need.
Reply With Quote
  #9  
Old 01-08-2009, 03:28 PM
David LeBow David LeBow is offline
 
Join Date: Aug 2008
Location: Switzerland
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit Options is the wrong place, I believe.

I'm looking for profile fields as found, for example at profile.php?do=editprofile. I haven't gotten there yet as I'm currently plowing through the (clasically undocumented) Member.php, where one can ALSO edit one's own profile information. I'm guessing that I'll again end up at the point where there's a hook in one place but not the other, making the functionality seem buggy to the poor user... In Member.php I didn't really see the place to insert the magic - looking at the template next. Will look at profile.php next.

Thanks.

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

Yes... reaching that conclusion. I don't see the way to cover the functionality in Member.php, but in Profile.php, there's hope. There's a hook pair which seems promising: 'profile_edit_start' and a hook 'profile_updateprofile'.

I've been in Software engineering for mumbledymumbledy years but up until now have had no experience in PHP and its execution environment. Can I copy away the $userdata in the first hook into a variable I can call my own (e.g.: $myuserdata) at the first hook and have it be available at the second...? I'm guessing that the answer is no as it would have to be maintained across subsequent calls to the web server. Is that something one could *somehow* copy into the session and retrieve?

Woe is me...
Reply With Quote
  #10  
Old 01-08-2009, 04:08 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whoops, you are right, I should have looked at the edit profile page instead of the edit options page.
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 07:01 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.05073 seconds
  • Memory Usage 2,255KB
  • 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)bbcode_quote
  • (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
  • (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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete