I'm Stuck »  Show posts from    to     

Icy Phoenix


English Chit Chat - I'm Stuck



mort [ Sat 22 Dec, 2012 10:09 ]
Post subject: I'm Stuck
If I Google any more for this and don't have WP or Joomla - I'm going to go nuts - Or stay "Nuts" notachance8zt

Code: [Hide] [Select]
$table_prefix


What is the simplest of php scripts that can be added to an install script that already knows that config.php has what prefix is preferred- rather than write-to-file during install:

Example: config.php already includes,

Code: [Hide] [Select]
$table_prefix = "xx_";


and is included during install,

I've tried so many different ways and maybe that's the problem, but the best I could end up with was changing it to something like:

zz_xx_table-name.

I'm not asking that someone do it for me (unless I really get stuck) Just an example of any other script that you may know of besides phpBB, WP, joomla etc. should help.

Danke, Grazzie and thanks.


Mighty Gorgon [ Tue 25 Dec, 2012 10:38 ]
Post subject: Re: I'm Stuck
Sorry, but I don't understand what you need...

If you need a "default" prefix to be used in case you still don't have config.php you can add something like this after including your config.php:

Code: [Hide] [Select]
$table_prefix = empty($table_prefix) ? 'xx_' : $table_prefix;


Or you may even decide to use a constant in your constants.php:
Code: [Hide] [Select]
define('DEFAULT_TABLE_PREFIX', 'xx_');


mort [ Tue 25 Dec, 2012 11:33 ]
Post subject: Re: I'm Stuck
Grazzie,

I had another look at this today and got a bit further with it by seeing how you manipulate IP's install.

But I also found out that the rating script I use has to be hard-path-coded in the .js.

And while I managed to recode about half of the .js and still have it working - I stopped and asked myself why am I doing this?

But in the meantime, at least all of the tables SQL are now constants.





Powered by Icy Phoenix