The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm trying to get the Cybtopstats to show on a non-vb page in an MkPortal CMS. I understand its difficult (perhaps impossible) to get the stats to show on a portal. I can get the stats to show on a normal, non-vb page, just not in my portal.
So in learning/playing, I wanted to see about returning the stats information from a function, but am getting an error of: Fatal error: Call to a member function query_first_slave() on a non-object in C:\wamp\www\mkportal\forum\includes\functions.php on line 1319 And this is the entire php page/function at the moment. I really have no idea what would be causing the error. I'm not connecting or changing to different DB's or anything as I saw could be a cause for this error. PHP Code:
|
#2
|
||||
|
||||
![]()
Probably that you are calling global.php again. You should only call it once on a page.
|
#3
|
|||
|
|||
![]() Quote:
Wouldn't calling the function be getting the global.php file once? |
#4
|
||||
|
||||
![]()
That is all that is in the php page? You need much more than that. See this article - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
If you need more help, you should post the whole php page and template here. |
#5
|
|||
|
|||
![]()
Perhaps I'm confusing myself or not explaining correctly. Currently, I am trying to include the Cyb - Advanced Forum Statistics into the MKPortal cms. It appears that adding these stats to any portal can be rather difficult.
I learned that I can create a non-vb page and show the stats with the below code (add adding the file name to the cybtopstats options), without adding all of the information from the link you provided. I don't think its needed to include all the additional vb phrases, etc or is it? PHP Code:
So I'm looking at various other ways to try and access the $cybtopstats. One thought was to try and do it in a function, and call the function in the portal. Perhaps thats not the best approach. I am open to any suggestion to echo the data. |
#6
|
||||
|
||||
![]()
If you want to include $cybtopstats in another page, you need to actually define it somewhere. Simply echoing it will do nothing because nowhere in that code do you actually define it. (Unless it is somehow defined in some plugin that gets called in global.php?) And, if you expect it to be included in a portal page, does that portal page already 'include' the global.php page or any other vb page?
|
#7
|
|||
|
|||
![]()
I think the best way is to look what the cybtopstats plugin is doing and to copy the code the code instead of including the whole vb "framework"
|
#8
|
|||
|
|||
![]() Quote:
I had copied the plugin code out, and its pretty complex stuff. I'll have to think more on it going forward, and see what I can learn from the plugin code. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|