PDA

View Full Version : include in product xml?


Dylanblitz
02-25-2010, 11:01 PM
I have a product xml that has an include statement to call a php file. It used to work in 3.x but with 4.x it keeps saying it can't find the file. I've tried changing it to require_once and require with no dice. Anyone know the proper syntax to call a php file located in the admincp from the install code of a product?

The line is

require_once(DIR . '/admincp/garage_update_2.0.0.php');

Paul M
02-26-2010, 10:52 AM
Nothing has changed in 4.0.

The only reason it would fail is if the file does not exist - since its the acp, are you sure the folder name has not been changed.

Dylanblitz
02-26-2010, 03:45 PM
yeah it's still admincp, I checked on a 3.8.4 upgrade and fresh install just to be sure heh.

I'm not sure what the problem is. I can get it to work locally on my windows test box. It seems a lot of the users have having problems with it on linux systems.
If it was just one person I'd think they just didn't upload the file to the right directory but it's happening with a lot of users.

Ah well, thanks for the input, I'll keep plugging at it :)

compwhizii
02-27-2010, 02:18 PM
Quick suggestion, for usability you should be getting the name of the folder from $vbulletin, as a user could change it.

Vaupell
02-27-2010, 02:52 PM
Quick suggestion, for usability you should be getting the name of the folder from $vbulletin, as a user could change it.

yes agree, i didnt think any user would use default named admincp and modcp folders
i always rename them, and create a dummy, also on boards i setup..

you know,, just in case..

Dylanblitz
02-27-2010, 07:35 PM
duh, I see what you meant now Paul. Thought you were talking about the out of box ACP directory :)

Thanks guys, I'll try that. Didn't even think about it.