Advertisement:

Author Topic: Share user database for 2 (or more) different forums.  (Read 380508 times)

Offline forfun

  • Jr. Member
  • **
  • Posts: 226
Re: Share user database for 2 (or more) different forums.
« Reply #400 on: May 21, 2011, 08:39:35 PM »
just to report back that i shared 2 forums of 2 different domains using this method
it's been running for a month now, and everything is good
Would you confirm that you are running RC5?
Thanks

Offline Eudemon

  • Sr. Member
  • ****
  • Posts: 807
  • An Anime Fan
    • KumaKuni
Re: Share user database for 2 (or more) different forums.
« Reply #401 on: May 21, 2011, 10:12:35 PM »
just to report back that i shared 2 forums of 2 different domains using this method
it's been running for a month now, and everything is good
Would you confirm that you are running RC5?
Thanks

yes, both sites are running rc5

Offline forfun

  • Jr. Member
  • **
  • Posts: 226
Re: Share user database for 2 (or more) different forums.
« Reply #402 on: May 21, 2011, 10:51:04 PM »
just to report back that i shared 2 forums of 2 different domains using this method
it's been running for a month now, and everything is good
Would you confirm that you are running RC5?
Thanks

yes, both sites are running rc5
Thanks MUCH

Offline forfun

  • Jr. Member
  • **
  • Posts: 226
Re: Share user database for 2 (or more) different forums.
« Reply #403 on: May 22, 2011, 01:53:11 AM »
I have used the mod to share members between 2 forums (1.1.13), but I am doing the upgrade to RC5, and I need to revert the shares (create view) in the second forum,
How do I do it?
I can't find the instruction, which I think the author has posted, once.
Thanks much for any info

Offline Eudemon

  • Sr. Member
  • ****
  • Posts: 807
  • An Anime Fan
    • KumaKuni
Re: Share user database for 2 (or more) different forums.
« Reply #404 on: May 22, 2011, 04:39:49 PM »
it rly depends how that mod works
does it modify database tables?
u might have to contact the author for these info
if the mod makes both forum share same table then after upgrade just point to that table
if the mod automatic updates both forum's database tables to make them identical then just use either one of them

i'm not familiar with the mod and i have never used a 1.0ver smf so i'm not sure
also i think the table layouts should be little different between 1.0 and 2.0

Offline FireDitto

  • Full Member
  • ***
  • Posts: 617
  • Gender: Female
  • Shadow In The Flame
    • @SPWeyr on Twitter
    • Second Pass Weyr RPG
Re: Share user database for 2 (or more) different forums.
« Reply #405 on: June 08, 2011, 08:53:10 AM »
Using the below, I successfully linked together 3 forums; including mods.

Still testing things, but going well so far.

=)

OK, here's a step by step of exactly what I did. There were ZERO code changes, and only used MySQL to pull it off as noted in a previous post.

As a note, I'm using SMF 1.1.11 and MySQL 5.0.x. If SMF 2.x uses a similar table structure (haven't looked at it personally yet), I'd imagine it'd work just as well and still no code changes. They don't even need to be on the same database, but it's easier, and my instructions will assume they're using the same database with just different prefixes for the two (or more) installations of SMF. It does not matter what domain they are hosted on as long as they use the same MySQL server.

This will share user logins and PMs.

Assume you have two installations. One is an already established forum installation, and it uses the prefix "forumA_". The other is a new forum that you want to share forumA's logins and PMs. It has the prefix "forumB_". They're both in the database called "smf".

Log onto MySQL. There are a variety of tools for this but I just use commandline.
Now, once in MySQL, issue the following.
Code: [Select]
USE smf;
First, just move forumB's tables you want shared out of the way.
Code: [Select]
ALTER TABLE forumB_members RENAME TO forumB_members_old;
ALTER TABLE forumB_personal_messages RENAME TO forumB_personal_messages_old;
ALTER TABLE forumB_pm_recipients RENAME TO forumB_pm_recipients_old;

WARNING: Your forumA install will NOT be accessible once you do the following step until all steps are complete. It'd be wise to make a backup first too.
Next, rename forumA's tables to use a "shared_" prefix.
Code: [Select]
ALTER TABLE forumA_members RENAME TO shared_members;
ALTER TABLE forumA_personal_messages RENAME TO shared_personal_messages;
ALTER TABLE forumA_pm_recipients RENAME TO shared_pm_recipients;

Finally, create views of the shared tables for both forumA and forumB so they see the exact same tables and the info is the same for both.
First, forumA:
Code: [Select]
CREATE VIEW forumA_members AS SELECT * FROM shared_members;
CREATE VIEW forumA_personal_messages AS SELECT * FROM shared_personal_messages;
CREATE VIEW forumA_pm_recipients AS SELECT * FROM shared_pm_recipients;

And next, forumB:
Code: [Select]
CREATE VIEW forumB_members AS SELECT * FROM shared_members;
CREATE VIEW forumB_personal_messages AS SELECT * FROM shared_personal_messages;
CREATE VIEW forumB_pm_recipients AS SELECT * FROM shared_pm_recipients;

