Advertisement:

Author Topic: Shared Forum Mod  (Read 306818 times)

Offline SilentShade

  • Semi-Newbie
  • *
  • Posts: 15
Re: Shared Forum Mod
« Reply #180 on: January 22, 2007, 06:05:25 PM »
Fixed! Thanks everybody helping. The problem was in my hands :P This shared forum mode code, was put in between of two functions, while $user_info array is built in first function loadUserSettings(). After moving this code inside the function, everything is working like a charm. :) sorry for disturbance.

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #181 on: January 24, 2007, 10:48:30 PM »
Hi SilentShade,
 Thanks for clarifying that! Did you put it there because my directions weren't clear enough, or was it just a mistake? I'd like to explain the instructions better if I need to.

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: Shared Forum Mod
« Reply #182 on: January 26, 2007, 09:44:12 AM »
Orstio and I came up with a way to run multiple forums from 1 database, 1 directory, 1 installation. I'm running 7 forums and I only need to upgrade once, install mods once, and my users are shared :)

First the examples. Note the number of Categories that show in each, and that some are shared. some aren't.

http://www.goosemoose.com/component/option,com_smf/Itemid,118/forum,rat
http://www.goosemoose.com/component/option,com_smf/Itemid,118/forum,cat
http://www.goosemoose.com/component/option,com_smf/Itemid,118/forum,dog
http://www.goosemoose.com/component/option,com_smf/Itemid,118/forum,hedgehog
http://www.goosemoose.com/component/option,com_smf/Itemid,118/forum,rabbit
http://www.goosemoose.com/component/option,com_smf/Itemid,118/forum,ferret
http://www.goosemoose.com/component/option,com_smf/Itemid,118/forum,bird

Ok, you can do it without the Mambo/Joomla bridge but it's no where near as good. We used the power of the bridge to rewrite all the links. Basically what you do is create a new table smf_forums that houses two fields, forumName and catList. Here is an example of what it could look like with 3 forums that share some categories, and have some unique. This all works off of ONE smf directory!

forumName catList
Rat 1,2,3,4
Cat 1,5,6,7
Dog 1,4,8,9
[snipped]

I was wondering if anyone can explain how to do this without using joomla or other cms bridge. I just want to have 3 separate forums linked together and one user database.  I have one forum now with lots of members, so I would like them to be able to go directly to the two new ones without having to register or login again.  Also what the implications or problems with doing this might be.  (I don't know anything about sql dbs so please go slowly, I dont really understand the above post as it is :( )  If this is in the wrong section, please move or redirect me.
~thanks :)

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #183 on: January 27, 2007, 02:53:28 AM »
Hi Perplexed, please go back a few pages, how to do this was already explained.

Offline Neol

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
  • ##########
Re: Shared Forum Mod
« Reply #184 on: January 28, 2007, 04:50:04 AM »
Not yet. I'm finishing up my Integrated Chat mod for 1.1 Final, then I'll look at this mod.

I read that you have finished it, right? Well, not exactly finished (software almost never are), but it seems the new version works on 1.1 Final. So...

Goosemoose, please see if you can make an installable mod (through Package Manager). I guess smf.php has to be modified separately, since it's part of the bridge, not the forum.

An optional visual interface for setting up subforums would also be very welcome...

I know, I know... I'm trying to rush you. :P
« Last Edit: January 28, 2007, 04:52:48 AM by olti »

Offline SilentShade

  • Semi-Newbie
  • *
  • Posts: 15
Re: Shared Forum Mod
« Reply #185 on: January 28, 2007, 03:53:42 PM »
Hi SilentShade,
 Thanks for clarifying that! Did you put it there because my directions weren't clear enough, or was it just a mistake? I'd like to explain the instructions better if I need to.
First of all i really appreciate your work to make such a nice mod. Thank you! :)
In your first post you have instruction:
Quote from: Goosemoose
3. Edit Load.php

In Load.php

Find:
Code:

$user_info['query_see_board'] = '(FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroups))';   


Add After:
Code:

