PDA

View Full Version : Changing class_core.php path and admincp dir to a sub-folder


Inna
04-04-2018, 12:56 PM
Hi, how can I change the class_core.php path? I know how to change config.php's, but I don't know class_core's.
Also I wanted to change admincp directory to a sub-folder, like "includes/admincp". I changed this in the config file and saved, and also in the footer links of my forum it links to the http://site.com/includes/admincp/index.php, but when I click on it, it shows 500 error.
I tried to find any lines relating to the path in admincp/index.php, but either found nothing or unable to find the relevant thing.
Can you help me for the both?
Thanks

Dave
04-04-2018, 01:24 PM
Why would you want to change the class_core.php path? I highly recommend you to keep the original directory structures aside from the admincp directory.

Also the admincp directory must be in the root of your forum, but it can be named anything. It cannot be inside of another directory.

If you're worried about security, just add an additional password to your admincp directory. http://www.htaccesstools.com/articles/password-protection/

Inna
04-04-2018, 01:28 PM
Thanks Dave, I want to just change these two only to see how to change and to see if I get any errors. Just playing with vBulletin.
I know how to add password for each folder/file.

Dave
04-04-2018, 01:32 PM
The following files reference to class_core.php either through a comment or through an inclusion:
includes\functions_filesystemxml.php
includes\init.php
includes\md5_sums_vbulletin.php
install\init.php
install\tableprefix.php
vb\db\result.php
vb\input.php

You mainly want to look at the init.php file.

Inna
04-04-2018, 01:39 PM
Thanks Dave for the fast response.
I'll be looking at that.
What about admincp? It requires much modifications? Or I better ignore that?

Dave
04-04-2018, 01:41 PM
The global.php file in the admincp directory contains this line:
chdir('./../');

If you want to put the admincp inside of another directory, you have to add another ../ to it. I'm not sure if images/scripts and such still work though.

Inna
04-04-2018, 02:00 PM
Thanks again Dave, that did the trick.
But after changing the name and path in init.php, forum did not run, so I took a look at error_log and see this error:
PHP Parse error: syntax error, unexpected 'Content' (T_STRING) in /home/***/public_html/forum/includes/init.php on line 722
The line 722 is
<head>
<script type='text/javascript' src='//connect.facebook.net/en_US/sdk.js'></script>
<script type='text/javascript'>
FB.init({
appId : '{$vbulletin->options['facebookappid']}',
version : 'v2.2',
status : false,
cookie : true,
xfbml : false
});

FB.getLoginStatus(function(response)
{
window.top.location.reload(true);
});
</script>
</head>
<body></body>
</html>
The first line is line 722 and the last line is 740
I commented these tags and now the forum runs well, logged in and everything is well.
What do these lines do? Are they related to facebook log in? And only facebook log in?

Dave
04-04-2018, 02:36 PM
Yes, but that error should not be happening.

Inna
04-04-2018, 03:31 PM
Thanks again, I was working on admincp modifications. The new path runs well after modifying the global.php in admincp, but css and some hrefs are not correct and I was working on it.
That's interesting to modify:D
Thanks a bunch