2009-03-26, 11:12 PM
It's a class that has functions that allow you to use MyBB functions on a custom site.
MyBB Integrator / MyBB SDK (Version 1.3)
|
2009-03-26, 11:12 PM
It's a class that has functions that allow you to use MyBB functions on a custom site.
This works....
The above works only if the file "testpage.php" is in the same directory as the forum. When using in another directory... ... then the file "global.php" does get included (since I changed the file path), but...
global.php has at least one "require_once" file and the file paths are always messed up when including "global.php" in any file outside of MyBB's root. Please, anyone, tell me how to solve this, before I waste a lot more time. Thank you. EDIT: What if I change all the "require_once" file paths in "global.php" to the full path "/home/usename/public_html...etc..." ? EDIT#2: int.php has a large number of required files, so what if I change them all to the full file path. Will this work? What is the better option?
#
MyBB is the best forum software!
Please give us a short info on how your folder structure looks.
If you are in the root folder like /public_html/ and your mybb is located in /public_html/mybb/, while your "outside-mybb-file" is in /public_html/ you need to use the folder path:
In case that does not work I would like to know if you get the same errors using chmod. On my webspace, it didn't matter if I used chmod or included global.php directly. But maybe that is not common..
2009-03-27, 08:33 AM
(2009-03-27, 06:20 AM)No0oB Wrote: Please give us a short info on how your folder structure looks. Yes, that is the way I was trying to use it. Since the error message mentions, "Warning: require_once(./inc/init.php)...", I'm assuming the code inside 'global.php' was included, and now the system is trying to find "./inc/init.php" in the wrong place. (2009-03-27, 06:20 AM)No0oB Wrote: In case that does not work I would like to know if you get the same errors using chmod. I'm not sure exactly what you mean by using chmod for this. FYI, the problem does happen on more than one host.
#
MyBB is the best forum software!
2009-03-27, 01:40 PM
What exactly is your folder structure on your webhost?
2009-03-27, 05:38 PM
(2009-03-27, 01:40 PM)No0oB Wrote: What exactly is your folder structure on your webhost? forum = /public_html/mybb/ testpage.php (site to integrate) = /public_html/
#
MyBB is the best forum software!
2009-03-27, 06:14 PM
Then your include code needs to be:
If that does not work, try to declare a constant holding your Root Site. I did that with codeworld. It looks like the following:
2009-03-28, 02:57 AM
^^^
I might try the constant later. For now, I got it working this way...
The above works on at least one host. Thank you, very much for the Integrator class.
#
MyBB is the best forum software!
You would have to chdir back thou....
So your Integration Class is located in the mybb folder? Maybe that was the reason it didn't work Little Update: Added a fancy download counter! Will also add a comment system to enable direct feedback. Also, in a week or so, I will start enhancing the Integrator. Let's see what's needed.
2009-03-28, 10:02 PM
The ideal solution is to fix global.php et al to make use of the dir_name function in PHP, so we don't have to chdir before including them.
|
« Next Oldest | Next Newest »
|