To share the authors table between 2 eFiction 3.0 sites using the same database, open includes/queries.php for the site that is going to use the foreign table. In other words, if you have site A and site B and are going to use site A's author's list for site B, open the file for site B.
Find the following line:
define ("_AUTHORTABLE", $tableprefix."fanfiction_authors as author"); // Do not change the aliasing (the "as author" part)!
Change the $tableprefix to be the tableprefix for site A.
define ("_AUTHORTABLE", "SITEAPREFIXfanfiction_authors as author"); // Do not change the aliasing (the "as author" part)!
That's it. The author_prefs table will track privileges, skins, etc separately for both sites.
You may also want to share the settings table as well. In which case during install/upgrade, supply the prefix for the settings table in site A when asked for the settings table prefix and use a unique sitekey!
I have a question about doing this in reverse (A using B instead of B using A). I want an older site to use the authors table of the newest one since it will be the main one, but the old site will initially have more authors in it. If I do this, will this mean that the author information from the older site won't be available?
If I decide to have the newer site use the older site's author info even though it's going to be the main site, will it really make a difference? Won't the members still be listed on both sites anyway regardless of which site they registered on?
- My eFiction Skins: http://www.gokugirl.com/efiction.php
- The Otaku Institute: http://oi.gokugirl.com
- The OI Same-Sex Archive: http://oisa.gokugirl.com
- The Dragon Ball Fanfiction Library: http://dbfl.gokugirl.com
You can't do this with 2 existing site. You need at least one of the sites to have an empty authors table. Otherwise the authors in one table will be crossed because Table A will have author # 3 and Table B will also have author # 3 and you can't access both.
One of my sites will be brand new, no authors.
- My eFiction Skins: http://www.gokugirl.com/efiction.php
- The Otaku Institute: http://oi.gokugirl.com
- The OI Same-Sex Archive: http://oisa.gokugirl.com
- The Dragon Ball Fanfiction Library: http://dbfl.gokugirl.com
Then that would be the B site in the example.
The thing is, I want the brand new site to be the main site even though the old site is the one with the already exisiting members and stories. My question is basically this: will the members be available to both sites no matter which one a person registers on? I believe that the brand new site will get more registrations and stories than my pre-existing one.
- My eFiction Skins: http://www.gokugirl.com/efiction.php
- The Otaku Institute: http://oi.gokugirl.com
- The OI Same-Sex Archive: http://oisa.gokugirl.com
- The Dragon Ball Fanfiction Library: http://dbfl.gokugirl.com
Yes. That's what "share" means. They "share" the table. They both use it.
The thing is, I want the brand new site to be the main site even though the old site is the one with the already exisiting members and stories. My question is basically this: will the members be available to both sites no matter which one a person registers on?
Well, this is what this topic is all about.
Which table they use won't really matter which one of them will be the main site for you, it won't show on the outside. So you can easy use the authors' table of the old site as the "main" (the only one) authors table, while your main site is the new one.
The wireless music box has no imaginable commercial value. Who would pay for a message sent to nobody in particular? (1920)
Thank you for answering my question in a respectful way, eyedam. I apologize if I seem to be incredibly dense. I wasn't 100% sure so I figured that I should ask a question about it.
- My eFiction Skins: http://www.gokugirl.com/efiction.php
- The Otaku Institute: http://oi.gokugirl.com
- The OI Same-Sex Archive: http://oisa.gokugirl.com
- The Dragon Ball Fanfiction Library: http://dbfl.gokugirl.com
I have a question, maybe it's a bit stupid, who knows... but I know that on my site, there's some regular members, and then there are authors...
Now if I created the brand new B site... would both regular member who leave feedback and the authors from A be able to use B or would just the people who wrote stories?
http://www.trackbunnies.org
http://blog.trackbunnies.org/
http://karah-leighhancock.avonrepresentative.com/
All members.
As an example, I just started an archive for the fan fiction stories I have written, but I shared the authors table with my Wormhole Crossing site. So the new site has 224 members (at the time of this message) even though it's brand new. Those 224 members are the 224 members from Wormhole Crossing.
http://scribbles.hugosnebula.com/index.php?skin=CSSZen
http://sgxover.hugosnebula.com/
Anyone who signs up for either one, will automatically be signed up for both. That's because they are added to the same table. π
They both have the same registration places that nonconnected sites do... instead of the members being added to seperate tables for each site, they are added to the same table. The table is read by both sites to show the member list, and when people log in. No problem.
As far as I understand it, they will have to log in seperately to both sites though, because the sites use different site names in their keys.
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
Very stupid question, I suppose... but it sais in the first post *points upwards* that this is for eFiction 3.0
so does this work with 3.3.1, too? or how would I have to du it there? As the line that should be changed looks different now.
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
Works the same we just changed tableprefix from a variable to a definition.
Thx. I'll look into it. Maybe. Not sure yet, if I really need to install two eFiction archives.
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77