Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Wolfie Posted April 27, 2010 Posted April 27, 2010 For new installs, this isn't really an issue, but for existing installs, if someone makes any changes to initdata.php, then perform an upgrade, they have to remake those changes again. Not a big deal for those who forget, run into an error and then remember what they need to do. But for others who are still new to the scene (recent vb converts for example), it could be a source of problems. The biggest issue is with renaming the admin folder. Obviously, they need to remember to put the files into the proper folder and it's hard to not name it /admin so that can't be helped really. In the initdata.php file though, if they have renamed it, it gets overwritten. So what I'm proposing is simple. Have a initdata_dist.php file that, during installation, gets renamed, if necessary, to initdata.php so that it's fully automated. Obviously if initdata.php already exists, then that step would get skipped. Also, in the event that a change has been made to initdata.php between versions, that could be detected and before the upgrade is allowed, it could be required that the issue be properly handled first. This would allow the existing file to remain untouched except when necessary to update it, while keeping it simple... for the end user at least.
bfarber Posted April 27, 2010 Posted April 27, 2010 initdata.php isn't really a file we expect most customers to modify. If we started applying the design we used for conf_global.php to any files that might be edited, every file in IPB would be renamed. ;) I don't think it's necessary, personally.
Wolfie Posted April 27, 2010 Author Posted April 27, 2010 Could the admin folder name be moved into conf_global then? It's rather frustrating to have to edit the file each time I do an upgrade.
Luke Posted April 27, 2010 Posted April 27, 2010 Would it be possible to do something like this in initdata.php: if(! defined('FOO')) define('BAR', 'foobar'); Then in conf_global.php just do this: define('BAR', 'myfoobar'); Although that would depend on which is loaded first: initdata.php or conf_global.php
Mark Posted April 27, 2010 Posted April 27, 2010 Would it be possible to do something like this in initdata.php: if(! defined('FOO')) define('BAR', 'foobar'); Then in conf_global.php just do this: define('BAR', 'myfoobar'); Although that would depend on which is loaded first: initdata.php or conf_global.php initdata,php is loaded first. I did just take a quick look to see if it was possible to do something like that, but it would require a fair bit of moving stuff around. conf_global.php is loaded by ipsRegistry, the ipsRegistry class is in the admin directory, the location of which is stored in initdata.php. Realistically though, during an upgrade you'll have to rename the directory anyway; changing the constant again isn't exactly difficult. If it was set in conf_global.php I can see people forgetting to rename the directory and having all sorts of problems.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.