vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Changing class_core.php path and admincp dir to a sub-folder (https://vborg.vbsupport.ru/showthread.php?t=326267)

Inna 04-04-2018 12:56 PM

Changing class_core.php path and admincp dir to a sub-folder
 
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/article...rd-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:
PHP Code:

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:
HTML Code:

PHP Parse error:  syntax error, unexpected 'Content' (T_STRING) in /home/***/public_html/forum/includes/init.php on line 722
The line 722 is
PHP Code:

            <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


All times are GMT. The time now is 11:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01039 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete