![]() |
Ok, so I have changed the code to :
PHP Code:
|
anyone ? :s
|
No replies, does this mean it's impossible to do??
|
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. |
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. |
im not sure. if there is one itll be in /includes/.
|
I'm having this problem too. Did anybody find a solution? How do other people integrate vbulletin with their application?
|
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 |
Quote:
|
I'm struggling with this as well. Please help.
|
All times are GMT. The time now is 01:23 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|