The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Custom Banned Reason Template
Custom Banned Reason Template
How can I pull the banned reason message that we type into the vbAdminCP when we ban a member? I am trying to create a custom page that has the info but the calls for that phrase show blank when I make my own template for it. Code:
<!-- BANNED REASON --> <tr> <td class="$altbgclass"> <table border="0" cellpadding="10"><tr> <tr><td><phrase argument_list>$vbphrase[nopermission_banned]</phrase></td></tr> </table> </td> </tr> <!-- BANNED REASON --> I want to be able to use the info in my attached image in my own template. |
#2
|
|||
|
|||
Where is your template used? I'm asking because you can't necessarily just use a phrase in your template and have the reason filled in. You would need to have code (like in a plugin) read the reason from the database first. The exception might be if your template happens to be used in a place where it's already been read (like if you're just trying to replace the standard error message template).
But maybe you already know all that - in that case, check out the function print_no_permission() in includes/functions.php. |
#3
|
||||
|
||||
I plan to use it in a vbadvanced cmps block. I want to pull the banned reason to show inside a vba block. Other VB phrases seem easy to pull but this one is proving to be difficult.
|
#4
|
|||
|
|||
Oh...In that case you did understand all that and I didn't understand the question. Sorry.
|
#5
|
||||
|
||||
Oh im with you I just am lost as to how to get the message to show in a vba block. I am gonna need some help with this one.
|
#6
|
|||
|
|||
...but I think I might know what the problem is: that phrase is in a phrase group that isn't loaded. The error message functions call function fetch_phrase() in includes/functions_misc.php to load it when needed.
|
#7
|
||||
|
||||
You I found that out and do not how to proceed. I am guessing I am going to have to code my own plug-in??? to pull the data from the database in a similar manner that is done in the functions.php
I was hoping there was another easier way... |
#8
|
|||
|
|||
Well, you didn't ask but I thought I'd do it anyway:
PHP Code:
I tried this using the global_start hook, I don't know if it's the best hook to use but none of the vba_ hooks I tried worked. |
#9
|
||||
|
||||
Thanks for the help... what am I to do with your code exactly to be able to create a vba block?
|
#10
|
|||
|
|||
It depends on what kind of vBa module you're working with. It looks like you wanted to use it in a template, so you could create a new plugin with hook location "global_start" and use the above code (remember to select "Yes" to make it active), then put $bbuserinfo[banned_reason_text] in the template where you want the text to appear (it will be blank if the user isn't banned).
If you were making a php-type module you could use the above code directly in the module instead of creating a plugin. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|