The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Widgets/Modules
Anyone found out how to create widgets yet? I haven't really had much chance to look around and find out how, I imagine it's like a template thats within the widget?
|
#2
|
|||
|
|||
Widgets are a part of products. And there are different types of widgets.
The way I've been creating them is to manually add them into the <widget> section of the product install XML. In the sample below, a PHP widget would be created with 2 fields. One field is the title for the widget, the other contains PHP Code... Code:
<widget> <title>New Widget</title> <template>widget_15</template> <admintemplate /> <category>Display</category> <icon>module-icon-php.png</icon> <cloneable>0</cloneable> <guid>myproduct-widget_15-UNIQUE_ID_NUMBER_GOES_HERE</guid> <definitions> <definition> <name>title</name> <label>Title</label> <field>Text</field> <isrequired>1</isrequired> <isusereditable>0</isusereditable> <displayorder>1</displayorder> <validationtype>force_datatype</validationtype> <validationmethod /> <defaultvalue>New Widget</defaultvalue> </definition> <definition> <name>code</name> <label>PHP Code</label> <field>LongText</field> <isrequired>0</isrequired> <isusereditable>1</isusereditable> <displayorder>2</displayorder> <validationtype>force_datatype</validationtype> <validationmethod /> <defaultvalue>echo 'Hello';</defaultvalue> </definition> </definitions> </widget> |
#3
|
|||
|
|||
If you have experience of creating widgets for cms, then it will be very easy to create widget/module for vB5.
You can pull fetch_rows (ex: for latest threads) by creating a class in core/vb/api folder and then by using Code:
{vb:data variable_name, classname, function_name, arguments) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|