https://www.icyphoenix.com/viewtopic.php?f=17&t=8863
-----------------------------------
mort
Sat 22 Dec, 2012 10:09

I'm Stuck
-----------------------------------
If I Google any more for this and don't have WP or Joomla - I'm going to go nuts - [b][i]Or stay "Nuts"[/i][/b]   [img]http://www.icyphoenix.com/images/smiles/notachance8zt.gif[/img] 

[code linenumbers=false]$table_prefix[/code]

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 linenumbers=false]$table_prefix = "xx_";[/code]

 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 [i](unless I really get stuck)[/i] Just an example of any other script that you may know of besides phpBB, WP, joomla etc. should help.

Danke, Grazzie and thanks.  :twisted:


-----------------------------------
Mighty Gorgon
Tue 25 Dec, 2012 10:38

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:

[codeblock]$table_prefix = empty($table_prefix) ? 'xx_' : $table_prefix;[/codeblock]

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


-----------------------------------
mort
Tue 25 Dec, 2012 11:33

Re: I'm Stuck
-----------------------------------
Grazzie,  :mrviolet: 

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.

:lol:


