![]() |
First Plugin - King of the Forum Modification
Hi everyone,
Sorry if this is the wrong forum, but I'm just looking for some suggestions on how to do this. The idea is to use a hook in the plugin system to insert some HTML into the page when it's writing out a post for a specific user. The idea is: PHP Code:
The problem is, I know next to nothing about vBulletin, which hook to use (I was thinking 'postbit_display_start'), or what variable to use to insert it into. Am I supposed to search through the code for it? Sorry for the open-ended question. Any advice you can give would be appreciated. |
Quote:
As far as posts, just make a template edit in postbit (or postbit_legacy if that is what you are using) and wrap the appropriate part with: Code:
<vb:if condition="is_member_of($bbuserinfo, KING_USERGROUP_ID)"> |
What lance says about the template edit is the correct way to do this, but I think adding a usergroup is overkill IMO, you can test for an individual userid...
In VB 4.x find the line in the postbit/postbit_legacy template: Code:
{vb:raw post.message} Code:
<vb:if condition="$bbuserinfo[userid] == 42"> Code:
<vb:if condition="$bbuserinfo[userid] == 42"> If it's VB3 the code would be: Find: Code:
$post[message] Code:
<if condition="$bbuserinfo[userid] == 42"> Code:
<if condition="$bbuserinfo[userid] == 42"> |
I considered a userid only, but the reason I suggested a usergroup is so a template edit doesn't need to be made every time there is a new king.
|
Quote:
|
Quote:
|
All times are GMT. The time now is 01:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|