1
depricated
Re: Need to change config table names
  • 2011/6/21 6:27

  • depricated

  • Just popping in

  • Posts: 4

  • Since: 2010/1/20


ok I seem to have managed what I was trying to do. The important tables to change over, for control of layout also, are below. After each table is the name of all files that I was able to find which call it specifically rather than by variable.

configcategory
kernel/configcategory.php
configoption
kernel/configoption.php
config
kernel/configitem.php

block_module_link
class/xoopsblock.php
kernel/module.php
kernel/block.php
module/system/admin/blocksadmin/blocksadmin.php

newblocks
class/xoopsblock.php
kernel/block.php

modules
kernel/module.php

tplset
kernel/tplset.php

tplfile
kernel/tplfile.php

tplsource
kernel/tplfile.php



2
depricated
Need to change config table names
  • 2011/6/16 9:01

  • depricated

  • Just popping in

  • Posts: 4

  • Since: 2010/1/20


I'm trying to run multiple installs off of one database. Mainly for user pooling, but also because I want some modules to be shared between them.

So far as I can tell, the easiest way to do this is to, rather than change the xoops prefix(which prevents me from sharing modules) change the table names for configuration.

Site name and layout should be different, and some modules will be installed twice(already did the module work to rename for the ones that need to be redone)

I can't find where the variables for what tables to query are defined, though.

The short of it is that I just want to change the below tables as such

config -> config_1
configcategory -> configcategory_1
configoption -> configoption_1

and then have site 1 check configuration from _1 and site 2 check config from _2.

I've spent the past several hours digging through the code and I can't seem to reliably track down which file is declaring the table names.

Thanks in advance for any help. I'm running version 2.4.3 on both sites.



3
depricated
Re: 2.4.3 - 'XoopsFormHtmlarea' not found
  • 2010/1/20 14:21

  • depricated

  • Just popping in

  • Posts: 4

  • Since: 2010/1/20


Figured it out.

The first file we need to look at is

xoopsroot/modules/newbbex/include/forumform.inc.php
On line 94 you'll notice the beginning of this if statement:
if(newbbex_isX23()) {
    
$editor_configs=array();
    
$editor_configs['name'] = 'message';
    
$editor_configs['value'] = $message;
    
$editor_configs['rows'] = 35;
    
$editor_configs['cols'] = 60;
    
$editor_configs['width'] = '100%';
    
$editor_configs['height'] = '400px';
    
$editor = new XoopsFormEditor('''htmlarea'$editor_configs);
} else {
    
$editor = new XoopsFormHtmlarea('''message'$message);
}


This is what pointed me to the problem. Specifically, the conditional for the statement uses the function is23() from newbbex. So if we go to xoopsroot/modules/newbbex/ we see a file called functions.php (do not confuse this with the same functions.php in the include folder).

Open this up and you'll find the function isX23, which looks like this:
function newbbex_isX23()
{
    
$x23 false;
    
$xv str_replace('XOOPS ','',XOOPS_VERSION);
    if(
substr($xv,2,1) == '3') {
        
$x23 true;
    }
    return 
$x23;
}


Now, there are two ways to go about fixing this. The first requires the replacement of only one character. Change line 480 from
if(substr($xv,2,1) == '3') {
to
if(substr($xv,2,1) == '4') {

The other solution is easier to understand when you go back later to fix it, but takes a little more work. I really do mean little, though. Simply edit every instance of 3 to 4 in isX23. I even changed the name of the function to isX24 and called it that way.



4
depricated
2.4.3 - 'XoopsFormHtmlarea' not found
  • 2010/1/20 12:16

  • depricated

  • Just popping in

  • Posts: 4

  • Since: 2010/1/20


I recently migrated my site to a new domain, and upgraded my XOOPS version while I did. Unfortunately, it seems now to have broken my forum module (newbbex). Any time a user attempts to post, it gives the following error:

Fatal error: Class 'XoopsFormHtmlarea' not found

I've turned the site on temporarily so you can see what's happening. Debugging is off, but this is where it's stopping.

http://pandersplayground.com/modules/newbbex/reply.php?forum=5&post_id=39&topic_id=14&viewmode=thread&order=

You can log in with:
username: xguest
password: xoopsxoops

to view the problem.




TopTop



Login

Who's Online

201 user(s) are online (124 user(s) are browsing Support Forums)


Members: 0


Guests: 201


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits