PDA

View Full Version : Which hook?


HMBeaty
03-20-2009, 09:38 PM
I'm trying to make a plugin for one of my products but can't figure out which hook to use. The TEMPLATE its going in is memberinfo_block_aboutme and its going to display something obviously in the "About Me" section in the member's profile. I figured the hook would be either member_complete or member_customfields but its neither of those. So before I go and start trying each one....which one is it?

--------------- Added 1237590367 at 1237590367 ---------------

Or is there even a hook for that area?

Lynne
03-20-2009, 10:19 PM
If you go into debug mode, the list of plugins for that page get listed on the bottom. You might want to look there. Or, try member_profileblock_fetch_unwrapped

HMBeaty
03-20-2009, 10:22 PM
Nope, that's not it. I'm in debug mode now going through each one. I know my template edit works....it worked before. Just the template got all changed around after I guess 3.7

--------------- Added 20 Mar 2009 at 18:27 ---------------

To show the actual code I'm using now, it's


<plugin active="1" executionorder="5">
<title><![CDATA[[Premier Team Manager] - Add to Member Info]]></title>
<hookname>member_complete</hookname>
<phpcode><![CDATA[if (!empty($userinfo[premierteam]) AND $vbulletin->options['premierteammanagermemberinfo'])
{
$block_data[fields] .= "
<tr>
<td>
<strong>$vbphrase[my_premierteam]:</strong>
<br />
<img src=\"images/premier/" . $userinfo['premierteam'] . ".gif\" border=\"0\" />
<td>
</tr>
";
}]]></phpcode>
</plugin>

Lynne
03-20-2009, 10:51 PM
Have you tried just adding it to the template? Also, you can't use <tr> and <td> there cuz that is not going to be correct right there. Take a look at the page source to see what you need to use.

HMBeaty
03-20-2009, 10:53 PM
My template edit....
<if condition="!empty($userinfo[premierteam])">
<strong>$vbphrase[my_premierteam]:</strong>
<br />
<img src="$vboptions[bburl]/images/premier/$userinfo[premierteam].gif" border="0" />
</if>
That works just fine, but how would I add that to the about me section of the profile in my plugin?