// Added for the multiple forum mod
    if(!empty($_REQUEST['forum']) && !isset($_REQUEST['action']) && !isset($_REQUEST['board']) &&!isset($_REQUEST['topic'])){
      $forumList = db_query("SELECT catList FROM {$db_prefix}forums WHERE forumName = '$_REQUEST[forum]'", __FILE__, __LINE__);
      $row_forumList = mysql_fetch_assoc($forumList);
      $user_info['query_see_board'] .= ' AND FIND_IN_SET(c.ID_CAT, "' . $row_forumList['catList'] . '")';     
   }
Well everything is right, but the function ends after this string
Code: [Select]
$user_info['query_see_board'] = '(FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroups))';    thats why i messed up this a little.. Maybe just add a reminder that you have to add "shared forum mod" code INSIDE the function to make it work :)
« Last Edit: January 28, 2007, 03:59:02 PM by SilentShade »

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #186 on: January 29, 2007, 09:30:45 PM »
Hi SilentShade,
 Thanks for the tip, but I'm a bit confused. The code says to find the first line, then add the 2nd bit after it. If you do that then you'd be fine.

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: Shared Forum Mod
« Reply #187 on: January 30, 2007, 09:33:47 AM »
Hi Perplexed, please go back a few pages, how to do this was already explained.
  lol thanks I read that but I am still a little unsure.  thanks anyway

Offline ShopHRM

  • Semi-Newbie
  • *
  • Posts: 73
    • Maritimes4Sale
Re: Shared Forum Mod
« Reply #188 on: February 19, 2007, 08:39:56 PM »
I am having trouble with this

1. Run this in phpMyAdmin
Code:


CREATE TABLE IF NOT EXISTS `smf_forums` (
  `forumName` text NOT NULL,
  `catList` varchar(128) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



i have a dreamhost account and there is a spot where i can enter phpmyadmin but i dont see a place to add that code anywhere

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #189 on: February 20, 2007, 03:23:03 AM »
Look for a sql button.

Offline ShopHRM

  • Semi-Newbie
  • *
  • Posts: 73
    • Maritimes4Sale
Re: Shared Forum Mod
« Reply #190 on: February 20, 2007, 10:42:50 AM »
thanks, got that figured, i seem to have everything setup but i have an issue

this is my homepage

http://www.mytestsite.hfxgaming.com/

if you click on the forum button it brings you to the forum i made when creating the bridge

http://www.mytestsite.hfxgaming.com/index.php?option=com_smf&Itemid=26

and here are the 2 links i made through this tutorial

http://www.mytestsite.hfxgaming.com/index.php?option=com_smf&Itemid=118&forum=dale
http://www.mytestsite.hfxgaming.com/index.php?option=com_smf&Itemid=118&forum=chip

as you can see there are no catagories or forums, what did i do wrong?


also just so i am clear what are the catlist numbers for


« Last Edit: February 20, 2007, 12:29:39 PM by ShopHRM »

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #191 on: February 20, 2007, 01:53:33 PM »
The catlist numbers are the numbers of the categories you want to show up for each forum. You will need to add your category numbers into the database for it to work. If you look at the link to each category on your forum you can figure out what each number is. That will fix your empty forum problem.

Offline ShopHRM

  • Semi-Newbie
  • *
  • Posts: 73
    • Maritimes4Sale
Re: Shared Forum Mod
« Reply #192 on: February 20, 2007, 03:30:18 PM »
got it all figured out, now i just need to figure out how to have different themes for each page :)
« Last Edit: February 20, 2007, 08:02:55 PM by ShopHRM »

Offline ShopHRM

  • Semi-Newbie
  • *
  • Posts: 73
    • Maritimes4Sale
Re: Shared Forum Mod
« Reply #193 on: February 20, 2007, 11:01:34 PM »
Just letting people know this is how to associate a theme with each separate forum. Please bear with me I’m a newbie to php

Step1: Create a new field in the smf_forums table called forumTheme and set to int.

Step 2: in the new field you have created (forumTheme) put the ID_THEME number you wish to associate with the forum (found in smf_themes table)

Step 3: Open up index.php under the root of your forum. Find line number 148 should be loadTheme(); replace with:

