• Welcome to Simple Machines Community Forum. Please login or sign up.
December 07, 2021, 11:27:53 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


Shared Forum Mod

Started by Goosemoose, January 06, 2006, 03:04:39 AM

Previous topic - Next topic

SeaOfSin

At a guess, don't do the part that invovles smf.php and change this

if (!defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));

Add after:
if (!WIRELESS && empty($_REQUEST['option'])){   
header('Location: http://www.goosemoose.com/component/option,com_smf/Itemid,118/forum,rat');
}

to

if (!WIRELESS && empty($_REQUEST['option'])){   
header('Location: http://www.goosemoose.com/forum/index.php?forum=rat');

Goosemoose

Sorry I didn't respond earlier. Sea of Sin is on the right track. You'd also have to get a way for all the links on the current page to add the ?forum=rat or whatever.  It's only a few lines to try it out. I'd say go for it and see how it works.

Slavick

Thanks alot for the reply, and its forgiven  :P i'll try it out the next morning and play arround with it.

thanks

Laure

I can add tabs for the forum to the menu bar but how do i get them to be 'active' after they have been clicked on?

Goosemoose

What do you mean by active? If you add tabs just make them link to the new forum url.

kingconnor

Hi all, great work on this simple workaround! Is there a way to get a whole forum theme to be changed depending on the "forumName"?

Goosemoose

You could play around with the code the displays the theme and search for the 'forum' variable (i.e. forum=='cat' .) I haven't tried it but it should work without a problem. I'm not sure which file changes the theme but if you ask in general board someone should know.

kingconnor

Quote from: Goosemoose on March 21, 2006, 03:53:06 PM
You could play around with the code the displays the theme and search for the 'forum' variable (i.e. forum=='cat' .) I haven't tried it but it should work without a problem. I'm not sure which file changes the theme but if you ask in general board someone should know.

Thanks for the quick reply I will get on and do that. I might put an extra field in the smf_forum to make it a little more versatile. Just thought you should know that if a user uses the Collapsible function all the categories appear. I have just removed that function for now.

Thanks again

Goosemoose

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.

kingconnor

March 22, 2006, 06:01:37 PM #29 Last Edit: March 22, 2006, 06:05:57 PM by kingconnor
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);

Quote from: Goosemoose on March 22, 2006, 01:05:21 PM
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

Goosemoose

Very nice! Can you also give us your website so people can check out the usage of the mod? :)

kingconnor

Quote from: Goosemoose on March 22, 2006, 08:50:16 PM
Very nice! Can you also give us your website so people can check out the usage of the mod? :)

I will of course :D I'm developing it locally at the moment I will upload it to our web servers later on the month. Right if your interested this is the solution to the collapsible problem

Step 1: Open "yourforumdir/Sources/BoardIndex.php" and find the following code

$result_boards = db_query (around line 71)

Step 2: Add above this the following code (might look familiar)

   // Added for the multiple forum mod
    if(!empty($_REQUEST['forum']) && !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'] . '")'; 
   }


Thats it as far as I know.

Goosemoose

Thanks. I updated the first post to reflect your fix.

Laure

about the tabs, make it 'active', where it has the lighter color and looks like a tab (like Forum on the menubar above), what do I need to do to make the tabs i added for the different forums do that?

Goosemoose

Hi Laure,
I see what you're saying now. I'm sure if you post in the general forum someone whose done this with other items could help you. You'd basically need to check what $_REQUEST[forum] is equal to and change the color based on that.

Killian

this works great.  Any idea on how to get "?forum=rat or whatever" added to all of the links for those of us not using Joomla?

Goosemoose

Hi Killian,
I don't see a really simple way, although there may be one. The joomla bridge acts as a buffer and adds the code onto it. To get that last part you could probably use javascript as the buffer instead. I don't have tons of time right now or I'd help figure it out. Hopefully someone else can!

lifeisunfair

first i'd like to thank all who put their work teoghter and made this alt.

few questions in the new 1.13 brige there is no line such as

$myurl = sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $_REQUEST['Itemid'] . '&' );

Replace with:

    $myurl = sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $_REQUEST['Itemid'] . '&' .  (isset($_REQUEST['forum']) ? 'forum='.$_REQUEST['forum'].'&' : ''));


also, when ever i make a reply/newpost i get return'd to domain.com/forum [nofollow] and not domain.com/mambo [nofollow]

anyway to fix this?

Goosemoose

Look for a very similar line, Orstio probably changed the spacing. You'd have to ask him about the second question, hopefully he checks this thread ;)

lifeisunfair

also, anything to change when facing "hacking attempt" message when using configuration menu on mambo?

Advertisement: