I already had a TP test running, own folder and own table prefix, when I tried to install TP on another test board, again own folder and own table prefix. There were problems with the resulting SMF+TP so I uninstalled it. The uninstall exposed a problem with the other installation:
Table '##########.tportal_settings' doesn't exist
File: /[munge]/Sources/TPortal.php
Line: 46
It looks to me like the second install overwrote the first table entries and deleted all of them on the uninstall.
Yes..I am afraid the tables for TP is with a set prefix. So if you install multiple TP+SMF on the same database, there will be errors.
I might add this in future versions though.
Thanks Bloc
Bloc, I have 3 installs of SMF with TP on the same server, and no problems. :) All are in the same root directory, and all have seperate databases in MySQL.
Check my profile for specs.
I only have one database available, so I can only use different table prefixes for the different instalations.
I will see if I can make all calls to the tportal_xxx tables use a settable prefix. That way you can at least set a new prefix in one place, change it physically in the databse, and just install a new version with the normal prefix. And so on.
Quote from: nokonium on April 30, 2005, 08:33:17 AM
I only have one database available, so I can only use different table prefixes for the different instalations.
Out of personal interest, why do you only have 1 database? Is it your hosting deal?
Quote from: hivelord on April 30, 2005, 09:48:17 AM
Quote from: nokonium on April 30, 2005, 08:33:17 AM
I only have one database available, so I can only use different table prefixes for the different instalations.
Is it your hosting deal?
Yes
Quote from: Bloc on April 30, 2005, 09:43:54 AM
I will see if I can make all calls to the tportal_xxx tables use a settable prefix. That way you can at least set a new prefix in one place, change it physically in the databse, and just install a new version with the normal prefix. And so on.
Thanks Bloc
Bloc, what if you just append the SMF prefix from the smf instance?
so, default would be smf_tportal_
if you has a second smf installed, in the same database using jpw as the prefix, the call would go to jpw_tportal_
so call for
FROM $db_prefix.tportal_settings
instead of just
FROM tportal_settings
Good suggestion. But since many now has the original names, I have just changed the code to have the prefix defined 3 places, one in TPortal.php, one in TPortalAdmin.php and finally one in TPModules.php.
This way will make it easier to use several intances of the portal, just renaming the tables, and then change the prefix, and all is good.
And for those that don't need this, it will just work as before.
What do I need to do now?
Do you mean that 0.6beta has been ammended and I should download and install the newer version?
Then how do I change the prefixes?
I have changed it for v0.7beta.
But I can change it just for v.0.6 temporarily, if you need it faster.
If you could let me have an ammended copy of 0.6 that would be much appreciated.
Thanks Bloc
These are the modified v0.6 beta files, with settable prefix.
I suggest overwriting your existing file( set a new prefix first, look for "// tportal prefix"), then just renaming the tables. Check if it works OK.
Then install a new version of TP on another SMF, which now will use the original "tportal_" prefix. Do the same again, if you need more installations on the same database.
Thanks Bloc, be back when I've had a fiddle ;D
Had a little fiddle, all is going well, but.....
Table 'db119726169.tportal_blocks' doesn't exist
File: /homepages/6/d119724375/htdocs/sgr/Sources/TPortalAdmin.php
Line: 83
This is Line 83 $request = db_query("SELECT * FROM tportal_blocks WHERE id=$val", __FILE__, __LINE__);
It looks like I need to alter the tportal to my prefix.
Off to fiddle some more.... ;D