PDA

View Full Version : How to include php file in my template plugin?


tapatalk
06-05-2013, 09:24 PM
Hi:
I'm developping plugin on vb5.
I want to know how to include a separated php file in my template?
And there are some many limit on vb5 template syntax,I can not write php code freely in template.So what should I do?
Any help would be appreciative!

tapatalk
06-06-2013, 04:26 AM
Anybody can help?

Need include my php file in vb5 template or freely write php code in template,any other solutions?

Thanks.

Lynne
06-06-2013, 05:03 PM
Why don't you just use a PHP module? Is that what you are trying to do and you just want to include a file in it instead of putting the php directly in there?

tapatalk
06-07-2013, 06:57 AM
Hi Lynne:
Thank you for your reply.
I'm developping hook for vb5,I need include php file or write many php code for my hook.As you know vb5's hook need binding template,and vb5 template syntax has many limit and I can not freely write php on it.So do you have any advice and guide for this requirement?
Thanks.

Zachery
06-07-2013, 08:01 AM
vBulletin 5 doesn't have php hooks currently.

Lynne
06-07-2013, 04:47 PM
As Zachery said, there are no php hooks so I really don't understand what you are trying to do.

Wayne Luke
06-07-2013, 05:34 PM
I've uploaded some basic documentation on API Extensions and Hooks to here.

The addon system in vBulletin 5 is different and the idea of PHP Plugins embedded in the database should be discarded. You probably will not be able to simply update your existing plugins, you'll need to rewrite how you retrieve information from the API or have your app call the API directly.

tapatalk
06-08-2013, 02:10 AM
Hello Wane Luke:
You gived documents package 'ExtensionsAndHooks.zip' looks great.Maybe I need develop a extension and api extension for our plugin to implement my special requirements?
But I think the documents you gived is not detailed enough?We want a detailed document for describing how to make extension and api extension step by step,and need make install package for it.I can not find any valid document in vb5 online document pages for extension or api extension:
http://www.vbulletin.com/manual/

Thank you very much.

Shadow
06-08-2013, 10:32 AM
There isn't much else in terms of API documentation as far as I'm aware.

tapatalk
06-09-2013, 03:44 AM
So what should I do now?Stop my work and wait the detailed document for api extension?

trancegodly
08-02-2013, 10:20 PM
I've uploaded some basic documentation on API Extensions and Hooks to here.

The addon system in vBulletin 5 is different and the idea of PHP Plugins embedded in the database should be discarded. You probably will not be able to simply update your existing plugins, you'll need to rewrite how you retrieve information from the API or have your app call the API directly.

Thank you so much for this, sadly your pdf's have more info then the manual for 5.0.4 lol.

tapatalk
10-21-2013, 09:59 PM
I've uploaded some basic documentation on API Extensions and Hooks to here.

The addon system in vBulletin 5 is different and the idea of PHP Plugins embedded in the database should be discarded. You probably will not be able to simply update your existing plugins, you'll need to rewrite how you retrieve information from the API or have your app call the API directly.

Hello,

I tried to write some extension code as your gave pdf document,but when I call the method in template it does not work.

The following is my code:
class Testzz_Api_Site extends vB_Api_Extensions {
protected $product = 'zzz';
protected $developer = 'ttt';
protected $title = 'test Product';

protected $minver = '5.0.0';
protected $maxver = '5.0.99';

protected $AutoInstall = 1;
protected $extensionOrder = 10;

public function testCodeFunc($prev) {
return '<!-- test package -->';
}
}

I called the method in template:
{vb:data wzttestvar,Testzz_Api_Site, testCodeFunc}
{vb:raw wzttestvar}

How can I make this work?

And I remembered that there are some xml folder and file need to be maked inside the package folder,should I create xml folder for the extension,but I do not know how to make the xml file for the extention api?

Thanks.


Btw:
I'm Tapatalk Tom Wu,We may need vBulletin official team to give us more guide on the VB5 plugin development,and we may can start more deep technical cooperation with your company.:)

Any help would be appreciated.

tapatalk
10-23-2013, 04:31 AM
Is there any solutions for it?

Thanks.

tapatalk
10-26-2013, 06:43 AM
Can not get any help from here and official side?
It is disillusionary.

Zachery
10-26-2013, 10:15 AM
This is a community based site, you might want to ask questions about what isn't working, or what is working, or what exactly is going wrong.

tapatalk
10-26-2013, 10:20 AM
Yes,we do not know how to make my extension api work.
Maybe we need at least a full example extension package and detailed document to guide us to completely implement our own extension.

Could you guide us?

And we may can start more deep technical cooperation with your company.

Any help would be appreciated

Thanks.

Zachery
10-26-2013, 05:03 PM
Have you looked at any of the third party addons?

tapatalk
10-27-2013, 12:13 AM
I've studied the default extensions in VB 5,but I still do not know how to make my first extension api work.
Maybe we need a guiding document to tell us the full process for implementing an api extension.

Could you recommend us some third party addons and detailed urls for the first example?

Thanks.

tapatalk
10-29-2013, 08:36 AM
Any updates?

Or could you tell us where to get the addons for vBulletin 5?

ozzy47
10-29-2013, 10:23 AM
Here is where all the current mods for vB5 are, vBulletin 5.x Products & Extensions (https://vborg.vbsupport.ru/forumdisplay.php?f=258)