$database->setQuery( "SELECT DISTINCT forumTheme
                    FROM #__smf_forums
                    WHERE forumName='".$_REQUEST['forum']."'");
                   
$forumTheme = $database->loadResult();
   
loadTheme($forumTheme);

Yeah I did notice that too. I haven't had a chance to look at the code that creates the collapsable boards. Basically you would just need to make sure the code there matches the code changed in Load.php. If you find it let me know, I'm really strapped for time right now.

Yep I will check it out at some point and let you all know.

Regards

da king  ;D


I saw someone else get an error for this but i couldnt find the fix so I will ask again, I tried this and I got this error

Fatal error: Call to a member function setQuery() on a non-object in /home/.maren/mytestsite/mytestsite.hfxgaming.com/forum/index.php on line 150


I tried to change "FROM #__smf_forums" to "FROM smf_forums" but i get the same error.

I am using smf 1.1.2 with smf_1-1_joomla_1-0-x_bridge_1-1-7 and Joomla_1.0.12-Stable-Full_Package

Offline arez

  • Semi-Newbie
  • *
  • Posts: 12
Re: Shared Forum Mod
« Reply #194 on: February 22, 2007, 08:38:41 AM »
i have tried to get this to work without the bridge (following instructions on the forst post and the first post on page #10 ) but i just dont get it . maybe iam missing something ..... could someone help me out with this?

/edit

its also not the best thing to store the info about the borads in the domain/subdomain. maybe this could work together with the "costom actions" mod so we can have ...index.php?action=dogforum  to redirect to the categories releated to dogs
« Last Edit: February 22, 2007, 12:12:33 PM by arez »

Offline Neol

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
  • ##########
Re: Shared Forum Mod
« Reply #195 on: February 22, 2007, 01:53:10 PM »
I want to know how to use the mod without Joomla. I'm thinking of using SMF with TinyPortal.

Anyone got the mod working with TP?

Offline arez

  • Semi-Newbie
  • *
  • Posts: 12
Re: Shared Forum Mod
« Reply #196 on: February 22, 2007, 02:21:08 PM »
i got tp, too and i think the main problem is that the mod on the first page uses the system of the bridge to write the url and carry the variables for the forum

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #197 on: February 23, 2007, 02:46:31 AM »
There was a post on how to carry the variables without joomla in this thread. You will have to look around for it. A few people have modified this and gotten it to work well for them. You might want to pm them if you have any problems and ask them to answer your question here so that other may benefit. All my experiences were in using this with Joomla sites as that's all I run now!

Offline Neol

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
  • ##########
Re: Shared Forum Mod
« Reply #198 on: February 23, 2007, 03:21:07 AM »
There was a post on how to carry the variables without joomla in this thread.

You mean the first post of page 10?
http://www.simplemachines.org/community/index.php?topic=64492.msg780659#msg780659

Well, the poster used subdomains for that. Although subdomains are useful, not everyone can/may/will use them.

I'm trying to make the mod work with TP using actions. If I find a solution (even a partial one), I'll post it.

Offline arez

  • Semi-Newbie
  • *
  • Posts: 12
Re: Shared Forum Mod
« Reply #199 on: February 23, 2007, 05:37:03 AM »
there is a solution on tp forums but i didnt get it to work....

List of changes.

Code: [Select]
index.php one for each forum name.
line 334 'forumname' => array('BoardIndex.php', 'BoardIndex'),


Load.php, you have to add &&($_GET['action'] == 'forumname') for each forum that you put up
line 527
//SHARED FORUM MOD
if(!isset($_REQUEST['board']) &&!isset($_REQUEST['topic'])  &&isset($_REQUEST['action']) &&($_GET['action'] == 'forumname')){
$sharedforummod = $_GET['action'];
        $forumList = db_query("SELECT catList FROM {$db_prefix}forums WHERE forumName = '$sharedforummod'", __FILE__, __LINE__);
    $row_forumList = mysql_fetch_assoc($forumList);
        $user_info['query_see_board'] .= ' AND FIND_IN_SET(c.ID_CAT, "' . $row_forumList['catList'] . '")';
  }


Changing the linktree to the right forum doesnt work, and I have not had a chance to try and get it to work yet....
line 547
        // Start the linktree off empty..not quite, have to insert forum
if ($_GET['action'] == 'forumname') {$context['linktree'] = array(array('url' => $scripturl . '?action=forumname', 'name' => 'ForumName'));}

else
     $context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => 'Forum'));


The database side is set up the same as it is in the shared forum mod for Joomla/SMF