Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: simmaster on July 07, 2009, 05:55:31 AM

Title: Shared Forums for SMF 2.0
Post by: simmaster on July 07, 2009, 05:55:31 AM
Demo: Before (http://simenigma.simgames.net/index.php) / After (category ID #1) (http://simenigma.simgames.net/index.php?forum=one)


Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1936)

Please note:
There is yet another bug in the install script that causes db_create_table to fail and continue installation. When installation is complete, please run this code in phpMyAdmin or wait for the next patch.

CREATE TABLE `{db_prefix}forums` (
`forum_name` VARCHAR( 255 ) NOT NULL ,
`cat_list` VARCHAR( 255 ) NOT NULL
);
INSERT INTO {db_prefix}forums (forum_name, cat_list) VALUES ("one", "1");

Remember to replace {db_prefix} with whatever your database prefix is.


Shared Forums for SMF 2.0
Created by simmaster07
Original concept by Goosemoose and Orstio (http://www.simplemachines.org/community/index.php?topic=64492.0)

This mod allows you to add shared forums to your website. You can split your one large forum into smaller, separate forums and access them with a simple URL tweak. For example, if you assign the category IDs 1,2,3,5,8 to the forum name "fibonacci," you can access this page by changing the url to http://mysite.com/index.php?forum=fibonacci (changing mysite.com to wherever your site is and fibonacci to whatever the forum name is.) Using the power of PHP arrays, you can create an unlimited amount of forums divided by an unlimited amount of categories by splitting them with spaced colons ( : ).

The code was modified to work with SMF 2.0 and adds a section in the Modifications panel to add your shared forums.

EXAMPLE:

Forum Names:  math : stuff : cows : smf
Category IDs: 1,2,5 : 3,4 : 6,7 : 8,9


The forum "math" will be assigned to categories 1, 2 and 5 and would be found at ?forum=math (without rewriting) or /forum,math with rewriting.

NOTE: It is unclear if this mod is compatible with PortaMX, SimplePortal or EZPortal! This is a beta. Use at your own risk!

CHANGELOG / TO-DO

+ 7/1/2009 - Original release
  + Code now SMF 2.0 compatible
  + Area in admin panel for control
  + Wireless compatible
+ 7/6/2009 - Release to Mod Site
  + Fixes
    + Replaced several database queries with more proper database queries
+ 7/7/2009 - Emergency patch
  + Fixes
    + Fixes fatal installation bug
  ! Features
     ! Now has $smcFunc['db_free_result'] to avoid memory hogging
 
~ TO-DO
  ~ Shared forums have separate titles
  ~ Shared forums have individual settings, members, admins, etc.
  ~ Modules (existing modifications that are modified for shared forums)
  ~ Improved admin panel
  ~ Shared forums have separate permissions (admin panel and frontend)
  ~ Not much else but bugfixes
Title: Re: Shared Forums for SMF 2.0
Post by: Eliana Tamerin on July 07, 2009, 10:35:31 AM
Whoa, color me pink here. This is an impressive feature list. Be sure to shout it to the heavens when it's ready to be downloaded, I'd certainly like to test this out, and test it with SimplePortal.

Though, as a correction, TinyPortal is not yet compatible with SMF 2.0, so the portal softwares you should be warning against are SimplePortal, PortaMX and EZPortal.
Title: Re: Shared Forums for SMF 2.0
Post by: Angelotus on July 07, 2009, 10:51:26 AM
Cool mod, after trying to install got this error, and the install stopped:

Duplicate entry 'sharedforum_catarray' for key 1
File: /customers/weeklyfun.nl/weeklyfun.nl/httpd.www/forum/Packages/temp/install.php
Line: 8
Title: Re: Shared Forums for SMF 2.0
Post by: alex30 on July 07, 2009, 10:57:17 AM
Nice modification, thanks.
Title: Re: Shared Forums for SMF 2.0
Post by: Eliana Tamerin on July 07, 2009, 11:05:17 AM
Quote from: Angelotus on July 07, 2009, 10:51:26 AM
Cool mod, after trying to install got this error, and the install stopped:

Duplicate entry 'sharedforum_catarray' for key 1
File: /customers/weeklyfun.nl/weeklyfun.nl/httpd.www/forum/Packages/temp/install.php
Line: 8


Did you notice the warning in bold on top of the post and in the mod description?
Title: Re: Shared Forums for SMF 2.0
Post by: simmaster on July 07, 2009, 12:32:56 PM
This would've been a lot easier if my test server hadn't stopped responding and my main site's host had crashed. I'm probably the luckiest person in the world. :P
Title: Re: Shared Forums for SMF 2.0
Post by: heinandar on July 07, 2009, 01:21:27 PM
LOL........Nice Mod ..
I'm hoping for smf 1.1.9 also
I also need this mod.
Title: Re: Shared Forums for SMF 2.0
Post by: simmaster on July 07, 2009, 02:10:02 PM
Quote from: heinandar on July 07, 2009, 01:21:27 PM
LOL........Nice Mod ..
I'm hoping for smf 1.1.9 also
I also need this mod.
This mod is just a conversion of some code from 1.1 to 2.0, but I will add new features in the future.
Original topic (http://www.simplemachines.org/community/index.php?topic=64492.0)
Title: Re: Shared Forums for SMF 2.0
Post by: MF30 on July 07, 2009, 08:03:08 PM
thanks.
Title: Re: Shared Forums for SMF 2.0
Post by: simmaster on July 07, 2009, 08:31:57 PM
Almost ready for a finished release here (I hope)
Title: Re: Shared Forums for SMF 2.0
Post by: simmaster on July 07, 2009, 11:05:08 PM
Shared Forums 0.8 Emergency Patch Release
CHANGELOG:
+ Fixes fatal installation bug
+ Now has $smcFunc['db_free_result'] to avoid memory hogging
Title: Re: Shared Forums for SMF 2.0
Post by: Groundhog on July 08, 2009, 02:31:34 AM
Hi simmaster07

I'm looking forward to trying this out but I got this message after installing and also when trying to apply the changes in the "Miscellaneous" section. I used the latest update for the mod.

Database Error
Table '******_smf1.smf_forums' doesn't exist
File: /home/******/public_html/home/Sources/ManageSettings.php
Line: 2061


Is there something I can do here to sort the problem?

Thanks
Title: Re: Shared Forums for SMF 2.0
Post by: Angelotus on July 08, 2009, 06:33:37 AM
Quote from: Eliana Tamerin on July 07, 2009, 11:05:17 AM
Quote from: Angelotus on July 07, 2009, 10:51:26 AM
Cool mod, after trying to install got this error, and the install stopped:

Duplicate entry 'sharedforum_catarray' for key 1
File: /customers/weeklyfun.nl/weeklyfun.nl/httpd.www/forum/Packages/temp/install.php
Line: 8


Did you notice the warning in bold on top of the post and in the mod description?

That is not an answer! Offcourse I saw the warning, so what?
Anyway, I will try it out some time later...
Title: Re: Shared Forums for SMF 2.0
Post by: Eliana Tamerin on July 08, 2009, 08:01:14 AM
That meant that the mod was not safe to use. You should not have expected any success when you tried. The mod author warned you, and you ignored it, what's your complaint?
Title: Re: Shared Forums for SMF 2.0
Post by: Angelotus on July 08, 2009, 08:46:02 AM
Eliana, I'm trying to be rude and have no complaints. I was just telling the author what problems I run into while installing this mod. Nothing more, nothing less.
Title: Re: Shared Forums for SMF 2.0
Post by: Eliana Tamerin on July 08, 2009, 08:52:49 AM
Do you still have the issue now that he's had time to fix it?
Title: Re: Shared Forums for SMF 2.0
Post by: simmaster on July 08, 2009, 11:42:52 AM
Quote from: Groundhog on July 08, 2009, 02:31:34 AM
Hi simmaster07

I'm looking forward to trying this out but I got this message after installing and also when trying to apply the changes in the "Miscellaneous" section. I used the latest update for the mod.

Database Error
Table '******_smf1.smf_forums' doesn't exist
File: /home/******/public_html/home/Sources/ManageSettings.php
Line: 2061


Is there something I can do here to sort the problem?

Thanks
Looks like db_create_table isn't working properly. I'll probably have to replace db_create_table with db_query in the meantime until I can get it working properly (just as an emergency fix).
Quote from: Angelotus on July 08, 2009, 08:46:02 AM
Eliana, I'm trying to be rude and have no complaints. I was just telling the author what problems I run into while installing this mod. Nothing more, nothing less.
Yes, but the mod was marked unsafe due to an installation glitch, which is what you experienced, so I was completely aware of the issue in the first place. ;)
I don't know what's wrong with this code, especially since it's based off of what I found in SleePy's pastebin... plus, it was working fine for me. :-[

// Create the forums table
$columns_to_insert = array(
array('name' => 'forum_name', 'type' => 'varchar', 'size' => 255, 'null' => 0, 'auto' => 0),
array('name' => 'cat_list', 'type' => 'varchar', 'size' => 255, 'null' => 0, 'auto' => 0)
);

$smcFunc['db_create_table']
(
'{db_prefix}forums', // Table name
$columns_to_insert
);

EDIT: PHP hates me. :P
EDIT (yet again): Why won't you make the table!!
Title: Re: Shared Forums for SMF 2.0
Post by: Angelotus on July 08, 2009, 01:59:39 PM
O, sorry I wasn't aware of that, or didn't read to well. Eliana: sorry for the mistake. And bu the way: I ment: I'm NOT trying to be rude ;D ;D ;D
Have tried to install the newer version. It works.
Title: Re: Shared Forums for SMF 2.0
Post by: simmaster on July 08, 2009, 02:24:32 PM
Shared Forums 0.8 Emergency Patch Release 2
+ Defined an index so db_create_table would not fail.
Title: Re: Shared Forums for SMF 2.0
Post by: Eliana Tamerin on July 08, 2009, 02:44:17 PM
No harm no foul. Now let's just enjoy the mod. ;)
Title: Re: Shared Forums for SMF 2.0
Post by: Groundhog on July 08, 2009, 04:50:28 PM
Thanks simmaster

No db error messages now but I don't think it's working for me. Probably because I am using (SimplePortal 2.1.1)

I can go through the setting up without any problems but the resulting page is blank, or should I say that everything is there except the board it's self.

I have tried  (?****=**** (without rewriting) or /****,****) in the link as per your instructions but that didn't work for me.

I have my board links setup to show like this (index.php/board,4.0.html) although when I modify a board it show the ID as (4) so I assume that this is nothing to do with my problem.

If you have no idea then don't worry?

Regards
Title: Re: Shared Forums for SMF 2.0
Post by: simmaster on July 08, 2009, 08:17:20 PM
Quote from: Groundhog on July 08, 2009, 04:50:28 PM
Thanks simmaster

No db error messages now but I don't think it's working for me. Probably because I am using (SimplePortal 2.1.1)

I can go through the setting up without any problems but the resulting page is blank, or should I say that everything is there except the board it's self.

I have tried  (?****=**** (without rewriting) or /****,****) in the link as per your instructions but that didn't work for me.

I have my board links setup to show like this (index.php/board,4.0.html) although when I modify a board it show the ID as (4) so I assume that this is nothing to do with my problem.

If you have no idea then don't worry?

Regards
Like I said in the mod warning, it is not compatible with SimplePortal (tested), EZPortal or PortaMX (untested).

Oh yeah, got a demo up and running.
Title: Simple Portal compatibility
Post by: movingmagic on July 09, 2009, 07:37:45 AM
Hi,

any chance you could get it compatible with Simple Portal?
I would love to use your mod very much, but I also need a portal very much.

Would it be a great problem for you?

Thanx,

Pieter
Title: Re: Simple Portal compatibility
Post by: Groundhog on July 09, 2009, 11:19:30 AM
Quote from: movingmagic on July 09, 2009, 07:37:45 AM
any chance you could get it compatible with Simple Portal?
I would love to use your mod very much, but I also need a portal very much.

Simmaster07

I don't know if your wanting this kind of info but here it is anyway in case it's of interest.

I found this in my SMF Error log after trying the new link (once)?


8: Undefined variable: scripturl
File: /home/*****/public_html/home/Themes/default/BoardIndex.template.php (portal_below sub template - eval?)
Line: 58

8: Undefined variable: scripturl
File: /home/*****/public_html/home/Themes/default/BoardIndex.template.php (portal_below sub template - eval?)
Line: 8

8: Undefined variable: scripturl
File: /home/*****/public_html/home/Themes/default/BoardIndex.template.php (portal_below sub template - eval?)
Line: 5

8: Undefined variable: scriptur
File: /home/*****/public_html/home/Themes/default/BoardIndex.template.php (body_above sub template - eval?)
Line: 428
Title: Re: Simple Portal compatibility
Post by: simmaster on July 09, 2009, 03:10:28 PM
Quote from: Groundhog on July 09, 2009, 11:19:30 AM
Quote from: movingmagic on July 09, 2009, 07:37:45 AM
any chance you could get it compatible with Simple Portal?
I would love to use your mod very much, but I also need a portal very much.

Simmaster07

I don't know if your wanting this kind of info but here it is anyway in case it's of interest.

I found this in my SMF Error log after trying the new link (once)?


8: Undefined variable: scripturl
File: /home/*****/public_html/home/Themes/default/BoardIndex.template.php (portal_below sub template - eval?)
Line: 58

8: Undefined variable: scripturl
File: /home/*****/public_html/home/Themes/default/BoardIndex.template.php (portal_below sub template - eval?)
Line: 8

8: Undefined variable: scripturl
File: /home/*****/public_html/home/Themes/default/BoardIndex.template.php (portal_below sub template - eval?)
Line: 5

8: Undefined variable: scriptur
File: /home/*****/public_html/home/Themes/default/BoardIndex.template.php (body_above sub template - eval?)
Line: 428

Thanks for that info, might help me make this SP compatible.

EDIT: Hooray for bugs! I wish I would've noticed the bugs before it got approved. :P
Next patch won't be an emergency one since it's going through testing for the "custom title" feature on my to-do list.
Title: Re: Shared Forums for SMF 2.0
Post by: identiti on July 12, 2009, 06:44:26 AM
I've been thinking about this exact mod for a while now. Good thing it exists already!

now for my next problem...

how can i make:
forum.domain.com to
domain.com/?forum=forum
Title: Re: Shared Forums for SMF 2.0
Post by: codnerd on July 13, 2009, 08:41:21 PM
I've been waiting for a mod exactly like this for very, very long now.
Thank you very much sir.
Title: Re: Shared Forums for SMF 2.0
Post by: greece on July 19, 2009, 07:22:54 AM
this only works in adding the values in phpMyAdmin... at least in smf rc1-1 &1.2...

The Miscellaneous option under modifications only erases the database in smf_forums values...
Title: Re: Shared Forums for SMF 2.0
Post by: Darthx on July 20, 2009, 08:11:18 PM
I love the idea and I hope you will continue with this project, it has a great utility imo.

I would like to make some suggestions:

Thanks and good luck with the project ;)

Quote from: greece on July 19, 2009, 07:22:54 AM
this only works in adding the values in phpMyAdmin... at least in smf rc1-1 &1.2...

The Miscellaneous option under modifications only erases the database in smf_forums values...

I confirm it too.
Title: Re: Shared Forums for SMF 2.0
Post by: Carlos Faria on July 24, 2009, 01:22:16 PM
Hello,

I have a problem is that I have everything set up so ...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg169.imageshack.us%2Fimg169%2F1894%2Fdfds.png&hash=cfb4c06958b975c00a822f77773da4ee3cd70dd1)

And when I go to:

http://mysite.com/index.php?forum=LusoGaming

The tables do not exist ...

What do I do?


Thank you!
Title: Re: Shared Forums for SMF 2.0
Post by: Carlos Faria on July 25, 2009, 02:09:01 PM
help...
Title: Re: Shared Forums for SMF 2.0
Post by: Carlos Faria on July 27, 2009, 05:56:41 AM
Anyone? This is urgent!
Title: Re: Shared Forums for SMF 2.0
Post by: Carlos Faria on July 29, 2009, 04:52:03 PM
Solved.
Title: Re: Shared Forums for SMF 2.0
Post by: simmaster on August 05, 2009, 10:58:47 AM
I cannot work on this mod due to other projects and my role as an administrator at my site and freeresellers.com. You might have figured that out already, but oh well. Feel free to take over the project and fix up the bugs.
Title: Re: Shared Forums for SMF 2.0
Post by: Liam. on August 12, 2009, 09:44:53 AM
I'm having the exact same problem as TugaMaster was having. He won't reply to his PM's so I'm going to ask here. How exactly can I fix this problem?
Title: Re: Shared Forums for SMF 2.0
Post by: Carlos Faria on August 24, 2009, 05:36:15 PM
Quote from: iKorp on August 12, 2009, 09:44:53 AM
I'm having the exact same problem as TugaMaster was having. He won't reply to his PM's so I'm going to ask here. How exactly can I fix this problem?

I'll put here for everyone to know.

1)

