The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Ok, so I have changed the code to :
PHP Code:
|
#12
|
|||
|
|||
anyone ? :s
|
#13
|
|||
|
|||
No replies, does this mean it's impossible to do??
|
#14
|
|||
|
|||
it just means noone has a solution to fix your problem.
Now that I've read your requirements, no. you will not be able to do this to use it inside a class. It is still possible, and since you're already mucking around with classes i dont see why you'd need help to copy the data_managers init function to make it work. you will need to reproduce init.php's behaviour to initialise any variables the datamanager requires. |
#15
|
|||
|
|||
I'll look into that, thanks!
Btw, is there also a login function in that class or anywhere else which I can easily use from outside Vb? That would be very nice. |
#16
|
|||
|
|||
im not sure. if there is one itll be in /includes/.
|
#17
|
|||
|
|||
I'm having this problem too. Did anybody find a solution? How do other people integrate vbulletin with their application?
|
#18
|
||||
|
||||
Hi Xia,
(Hope is not too late.. well, it will serve someone else if it's too late for you ) Here's the code to get an instance of vbulletins' registry object (a.k.a $vbulletin). I've placed toghether a couple pieces from various threads here in vb.org (including some of them from this same one, and from https://vborg.vbsupport.ru/showthread.php?t=112388) You can place the function as a method in your class and call it statically like: PHP Code:
I've successfully tested this and used a datamanager, and it worked perfectly (created thread and post correctly :-D) This follows a singleton pattern, so you'll never overwrite the instance, even if the instance was created by vB itself. PHP Code:
Markus |
#19
|
|||
|
|||
Quote:
|
#20
|
||||
|
||||
I'm struggling with this as well. Please help.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|