Presto! Finished! Both forumA and forumB share users and PMs!

If anybody can spot corrections or something wrong with the above instructions, let me know and I'll correct it.

EDIT: Corrected a couple of typos.
Second Pass Weyr
An AU Pernse RPG

SMF 2.0.6 with SP 2.3.5

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Share user database for 2 (or more) different forums.
« Reply #406 on: June 08, 2011, 09:07:07 AM »
Avatars won't be properly joined, least not uploaded ones (or oversize ones downloaded to the server).
No good deed goes unpunished
All helpful urges should be circumvented

Offline FireDitto

  • Full Member
  • ***
  • Posts: 617
  • Gender: Female
  • Shadow In The Flame
    • @SPWeyr on Twitter
    • Second Pass Weyr RPG
Re: Share user database for 2 (or more) different forums.
« Reply #407 on: June 08, 2011, 11:14:24 PM »
The 'view new replies / posts' only works on Site B, but not on Site A or C.

I have no idea why... Does anyone have any ideas?

I get this:

Quote
An Error Has Occurred!
The board you specified is located on a different forum
Second Pass Weyr
An AU Pernse RPG

SMF 2.0.6 with SP 2.3.5

Offline luuuciano

  • SMF Hero
  • ******
  • Posts: 2,979
    • http://cbasites.net/
Re: Share user database for 2 (or more) different forums.
« Reply #408 on: June 27, 2011, 02:35:12 PM »
Use subforums mod available at portamx.com. It is however build for SMF 2.0 RC3 and will never be updated until SMF 2.0 turn gold.

Sadly subforums mod at portamx will be not developed anymore, right? :(
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: Share user database for 2 (or more) different forums.
« Reply #409 on: July 28, 2011, 02:06:24 PM »
Use subforums mod available at portamx.com. It is however build for SMF 2.0 RC3 and will never be updated until SMF 2.0 turn gold.

Sadly subforums mod at portamx will be not developed anymore, right? :(

May be and may be not... I'll try to see about it later...

Offline luuuciano

  • SMF Hero
  • ******
  • Posts: 2,979
    • http://cbasites.net/
Re: Share user database for 2 (or more) different forums.
« Reply #410 on: July 30, 2011, 02:27:47 PM »
Use subforums mod available at portamx.com. It is however build for SMF 2.0 RC3 and will never be updated until SMF 2.0 turn gold.

Sadly subforums mod at portamx will be not developed anymore, right? :(

May be and may be not... I'll try to see about it later...

PMx-Subforums v1.2 for SMF 2.0 was released today! weeeeeeee
http://portamx.com/2722/pmx-subforums-v1-2-for-smf-2-0/

edit: fixed link to latest version
« Last Edit: July 30, 2011, 02:36:55 PM by luuuciano »
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Offline ShadyX

  • Newbie
  • *
  • Posts: 8
Re: Share user database for 2 (or more) different forums.
« Reply #411 on: July 30, 2011, 05:10:59 PM »
A very nice tut! thanks.

Offline Quinn

  • Semi-Newbie
  • *
  • Posts: 50
    • BStreet"s Net
Re: Share user database for 2 (or more) different forums.
« Reply #412 on: August 10, 2011, 01:14:17 PM »
Yes! After 2.0 finally went Gold I upgraded two rc5 test sites and the main 1.15 site then did the database share and all 3 sites have no problems now. I did point the avatars & attachments to the main forum folders b4 the database switch but they didn't carry over.

I noticed during the upgrade of the rc5 sites I had done the database test on had troubles with the "view" tables and had to revert back the original tables before it would upgrade without errors.  Deleting the views and renaming the original tables from _old then remaking the views after the upgrade was all it took.

Only one of the rc5 forums had an issue with a mod that had to be removed to fix after the table changes. This mod was causing a database error between the settings file and the users not existing before it was installed. I was expecting this might happen so no real surprise there. The mod will no longer be supported by the developer after 2.0 Gold anyway.

It would be nice to find a way to enable one log in for all 3 forums. I have disabled new registrations except on the main forum to eliminate confusion and redirecting log-in links to the main forum. With the ability to link to a url when creating a board this is very easy to link from the main board. The main site is bridged with an extensive Coppermine Photo gallery.

The site is setup using forum.domain.com with sub forums in the same root ie: forum.domain.com/smf1 &  forum.domain.com/smf2

http://forums.bs-raven.net

Code: [Select]

ALTER TABLE smf2_members RENAME TO smf2_members_old;
ALTER TABLE smf2_personal_messages RENAME TO smf2_personal_messages_old;
ALTER TABLE smf2_pm_recipients RENAME TO smf2_pm_recipients_old;

ALTER TABLE smf3_members RENAME TO smf3_members_old;
ALTER TABLE smf3_personal_messages RENAME TO smf3_personal_messages_old;
ALTER TABLE smf3_pm_recipients RENAME TO smf3_pm_recipients_old;



ALTER TABLE smf_members RENAME TO shared_members;
ALTER TABLE smf_personal_messages RENAME TO shared_personal_messages;
ALTER TABLE smf_pm_recipients RENAME TO shared_pm_recipients;



CREATE VIEW smf_members AS SELECT * FROM shared_members;
CREATE VIEW smf_personal_messages AS SELECT * FROM shared_personal_messages;
CREATE VIEW smf_pm_recipients AS SELECT * FROM shared_pm_recipients;

CREATE VIEW smf2_members AS SELECT * FROM shared_members;
CREATE VIEW smf2_personal_messages AS SELECT * FROM shared_personal_messages;
CREATE VIEW smf2_pm_recipients AS SELECT * FROM shared_pm_recipients;

CREATE VIEW smf3_members AS SELECT * FROM shared_members;
CREATE VIEW smf3_personal_messages AS SELECT * FROM shared_personal_messages;
CREATE VIEW smf3_pm_recipients AS SELECT * FROM shared_pm_recipients;

« Last Edit: August 10, 2011, 01:25:16 PM by Quinn »

Offline luuuciano

  • SMF Hero
  • ******
  • Posts: 2,979
    • http://cbasites.net/
Re: Share user database for 2 (or more) different forums.
« Reply #413 on: August 10, 2011, 01:42:08 PM »
Quinn have you seen/tried the PMx-Subforums mod?
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Offline Quinn

  • Semi-Newbie
  • *
  • Posts: 50
    • BStreet"s Net
Re: Share user database for 2 (or more) different forums.
« Reply #414 on: August 10, 2011, 02:48:14 PM »
@ luuuciano

I just looked at it again and am considering it but need time to evaluate for my needs. Thanks

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: Share user database for 2 (or more) different forums.
« Reply #415 on: August 10, 2011, 03:40:31 PM »
Quinn have you seen/tried the PMx-Subforums mod?
And it's now version 1.3.  :D

Offline Quinn

  • Semi-Newbie
  • *
  • Posts: 50
    • BStreet"s Net
Re: Share user database for 2 (or more) different forums.
« Reply #416 on: August 10, 2011, 04:16:24 PM »
Hmmm... that didn't go well. I downloaded PMxSubforums131 and installed in a fresh install of smf 2.0 and it broke the site. Blank page when returning to Admin page after installing the package. Restored from the backup and trying it one more time.


Still No joy after trying on a fresh forum install...
« Last Edit: August 12, 2011, 12:02:20 PM by Quinn »

Offline FireDitto

  • Full Member
  • ***
  • Posts: 617
  • Gender: Female
  • Shadow In The Flame
    • @SPWeyr on Twitter
    • Second Pass Weyr RPG
Re: Share user database for 2 (or more) different forums.
« Reply #417 on: August 28, 2011, 06:26:24 AM »
I have three forums linked, two of them are main-use.

I've just finished a personalised theme, and am very happy with it, etc etc yada yada...

here's my issue...

Despite the fact that THEMEs are NOT linked... the two sites will NOT hold the same theme, at the same time.... WTF...?? LOL.

I update one, so iy has the theme, I reload the other page... and it's reverted to the base Default theme... I update it, lo and behold, the other has updated to the base default...

IT IS DRIVING ME NUTTERS...


Any idea what is going on here???



I am running RC5 still.




EDIT: They will hold DIFFERENT custom themes, just not share the SAME custom theme... Am I making a general error here somewhere, perhaps? =/

Cancel that. No, they won't even hold different customs... I AM SO CONFUSED!
« Last Edit: August 28, 2011, 07:15:50 AM by FireDitto »
Second Pass Weyr
An AU Pernse RPG

SMF 2.0.6 with SP 2.3.5

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: Share user database for 2 (or more) different forums.
« Reply #418 on: August 28, 2011, 07:35:18 PM »
If you're talking about Pmx SubForums Mod, it is better to ask for support in portamx site.

Offline FireDitto

  • Full Member
  • ***
  • Posts: 617
  • Gender: Female
  • Shadow In The Flame
    • @SPWeyr on Twitter
    • Second Pass Weyr RPG
Re: Share user database for 2 (or more) different forums.
« Reply #419 on: August 29, 2011, 12:08:55 AM »
I assume you're talking about the post above mine, but I'll just classify that I'm having (I believe) issues with liked databases... Though I am very confused. They WERE holding individual personalized themes, however, after zipping one theme, and installing it on the other forum, the two now "bounce" the theme between themselves. They will not hold it at the same time, or, now, any individual theme. One site will carry it, while theories defaults back to the Core theme, but has blank nothingness inAdministration where it should say what theme is the default.

Any help would be amazing.


Sorry for any weird words. Auto correct.
Second Pass Weyr
An AU Pernse RPG

SMF 2.0.6 with SP 2.3.5