> 1 <

Author Message

medj

13 posts

Location: ---
Occupation:
Age:
#206   2008-02-23 21:04 GMT      
Hey Kilandor. You helped me on Neocrome but I am still having trouble with a few things. This is the topic I am talking about: http://www.neocrome.net/forums.php?m=posts&q=23445

I understand how to edit php files and such but I am not sure how to share the user tables in the database. I figure for my 3 sites I would have 3 databases with the first one having all 30 tables or whatever and the other two only having 24 each since they would be grabbing all the user tables from the first database. I am not sure how to do this though. I read a bit about linked tables in pypmyadmin, but I don't understand any of it.

Kilandor

118 posts
http://www.seditioforge.com/
Location: United States TN
Occupation: Web Coder - Gamer - Game Devloper(working on it)
Age: 23
#207   2008-02-23 23:59 GMT      
Its simple really, in datas/config.php, have all 3 sites connect to the same DB, in that file also, rename all the config from sed_* to site_* or something unique, except for the ones you want to be shared, keep those sed_* (or can use whatever just keep it all the same on all the sites.

medj

13 posts

Location: ---
Occupation:
Age:
#208   2008-02-24 00:34 GMT      
Wow, in the back of my head, I thought of doing that many times, but I just overlooked it each time. I think because I thought that I would have 3 databases instead of just combining all into one.

One question though. If my other 2 sites have already been running for a while and they have stuff in the forums and pages, can I still do this method?

medj

13 posts

Location: ---
Occupation:
Age:
#209   2008-02-24 03:37 GMT      
Also, from your post on Neocrome, you said to: "Open sed_users and copy the auth file"
What does this mean exactly?

Kilandor

118 posts
http://www.seditioforge.com/
Location: United States TN
Occupation: Web Coder - Gamer - Game Devloper(working on it)
Age: 23
#211   2008-02-24 23:16 GMT      
I meant the auth row. user_auth, you need to duplicate it for each site, and rename it for each site.

medj

13 posts

Location: ---
Occupation:
Age:
#212   2008-02-25 00:22 GMT      
Hmm, ok, sorry for this question, but can you explain to me how to duplicate in phpmyadmin. I was looking but I can't figure that out.

I have come across 2 small problems as well.

1. I figure when I set my avatar in my profile the value it gets is something like "datas/users/1-avatar.gif". Now the problem is on my other 2 sites my avatar won't display since there is no avatar on its domain in that location. Now, I realized a way I might be able to fix this but it would require adding my domain name in front of every location in the php files where the avatar might display.

2. The more stranger problem that I can't figure out for the life of me is that my recent items plugin has messed up ever since I shared my database. But it is very strange. Only if I am logged in, do I see the problem. Basically recent forum posts only shows 1 or 2 posts when I have it set to 6. When I am logged out and am a guest it is fine. Any clue how sharing the database could have affected that?

Kilandor

118 posts
http://www.seditioforge.com/
Location: United States TN
Occupation: Web Coder - Gamer - Game Devloper(working on it)
Age: 23
#213   2008-02-25 00:48 GMT      
Quote
1. I figure when I set my avatar in my profile the value it gets is something like "datas/users/1-avatar.gif". Now the problem is on my other 2 sites my avatar won't display since there is no avatar on its domain in that location. Now, I realized a way I might be able to fix this but it would require adding my domain name in front of every location in the php files where the avatar might display.


Fix for this is explained here.
http://www.neocrome.net/forums.php?m=posts&p=120905#120905

Quote
2. The more stranger problem that I can't figure out for the life of me is that my recent items plugin has messed up ever since I shared my database. But it is very strange. Only if I am logged in, do I see the problem. Basically recent forum posts only shows 1 or 2 posts when I have it set to 6. When I am logged out and am a guest it is fine. Any clue how sharing the database could have affected that?


This is caused by auth, unless you have multiple fields, like I was talking about then, the auth is wrong from site to site, not allowing you to see/access things correctly.

To duplicate it, all you have to do is insert a new row.

SQL Code:

ALTER TABLE `sed_users` ADD `site_auth` TEXT NULL AFTER `user_auth` ;


Just change "site_auth" to sitename_auth

Then follow the instructions here

http://www.neocrome.net/forums.php?m=posts&p=120778#120778

Each site will need its own files, and modify, the profile like it says for the avatar/photo/sig, and a different common fiel for each site.

medj

13 posts

Location: ---
Occupation:
Age:
#214   2008-02-25 02:33 GMT      
I did the following:

Code:
ALTER TABLE `sed_users` ADD `medj_auth` TEXT NULL AFTER `user_auth` ;


And in my common.php I changed it to the following:

Code:
if (empty($row['medj_auth']))
{
$usr['auth'] = sed_auth_build($usr['id'], $usr['maingrp']);
$sys['sql_update_auth'] = ", medj_auth='".serialize($usr['auth'])."'";
}


For some reason though, I still have to login on the second site even if I am logged in on the first.



As for the avatars, I can see how that would work, but what if my site has over 10000 members. Let's say 1 of the members has an avatar uploaded. Will they have to reupload there avatar for this to work?

medj

13 posts

Location: ---
Occupation:
Age:
#215   2008-02-25 02:43 GMT      
I was wondering if we had to chage 'user_auth' in any other files. I found in functions.php the following:

Code:
function sed_auth_clear($id='all')
{
global $db_users;

if($id=='all')
{ $sql = sed_sql_query("UPDATE $db_users SET user_auth='' WHERE 1"); }
else
{ $sql = sed_sql_query("UPDATE $db_users SET user_auth='' WHERE user_id='$id'"); }
return( sed_sql_affectedrows());
}

Kilandor

118 posts
http://www.seditioforge.com/
Location: United States TN
Occupation: Web Coder - Gamer - Game Devloper(working on it)
Age: 23
#216   2008-02-25 09:28 GMT      
You need to do the auth change for every single site, and every single site needs to use its own table row.

As for avatar if you follow the instructions I said, it will copy the file over to all the sites. Just repeat the step for each site.

medj

13 posts

Location: ---
Occupation:
Age:
#217   2008-02-25 11:57 GMT      
I now changed it for my first site and it still doesn't seem to work. I don't know if this has to do with it, but I also shared:

$db_pfs
$db_pfs_folders
$db_smilies

I figured I should be able to share these without any problems, I hope I was right.


And about the avatar, I know it will probably work when someone uploads an avatar from now on. The problem I think I will have is with the 500 members or so that have been using the forums for the past few months and that have their own avatar already uploaded. I guess I will need to tell everyone to reupload their avatar?

Kilandor

118 posts
http://www.seditioforge.com/
Location: United States TN
Occupation: Web Coder - Gamer - Game Devloper(working on it)
Age: 23
#218   2008-02-25 16:55 GMT      
If its not working try logging out then clearing out your auth field then log back in. Then try the other site ( don't logout on the other one, if done right, both the auth fields in sed_users should have data.

PFS will not work unless you have it copy the fields over to every site.

medj

13 posts

Location: ---
Occupation:
Age:
#219   2008-02-25 23:10 GMT      
"try logging out then cleaning out your auth field"

Are you basically saying to log out and back in and this will clear the auth field?

Sorry for all these questions.

Just to let you know, I have now 4 rows in my Sed_users table:

The default users_auth and then:

blank_auth
dbzlam_auth
brawl_auth

Kilandor

118 posts
http://www.seditioforge.com/
Location: United States TN
Occupation: Web Coder - Gamer - Game Devloper(working on it)
Age: 23
#220   2008-02-26 00:50 GMT      
Sorry, I meant, logout, then go in the sql and clear out the auth, then log back in.

medj

13 posts

Location: ---
Occupation:
Age:
#221   2008-02-26 02:30 GMT      
When you say clear out the auth, is their another SQL line I should run to do this?

medj

13 posts

Location: ---
Occupation:
Age:
#237   2008-03-02 05:35 GMT      
I actually was forced to go back to my original site and delete the 2 other sites as this whole process has seemed to cause many problems for me and the members. Funny thing is that even after fixing the common.php and deleting the unnecessary php tables I am still getting many errors on the site. For example, I am an admin and it won't let me access many pages on the site like the "Private Messages" and "Pages" as well as most "Forums" yet some forums do show.
Is their a quick fix for this?

Kilandor

118 posts
http://www.seditioforge.com/
Location: United States TN
Occupation: Web Coder - Gamer - Game Devloper(working on it)
Age: 23
#238   2008-03-02 08:24 GMT      
It all has to do with, auth like before

SQL Code:

UPDATE sed_users SET user_auth='';


Change user_auth, or sed_users as needed.

medj

13 posts

Location: ---
Occupation:
Age:
#239   2008-03-02 22:31 GMT      
That did the trick.
If I knew anything about mysql I could have fixed my problem easily.

Thanks for the help.

Nice new look by the way.
> 1 <
Copyright © 2008 Domain.Com. All Rights Reserved.
Page created in 0.345 seconds