Sub-domain share profile folder with main site??

Hey all, I was wondering if I could have my sub-domain share the profile photos with main site. I already have the DB's shared I just need the members in sub-domain to be able to see their Photos from main site. 

Thanks.

Quote · 12 Dec 2014

I just need the sub-domain to read and pull user photos from the main site. I don't need it to write to the folder. New users will join and upload photo on the main site. when they visit the sud-domain their info will be viewable but they have to visit main site to edit profile. How cant I link sub- domain to main site modules/boonex folder?

Quote · 12 Dec 2014

The easy answer is that you recode the script on the second site to use the database connection from the first site; the database host (will probably be the same if both databases are running from the same mySQL server), name, user, password has to be switched so it is reading from the database for the main site.

Geeks, making the world a better place
Quote · 12 Dec 2014

Hi GG. I've tried changing the header.inc but in doing so, changes from the sub-domain takes effect on the main site and vice versa (don't want that). I went with a separate DB with shared tables on 2-second updates to keep user info fresh, the only issue now is linking to the user photos.  

Quote · 12 Dec 2014

Pointing the photos module to a different folder is not a easy task.

Requires adding a couple new functions to modules\boonex\photos\classes\BxPhotosConfig.php (for the sub domain) to override the default class functions. Requires some php skill.

Add these functions before the last closing }

    function getFilesPath ()
    {
        return 'full_path_to_data/files/_on_the_main_site';
    }

    function getFilesUrl ()
    {
        return 'http://your_main_site.com/modules/boonex/photos/data/files/';
    }




https://www.deanbassett.com
Quote · 12 Dec 2014

 

Hi GG. I've tried changing the header.inc but in doing so, changes from the sub-domain takes effect on the main site and vice versa (don't want that). I went with a separate DB with shared tables on 2-second updates to keep user info fresh, the only issue now is linking to the user photos.  

No, you do this inside of the photo module for the second site.  Dolphin will include a few files that helps to let it know such things as which database host and name and user and password.  You need to recode the photo module so that it pulls from the database of the first site.  Also, as Deano pointed out, it needs to know that the files are coming from the directories of the first site.  If you want to do this, it is not going to be, change this and this and you are good to go.

Geeks, making the world a better place
Quote · 12 Dec 2014

Thanks guys for pointing me in the right direction.  I'll look into it some more.

Quote · 13 Dec 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.