vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Automatically create thread when a member profile changes? (https://vborg.vbsupport.ru/showthread.php?t=200943)

David LeBow 01-07-2009 07:50 AM

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.

David LeBow 01-08-2009 12:49 PM

Youch. Impossible question, or wrong way to ask?

Cover me, I'm going in...

Lynne 01-08-2009 01:55 PM

I don't recall having seen anything like what you are talking about. Have you tried searching the mods area?

David LeBow 01-08-2009 02:07 PM

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...)

Rene Kriest 01-08-2009 02:56 PM

Quote:

Originally Posted by David LeBow (Post 1703968)
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).

Lynne 01-08-2009 03:00 PM

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. :)

David LeBow 01-08-2009 03:04 PM

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...

Lynne 01-08-2009 03:14 PM

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.

David LeBow 01-08-2009 03:28 PM

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...

Lynne 01-08-2009 04:08 PM

Whoops, you are right, I should have looked at the edit profile page instead of the edit options page.


All times are GMT. The time now is 07:11 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.01104 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete