HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Multi-sites

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#51400 (In Topic #11224)
Avatar

Honoured member

Trying to wrap my head around this function, as it is integral to if I switch to OCportal, it looks and sounds like it should be working, but, I must have messed up a setting somewhere, and the tutorial images for this topic, show slightly different things than I actually see in the setup I installed.

Trying to get 2 sites to use one forum/member base. they each have a url, but are installed on the same database with different prefixes.

Idol_ and Imprint_

I set up the structure -> Partner Sites, set the one site to use the site I set up's netlink.php

when I installed the second site, I told it to use the first's forum and gave it that database prefix.

I have been reading help for 2 days now, so I am just wondering - what am I missing! I'm sure it's simple, but every tutorial and help I have found has not gotten the one site, to see the first site's forum. I put one forum topic in the first site so, if it works, I'd see it on the other.

I have both sites turned off to the public right now. If I can get this working, I have about 5 sites I would want to switch over to this system cause everything else I see here ROCKS OUT LOUD. Anyone that can beat me over the head to show me what I'm missing would be appreciated.
Back to the top
 
Posted
Rating:
#51401
Avatar

Hi,

I think you may have actually found a bug.

Could you try changing lines 583-602 of sources/global2.php from:

Code

function load_user_stuff()
{
   if (!array_key_exists('FORUM_DRIVER',$GLOBALS))
   {
      global $SITE_INFO;
      require_code('forum_stub');

      require_code('forum/'.$SITE_INFO['forum_type']);    // So we can at least get user details
      $GLOBALS['FORUM_DRIVER']=object_factory('forum_driver_'.filter_naughty_harsh($SITE_INFO['forum_type']));
      if (($SITE_INFO['forum_type']=='ocf') && (get_db_forums()==get_db_site()) && (!$GLOBALS['DEBUG_MODE'])) // NB: In debug mode needs separating so we can properly test our boundaries
      {
         $GLOBALS['FORUM_DRIVER']->connection=$GLOBALS['SITE_DB'];
      }
      elseif ($SITE_INFO['forum_type']!='none')
      {
         $GLOBALS['FORUM_DRIVER']->connection=new database_driver(get_db_forums(),get_db_forums_host(),get_db_forums_user(),get_db_forums_password(),$GLOBALS['FORUM_DRIVER']->get_drivered_table_prefix());
      }
      $GLOBALS['FORUM_DRIVER']->MEMBER_ROWS_CACHED=array();
      $GLOBALS['FORUM_DB']=&$GLOBALS['FORUM_DRIVER']->connection;
   }
}
to:

Code

function load_user_stuff()
{
   if (!array_key_exists('FORUM_DRIVER',$GLOBALS))
   {
      global $SITE_INFO;
      require_code('forum_stub');

      require_code('forum/'.$SITE_INFO['forum_type']);    // So we can at least get user details
      $GLOBALS['FORUM_DRIVER']=object_factory('forum_driver_'.filter_naughty_harsh($SITE_INFO['forum_type']));
      if (($SITE_INFO['forum_type']=='ocf') && (get_db_forums()==get_db_site()) && ($GLOBALS['FORUM_DRIVER']->get_drivered_table_prefix()==get_table_prefix()) && (!$GLOBALS['DEBUG_MODE'])) // NB: In debug mode needs separating so we can properly test our boundaries
      {
         $GLOBALS['FORUM_DRIVER']->connection=$GLOBALS['SITE_DB'];
      }
      elseif ($SITE_INFO['forum_type']!='none')
      {
         $GLOBALS['FORUM_DRIVER']->connection=new database_driver(get_db_forums(),get_db_forums_host(),get_db_forums_user(),get_db_forums_password(),$GLOBALS['FORUM_DRIVER']->get_drivered_table_prefix());
      }
      $GLOBALS['FORUM_DRIVER']->MEMBER_ROWS_CACHED=array();
      $GLOBALS['FORUM_DB']=&$GLOBALS['FORUM_DRIVER']->connection;
   }
}

The bug is that it tries to avoid opening two database connections unnecessarily to the same database, but forgets to take table prefixes into account.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#51402
Avatar

Let us know if you have any other problems here. OCF MSN's are one of those features not used very often, so it is possible some other bugs may have crept in.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#51405
Avatar

Honoured member

that absolutely 100% fixed it, you rock. Leave it to me to find a bug, lol.

The multisites part is what drew me here, I run a huge comics community, and we split the main site up because it was just too big for one site. So now we have the main community, a site just for our own imprint, a site for our Small Press Idol contest, a site for our Self Publisher magazine, and a site for our convention…and we wanted to make sure we could share user base with the sites…but you guys actually go one further, and let different users get set to different permissions on different sites, so now I can set NEWS people to permissions on the magazine, and they won't be able to mess up the Imprint people on the other site, but the fans of all of it will be able to follow it all.

That's awesome.

As I push the limits of this even further, I am sure you'll hear more from me. I actually have my own development team working with me on this, and we'll be looking to develop directly into this so that our stuff can work hand in hand, and won't break when you upgrade stuff, etc.

Thanks!!!!
Back to the top
 
Posted
Rating:
#51406
Avatar

Honoured member

PS: I have a HUGE community (over 10000 members) and tons of posts, locked away on e107 right now. I have been unable to get the nuke importer to work on it at all, we'll be looking for help with that soon, We're not worried about bringing out the pages/news/etc, just the users and the forum posts. I am thinking of converting to SMF and THEN into OCPortal, cause I tested the SMF importer, and - while it timed out and stalled on an older version of our userbase and forums, but it seemed to be more natively compatible than the nuke thing, and - we didn't want the old pages anyway (i have them all as basic html and will convert to ocportal pages as I get going - they will need url adjustments anyway).

I was also interested in trying to, as I go, to MERGE the older SMF database with the one I get from the current e107 - cause when we went INTO e107, we got the members ok, but the posts didn't go in, so we've kept up the old smf version as an archive all this time. Not sure that's even possible, but it would be a nice healing step as we move into a system that finally seems to really work and have it all.

Also have an older phpbb2 database we have up with posts that are even older….hmmm….
Back to the top
 
Posted
Rating:
#51412
Avatar

Hi,

Glad it's fixed :).

The ocPortal importers do work via merging, so it may well be possible to do what you want.
People have gone via SMF before with success.

I guess e107's DB is too different from PHP-Nuke's. We've never tested it. If you'd like us to take a look at some time (some time in the next decade – when we have some time ;)) you can send to me n SQL dump to chris@ocportal.com (it'd be kept private).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#51413
Avatar

Honoured member

I will only ask for help if the SMF merging (I plan to get it all mergedin SMF and working before moving into ocportal…) becomes problematic.

my first attempt at it, ran into time-outs.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: