There are three ways I am seeing this possible, all major undertakings.
A first thought would be to have ONE database and modify every table with a site marker. IE, 0 = father, 1 = first site, 2 = second site, 3 = third site. Then, code would need to be written to check which marker was for which site IE, if >= 0, pull all data, if == 1 only pull 1 data, if == 2 only pull 2 data, etc. Lastly, every database injection would require modification to include which site the data was coming from.
A second, possible easier option (less modification) would be to have each site use their own separate database. Then, modify only the father fusion code while leaving the three siblings normal installations. A few things must happen to get father working correctly. Modification to call from all four databases (possible network bog issues here). Modification to display the data in an organized fashion (easy enough, just figure out how and stick to it, IE, by date, by site, etc). Last, and the most important, would be to figure out how to uniquely identify data coming from each database that may otherwise contain the same reference, IE user ID 1 pulled from all four sites equals four different people. This will cause problems. One solution could be to add unique site identifiers to all requests coming from father, IE, on call from site 1, append 001 to EVERY number, on call from site 2, append 002, etc.
A last possibility, and one that makes the most sense to me, would be to have four individual site installs, and no modification to the core files. Instead, write a script that can be run once day, once an hour, or on every page refresh, that basically extracts the data from each sibling and dumps it to father. This script would calculate and convert unique identifiers, as well as place references to each conversion in a single table so on every subsequent pass it knows how to modify the dump.
In my opinion, the third option is the most elegant with the first two being the messy and possibly confusing route. All three would require ample amounts of time to accomplish, as well as a deep understanding of PHPFusion functionality, PHP code in general, and Advanced Mysql techniques. Also, the above is a very quick think through, there may be more that I am missing.
Hope this helps, and good luck.
0 replies