Forum

Notifications
Clear all

[Sticky] Share authors table between 2 eFiction sites.

Page 1 / 2
Tammy
(@tammy)
Member Moderator

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!

Quote
Topic starter Posted : 17/07/2006 1:52 am
Goku Girl
(@gokugirl)
Trusted Member

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

ReplyQuote
Posted : 12/12/2006 7:04 pm
Tammy
(@tammy)
Member Moderator

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.

ReplyQuote
Topic starter Posted : 12/12/2006 11:40 pm
Goku Girl
(@gokugirl)
Trusted Member

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

ReplyQuote
Posted : 13/12/2006 12:56 pm
Tammy
(@tammy)
Member Moderator

Then that would be the B site in the example.

ReplyQuote
Topic starter Posted : 13/12/2006 2:59 pm
Goku Girl
(@gokugirl)
Trusted Member

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

ReplyQuote
Posted : 13/12/2006 3:42 pm
Tammy
(@tammy)
Member Moderator

Yes.  That's what "share" means.  They "share" the table.  They both use it.

ReplyQuote
Topic starter Posted : 13/12/2006 3:47 pm
eyedam
(@eyedam)
Trusted Member

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)

ReplyQuote
Posted : 13/12/2006 6:29 pm
Goku Girl
(@gokugirl)
Trusted Member

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

ReplyQuote
Posted : 15/12/2006 11:48 pm
kismetology
(@kismetology)
Trusted Member

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/

ReplyQuote
Posted : 13/01/2007 10:44 pm
Tammy
(@tammy)
Member Moderator

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/

ReplyQuote
Topic starter Posted : 13/01/2007 10:48 pm
Jan_AQ
(@jan_aq)
Noble Member

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.

ReplyQuote
Posted : 14/01/2007 9:33 am
Amancham
(@amancham)
Eminent Member

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

ReplyQuote
Posted : 25/03/2008 11:13 am
Tammy
(@tammy)
Member Moderator

Works the same we just changed tableprefix from a variable to a definition.

ReplyQuote
Topic starter Posted : 25/03/2008 1:54 pm
Amancham
(@amancham)
Eminent Member

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

ReplyQuote
Posted : 26/03/2008 1:47 pm
Page 1 / 2
Share: