Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 04-04-2018, 12:56 PM
Inna Inna is offline
 
Join Date: Jul 2016
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 04-04-2018, 01:24 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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/
Reply With Quote
  #3  
Old 04-04-2018, 01:28 PM
Inna Inna is offline
 
Join Date: Jul 2016
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-04-2018, 01:32 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 04-04-2018, 01:39 PM
Inna Inna is offline
 
Join Date: Jul 2016
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Dave for the fast response.
I'll be looking at that.
What about admincp? It requires much modifications? Or I better ignore that?
Reply With Quote
  #6  
Old 04-04-2018, 01:41 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 04-04-2018, 02:00 PM
Inna Inna is offline
 
Join Date: Jul 2016
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 04-04-2018, 02:36 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, but that error should not be happening.
Reply With Quote
  #9  
Old 04-04-2018, 03:31 PM
Inna Inna is offline
 
Join Date: Jul 2016
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Thanks a bunch
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03968 seconds
  • Memory Usage 2,244KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete