Advertisement:

Author Topic: Shared Forum Mod  (Read 296732 times)

SeaOfSin

  • Guest
Re: Shared Forum Mod
« Reply #20 on: February 19, 2006, 03:29:30 PM »
At a guess, don't do the part that invovles smf.php and change this
Code: [Select]
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
Code: [Select]
if (!WIRELESS && empty($_REQUEST['option'])){   
header('Location: http://www.goosemoose.com/forum/index.php?forum=rat');

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #21 on: February 19, 2006, 04:37:40 PM »
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.

Offline Slavick

  • Newbie
  • *
  • Posts: 8
Re: Shared Forum Mod
« Reply #22 on: February 19, 2006, 04:40:44 PM »
Thanks alot for the reply, and its forgiven  :P i'll try it out the next morning and play arround with it.

thanks

Offline Laure

  • Semi-Newbie
  • *
  • Posts: 27
Re: Shared Forum Mod
« Reply #23 on: March 17, 2006, 07:53:20 PM »
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?

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #24 on: March 18, 2006, 11:46:39 PM »
What do you mean by active? If you add tabs just make them link to the new forum url.

Offline kingconnor

  • Newbie
  • *
  • Posts: 4
Re: Shared Forum Mod
« Reply #25 on: March 21, 2006, 04:34:55 AM »
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"?

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #26 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.

Offline kingconnor

  • Newbie
  • *
  • Posts: 4
Re: Shared Forum Mod
« Reply #27 on: March 22, 2006, 05:38:26 AM »
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

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #28 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.

Offline kingconnor

  • Newbie
  • *
  • Posts: 4
Re: Shared Forum Mod
« Reply #29 on: March 22, 2006, 06:01:37 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
« Last Edit: March 22, 2006, 06:05:57 PM by kingconnor »

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #30 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? :)

Offline kingconnor

  • Newbie
  • *
  • Posts: 4
Re: Shared Forum Mod
« Reply #31 on: March 23, 2006, 03:20:22 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.

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #32 on: March 23, 2006, 08:17:03 PM »
Thanks. I updated the first post to reflect your fix.

Offline Laure

  • Semi-Newbie
  • *
  • Posts: 27
Re: Shared Forum Mod
« Reply #33 on: March 25, 2006, 02:07:21 PM »
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?

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #34 on: March 26, 2006, 03:57:47 PM »
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.

Offline Killian

  • Newbie
  • *
  • Posts: 6
Re: Shared Forum Mod
« Reply #35 on: April 12, 2006, 11:27:09 AM »
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?

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #36 on: April 12, 2006, 08:22:36 PM »
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!

Offline lifeisunfair

  • Semi-Newbie
  • *
  • Posts: 16
Re: Shared Forum Mod
« Reply #37 on: April 13, 2006, 05:59:26 PM »
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 and not domain.com/mambo

anyway to fix this?

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Shared Forum Mod
« Reply #38 on: April 13, 2006, 08:58:58 PM »
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 ;)

Offline lifeisunfair

  • Semi-Newbie
  • *
  • Posts: 16
Re: Shared Forum Mod
« Reply #39 on: April 14, 2006, 05:02:49 PM »
also, anything to change when facing "hacking attempt" message when using configuration menu on mambo?