Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
I'm trying to extract data from a vBulletin forum. It works on a test.php file that I upload but doesn't work when I insert it into CMSMS.
It says that it requires all page extensions to be .php not .htm or .html - would that be the problem? Any way to make this work?
I'm not sure what information I need to provide for something like this, so if you need more information, let me know.
Would my only option be an iframe or something? (ugh)
It says that it requires all page extensions to be .php not .htm or .html - would that be the problem? Any way to make this work?
I'm not sure what information I need to provide for something like this, so if you need more information, let me know.
Would my only option be an iframe or something? (ugh)
Last edited by zeroality on Thu Aug 17, 2006 1:00 am, edited 1 time in total.
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
Please read this:
http://forum.cmsmadesimple.org/index.ph ... 661.0.html
and then this:
http://wiki.cmsmadesimple.org/index.php/Developers_FAQ
http://forum.cmsmadesimple.org/index.ph ... 661.0.html
and then this:
http://wiki.cmsmadesimple.org/index.php/Developers_FAQ
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
Right, thanks for both links.
I got excited when I read that development article but it doesn't work.
I created a user-defined tag called 'phpcall' then inserted the code:
chdir('./forums');
require_once('global.php');
and when I tried to put the {phpcall} in my page, it gave me the error:
Any tips?
I got excited when I read that development article but it doesn't work.
I created a user-defined tag called 'phpcall' then inserted the code:
chdir('./forums');
require_once('global.php');
and when I tried to put the {phpcall} in my page, it gave me the error:
Warning: array_keys() [function.array-keys]: The first argument should be an array in /includes/functions.php on line 3291
Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 3291
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
okay..... now we have something different...
includes/functions.php isn't a CMSmade simple file, and I don't have vbulletin, so it's gonna get dicey. but.
I would guess that if you looked in the includes/functions.php file there's probably an array_keys function, or a call to array_keys
I'd do a grep through vbulletin source for the word array_keys on the same line as 'function' i.e: (hope you have shell access).
my bet is that there's a naming conflict somewhere that needs to be resolved (somehow). This can get difficult with two php applications occupying the same instance.
Let me know how this goes.
includes/functions.php isn't a CMSmade simple file, and I don't have vbulletin, so it's gonna get dicey. but.
I would guess that if you looked in the includes/functions.php file there's probably an array_keys function, or a call to array_keys
I'd do a grep through vbulletin source for the word array_keys on the same line as 'function' i.e: (hope you have shell access).
Code: Select all
cd forms
find . -name '*php' -exec grep array_keys {} /dev/null \; | grep functionLet me know how this goes.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
I'm not sure what to do. I don't know how to fix the problem without screwing up vBulleting or CMSMS.
I changed functions.php to a txt file and uploaded it if you'd mind taking a look? I'd really appreciate it.
http://www.pokerealm.net/functions.txt
foreach (array_keys($vbulletin->forumcache) AS $forumid)
That's line 3291.
I changed functions.php to a txt file and uploaded it if you'd mind taking a look? I'd really appreciate it.
http://www.pokerealm.net/functions.txt
foreach (array_keys($vbulletin->forumcache) AS $forumid)
That's line 3291.
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
it sounds like the $vbulletin object isn't being completely initialized. as either $vbulletin doesn't exist, or $vbulletin->forumcache doesn't exist (or isn't set properly).
Is there something else you have to call to set up $vbulletin after you include your one file ?
Does this little function work in it's on php file ?
Is there something else you have to call to set up $vbulletin after you include your one file ?
Does this little function work in it's on php file ?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
No, it should be fine if I put only that code - it was on my test php page. I did set one up, yeah.
http://www.pokerealm.net/test.php
http://www.pokerealm.net/test.txt
But to be sure, I included both calls and still got the same error.
http://www.pokerealm.net/test.php
http://www.pokerealm.net/test.txt
But to be sure, I included both calls and still got the same error.
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
I was hoping to wake up to an awesome post which fixed all my problems just like that! lol 
Sigh, I just need this one problem fixed and I'll be sitting in butter. I really hope I don't have to go with another CMS, I like this one.
Sigh, I just need this one problem fixed and I'll be sitting in butter. I really hope I don't have to go with another CMS, I like this one.
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
unfortunately it looks like it's gonna be a painful debugging process. You'll have to modify the functions.php to
print out the $vbulletin->forumcache and then trace back to see where it's being initialized (probably something in global.php) and figure out why it's not being set properly.
But I'd start with dumping the $vbulletin->forumcache variable and see what is in it.
it may be something that gives a nice obvious indication as to what is happening.
print out the $vbulletin->forumcache and then trace back to see where it's being initialized (probably something in global.php) and figure out why it's not being set properly.
But I'd start with dumping the $vbulletin->forumcache variable and see what is in it.
it may be something that gives a nice obvious indication as to what is happening.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Can I use php calls in CMSMS pages? (extracting data from a vBulletin forum)
Ah, I appreciate your time and help but unfortunately, I am not an advanced PHP programmer. I know my way around a little but not enough to fix this apparently.
I found a vBulletin-integrated CMS but I really appreciate your help and I have already recommended CMSMS to two other people and it will work great for them. Thanks again.
Edit: Actually that didn't work out so well, I'll just stick an iframe in there and see if that works. If not, I suppose I can live without vBulletin integration.
That would be a good thing for CMSMS to look into for a future version though. A vBulletin integration module would probably get a lot of downloads.
Edit 2: iframe worked good. I'm happy.
I found a vBulletin-integrated CMS but I really appreciate your help and I have already recommended CMSMS to two other people and it will work great for them. Thanks again.
Edit: Actually that didn't work out so well, I'll just stick an iframe in there and see if that works. If not, I suppose I can live without vBulletin integration.
That would be a good thing for CMSMS to look into for a future version though. A vBulletin integration module would probably get a lot of downloads.
Edit 2: iframe worked good. I'm happy.
Last edited by zeroality on Fri Aug 18, 2006 2:04 am, edited 1 time in total.

