Results 1 to 7 of 7

Thread: Classipress and Job Roller on one site

  1. #1
    Thread Starter
    belleauwood's Avatar
    Join Date
    Dec 2010
    Posts
    56
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Classipress and Job Roller on one site

    Does anyone have an example of classipress and job roller on the same site that they could share the url for. How is it working to have them on one site?

    Thanks,
    Erin

  2. #2
    pepsi's Avatar
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    14,883
    Thanks
    91
    Thanked 804 Times in 718 Posts
    I don't have a URL to share, but this can definitely be done. Each theme would still require their own instance of WordPress to run, so this would be easy to achieve if you simply installed each on a different subdirectory or subdomain e.g.
    yoursite.com/classifieds or classifieds.yoursite.com
    yoursite.com/jobs or jobs.yoursite.com

    Then use the custom menus function in WordPress > Appearance > Menus to create the links in each navigation bar to the other.

    Then for the users having one login for both sites, you can find many tutorials via Google if you search, but here is one such site which explains how you can share the user database. This should also be of use..

  3. The Following 3 Users Say Thank You to pepsi For This Useful Post:

    Fanatic (February 9th, 2011), netpotion (February 6th, 2011), sherm50599 (April 1st, 2011)

  4. #3
    Member joniboy's Avatar
    Join Date
    Sep 2010
    Location
    United Kingdom
    Posts
    79
    Thanks
    13
    Thanked 16 Times in 10 Posts
    Not sure if it helps but I've got two instances of classipress running and both share the same user table so users can log in to either site with the same log in.
    As pepsi said the second install is in a sub domain. But the only way it would work was to have the second site URL set up like site2.yoursite.com.
    Plus when installing the wordpress part you need to choose a different table prefix but still use the same master database.

    For example, both installs would use your master database such as yoursite_sql, then site 1 would have wp1_ as its table prefix and site 2 would have wp2_ (obviously you can choose your own prefixes).
    To get the two sites to use the same user table I had to modify the config.php files for each site (remember to do this before you install wordpress).

    Both files would need these details:

    PHP Code:
    define('DB_NAME''yoursite_sql');

    /** MySQL database username */
    define('DB_USER''yourusername');

    /** MySQL database password */
    define('DB_PASSWORD''yourpassword');

    /** MySQL hostname */
    define('DB_HOST''localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET''utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE''');

    define('CUSTOM_USER_TABLE''wp1_users');
    define('CUSTOM_USER_META_TABLE''wp1_usermeta'); 
    Then lower down the page (around line 65) you will see: $table_prefix = 'wp_';

    Config file 1 would need the prefix for site 1 ie: $table_prefix = 'wp1_';
    and config file 2 would need the prefix for site 2: $table_prefix = 'wp2_';

    Then under define('WP_DEBUG', false);
    You need to add a custom capabilities prefix to site 1: define('CUSTOM_CAPABILITIES_PREFIX', 'wp1_');

    Once done, both config files point each install to the same user table in site 1.

    I did all this with one site already installed and modified the config file for site 2 before I installed it.

    Finally I also had to make sure the Custom Post Type & Taxonomy URLs were set up differently to the first site in the the classipress advance settings.


    I hope this all makes sense, I'm not very good at explanations. And I'm not an expert but I'm sure this would work for Job Roller too.

  5. The Following User Says Thank You to joniboy For This Useful Post:

    Fanatic (February 9th, 2011)

  6. #4
    Member joniboy's Avatar
    Join Date
    Sep 2010
    Location
    United Kingdom
    Posts
    79
    Thanks
    13
    Thanked 16 Times in 10 Posts
    Now that I've read Pepsi's reply I've seen the helpful link showing basically what I've just written. I should learn to read a thread in full before hitting reply!

  7. #5
    pepsi's Avatar
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    14,883
    Thanks
    91
    Thanked 804 Times in 718 Posts
    Ha! I'll give you points for sharing your experiences with it and helping another member of the community though

  8. #6
    Veteran Fanatic's Avatar
    Join Date
    Jul 2010
    Location
    Canada
    Posts
    885
    Thanks
    309
    Thanked 57 Times in 51 Posts
    Quote Originally Posted by pepsi View Post
    Ha! I'll give you points for sharing your experiences with it and helping another member of the community though
    Agree! At least he bothered and took the time to display it in CP's terms and coding, thank you Joniboy! I thought such maneuver could only be accomplished using WPMU.

  9. #7
    Member joniboy's Avatar
    Join Date
    Sep 2010
    Location
    United Kingdom
    Posts
    79
    Thanks
    13
    Thanked 16 Times in 10 Posts
    Quote Originally Posted by joniboy View Post
    Then under define('WP_DEBUG', false);
    You need to add a custom capabilities prefix to site 1: define('CUSTOM_CAPABILITIES_PREFIX', 'wp1_');
    Oops!
    If forgot to mention that you have to edit the capabilities.php file (in the wp-includes folder) for this to work.

    At line 518 you need to replace $this->cap_key = $wpdb->prefix . 'capabilities';
    with:
    PHP Code:
    if (defined ('CUSTOM_CAPABILITIES_WP')) {
     
    $this->cap_key $wpdb->prefix 'capabilities';
    }
    else {
    $this->cap_key CUSTOM_CAPABILITIES_PREFIX 'capabilities';

    Phew!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My ClassiPress site
    By Cyrus in forum Showcase & Feedback
    Replies: 13
    Last Post: October 28th, 2011, 10:26 AM
  2. Replies: 3
    Last Post: June 22nd, 2011, 08:11 AM
  3. Job Roller on Existing Site - Now I can't see any of my blog posts
    By impulsenetworks in forum Help Using JobRoller
    Replies: 4
    Last Post: December 2nd, 2010, 11:07 PM