The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
Youch. Impossible question, or wrong way to ask?
Cover me, I'm going in... |
#3
|
||||
|
||||
I don't recall having seen anything like what you are talking about. Have you tried searching the mods area?
|
#4
|
|||
|
|||
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...) |
#5
|
|||
|
|||
Quote:
However I would like to see vb record any changes at least for the forum admin(s). |
#6
|
||||
|
||||
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. |
#7
|
|||
|
|||
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... |
#8
|
||||
|
||||
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.
|
#9
|
|||
|
|||
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... |
#10
|
||||
|
||||
Whoops, you are right, I should have looked at the edit profile page instead of the edit options page.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|