The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Calling a plug-in
I am newbie on this kind of field such as editing vbulletin. Right now, Im trying to add a simple plugin which display the message hi, but sad to say when I run it does not give output or result. How to call a plug-in?how to print data in vbulletin?
Here's my plug in message code $msg = "Test Message" Now, I want to display this message in the bottom part of my page. How?Please guide me guyz.. |
#2
|
|||
|
|||
vbulletin works by having all the output in templates with variables that can be replaced. So to display something you have to choose an existing template (assuming that you're not creating an entirely new page), edit the template to insert your variable, then have your plugin code register the variable to that template. I know, it's too complicated for one sentence.
There are also "template hooks" that let you skip the "register variable" part by using an existing variable, but those are of course limited to where they decided to insert hooks in the templates. For example, there's a hook in the postbit_legacy template that lets you insert things in the user info area of the post. So if your plugin code was $template_hook['postbit_userinfo_left'] = 'Hello";, you'd see Hello in each postbit. One way to figure out which templates are used on a page is to go to the admincp, and in Settings > Options> General Settings, set "Add Template Name in HTML Comments" to Yes. Then if you view the source of a page in your browser, you'll see "BEGIN TEMPLATE" and "END TEMPLATE" comments in the html, and you can study them and figure out which template was used to display parts of the page. To edit a template, you would go to Styles & Templates > Style Manager and select "Edit Templates" from the dropdown menu. Then you can double click on a template name from the list to edit it. To register variables to a template, this article might help: https://vborg.vbsupport.ru/showthread.php?t=228078 And for some of the basics, there's always the online manual in the support section of vbulletin.com (make sure you choose a vb4 version from the dropdown before starting to read). Edit: Oh, and if you don't care about all that and are just trying to get a message displayed, then you can give us more information about exactly what you're trying to do and we'll tell you how you can do it. |
#3
|
|||
|
|||
|
#4
|
|||
|
|||
Quote:
Still my output does not shows up. what's the real problem here. . |
#5
|
||||
|
||||
Let us know the plugin code, what hook you are using, and any template code you have written and/or added.
|
#6
|
|||
|
|||
You are missing the semi-colon ( after your code. Try adding that.
|
#7
|
|||
|
|||
when I add the semicolon, still the result does not shows up. I dont know why, in my hook location I used global start.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|