Hi,
I'm trying to connect two smf site (same host, different domain, SMF2 RC3). I shared members, personal_messages, pm_recipients, membergroups and changed prefixes from subs files successfully.
Now, for connection perfectly, I need to share avatars too but for this I need seperate avatars table from attachments table from database.
How can I do it?
If I create new table for avatars and copy only avatars datas to this, which files to be edited after this?
Thanks for your helps,
Regards.
HI, I don't know if this will work, but you can separate the avatars from the attachments and store them in a separate folder. I wonder if you can share that folder with the two forums as the paths to that folder are defined in the avatar settings.
Yes, I shared this folders with avatar and attachment settings.
In standart, attachments and avatars folders already seperated.
I must create new database table for uploaded avatars. When attachments table is shared, attachments are showing with all forums. (showing at all post with same id)
By default, uploaded avatars are stored with the attachments. You can store them in a separate folder also which you should be able to share. First item in this post.
http://www.simplemachines.org/community/index.php?topic=293441.0
Unless I'm misunderstanding what you wish to do. ::)
Well, I tried this but confused.
For example forums stored in /public_html/forum1/ (www.forum1.com) and /public_html/forum2/ (www.forum2.com), what upload directory must be?
If it's for the user's uploaded avatars. It shouldn't matter as long as both forums point at this folder.
Ok, I moved uploaded avatars to different directory but avatars using same table with the attachments in the database. So if I share attachments table and attach a file in topic with forum1, it will be saved attachments table with id_msg and it will be displayed in forum2's topic which has same same id_msg but this topics are not same.
Drat, although it doesn't use the info, it does check the attachments table to see if it's a member uploaded avatar.
I agree, you shouldn't need to share the attachments folder or table since they are unique to each forum.
There should be a way around it since it's only a check and the avatars are stored (physically) with the file name of avatar_{member id}.file_extension. So if a member uploads an avatar in both forums. Then the last uploaded avatar should show in both forums. Try it and see if it does work. ???
One solution might be to include both attachment tables when the members info is loaded.
$request = $smcFunc['db_query']('', '
SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
FROM {db_prefix}members AS mem
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = {int:id_member})
WHERE mem.id_member = {int:id_member}
LIMIT 1',
array(
'id_member' => $id_member,
)
);
Which file this codes are in?
Or which file I must edit for this?
Quote from: Kays on November 04, 2010, 03:47:16 PM
the avatars are stored (physically) with the file name of avatar_{member id}.file_extension.
Actually, I don't think it works like that anymore. It adds stuff to the filename other than that.
Yeah, avatars stored with file name like "avatar_13_1279658932.png"
For this I seperated avatars from attachments table to a new table.
I think if we edit subs files in sources directory for this (not all {db_prefix}attachments to avatars table, just only related with uploaded avatars), it must be working fine.
But I don't know which are related to uploaded avatars.
semimedia do you still require assustance?
Quote from: Runic on November 21, 2010, 10:18:24 AM
semimedia do you still require assustance?
Yes, I didn't do what I want yet :(
have you run repair_settings.php to point to the new avatar folder?
What is repair_settings.php? (http://docs.simplemachines.org/index.php?topic=663.0)
I think I don't need to run repair_settings.php because problem is not path of the avatars.
well if you have moved avatars to the avatar folder then run this to make sure all paths are correct, it may help with the db :)
I already did but avatars stored in attachments table in the database. When I share this database avatars is working fine at both site but attachments is shared too. And this is causing to show same attachment for both site at different topics. For this reason I want to store avatars at different table.