QuotePlease note:
There is yet another bug in the install script that causes db_create_table to fail and continue installation. When installation is complete, please run this code in phpMyAdmin or wait for the next patch.

CREATE TABLE `{db_prefix}forums` (
`forum_name` VARCHAR( 255 ) NOT NULL ,
`cat_list` VARCHAR( 255 ) NOT NULL
);
INSERT INTO {db_prefix}forums (forum_name, cat_list) VALUES ("one", "1");

Remember to replace {db_prefix} with whatever your database prefix is.

2) Configure how you want in Control Panel:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg169.imageshack.us%2Fimg169%2F1894%2Fdfds.png&hash=cfb4c06958b975c00a822f77773da4ee3cd70dd1)

3) Go to phpMyAdmin.

4) Select the table: smf_forums

5) Click: hxxp://209.188.89.32:2082/3rdparty/phpMyAdmin/themes/original/img/b_insrow.png (Insert)

6)    

Field: forum_name
Value: LusoGaming <- Example

--------

Field: cat_list
Value: 2,6 <- Example

7) "Go"

Enjoy!


NOTE:

In step 6) will have to make 1 forum at a time.

If you make a change will have to repeat the process with all the forums.  >:(
Title: Re: Shared Forums for SMF 2.0
Post by: Liam. on August 25, 2009, 04:43:07 AM
Thanks for that! I've really wanted to use this mod, so if this works, I'll give you a big eHug and a Cookie ;D
Title: Re: Shared Forums for SMF 2.0
Post by: ScottDB on September 16, 2009, 04:32:25 PM
Just wondering if anyone has taken this mod over. Looks like it would be a great mod but I am tired of adding mods or themes that have no support. Is there someone that knows about this mod that has it working with 2.0 rc1.2 and SP 2.2.2
Title: Re: Shared Forums for SMF 2.0
Post by: FireDitto on November 10, 2009, 01:01:42 AM
Would also like to know if anyone has taken it over.

I'd love to be able to use it on 2.0 RC2.




I use EzPortal.
Title: Re: Shared Forums for SMF 2.0
Post by: Hj Ahmad Rasyid Hj Ismail on December 06, 2009, 07:42:59 PM
It seems abandoned. Too bad... It is a very good mod.
Title: Re: Shared Forums for SMF 2.0
Post by: Hj Ahmad Rasyid Hj Ismail on September 21, 2010, 06:18:38 AM
Quote from: ahrasis on September 21, 2010, 06:17:02 AM
I have forwarded the ideas to PortaMX and they have developed a very good mod for this and it is called a subforums mod. Those who are in need of this mod may request it from PortaMX (feline). They will release their beta soon an d it will also be packed together with PortaMX Portal mod.
Title: Re: Shared Forums for SMF 2.0
Post by: Arantor on January 26, 2014, 04:32:24 PM
Marked as archived.