Shared Forum Mod -- latest version: 0.2.5.4

Started by Sarge, March 17, 2007, 02:58:49 AM

Previous topic - Next topic

Sarge

#40
Quote from: KreedGhost on April 07, 2007, 04:41:06 PM
Right now the only problem I am having is when I make all the changes as you said above, but no matter what forum I choose they take me back to the same one. You can see what I am saying if you go to www.sabnnetwork.org and look to the right side in the links menu for forums and click on Sabn Network or San Andreas by Night...
**Edit***
I figured it out......It had something to do with the address url path....Alright also, when I go to create a new catagory for the new subforum it doesn't show up and I made the catagory list 3,4,5 and nothing shows up...

Fixed that, so far I have no errors in the logs at all with anything..The mod is awesome.....

I know that I should have written some documentation when I released the beta. Well, I'm already writing it and will it post later.

1. After you set up a (sub)forum and click the Save button at the end of the mod's page, the [ Go To Forum ] link is your forum link. Use that when you set up the list of your forums.

2. When you create a new category at Admin > Forum > Boards > Create New Category tab, it won't show under any forum until you include it in the Category List setting of a forum. But, if you access a child board directly, it will show under the Default forum - see SFMod's control panel.

In Albwebmaster, for example, there are 4 categories: cat. 1 is included in the General Forum (which is also the default forum), cat. 2 and 3 are in IT and cat. 4 isn't included in any forum; but you can still access its child board "Board 4-1" directly if you know its ID:
http://www.albwebmaster.com/index.php?board=4.0

Board permissions apply in all cases! ;)


Quote from: KreedGhost on April 07, 2007, 04:41:06 PM
Fixed that, so far I have no errors in the logs at all with anything..The mod is awesome.....

Yep, I fixed the errors before releasing the mod. ;) Glad you like it! :)

If you need any help with modifying the template that your forum is using, I'm willing to assist. If you want to do it yourself, you can always use Daniel15's Package Parser: http://modparser.dev.dansoftaustralia.net/ to see what changes are made by the mod to the default theme.
Select "Only Theme edits (editing a theme to support a mod)" to display, well, only theme edits.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

catahoulabulldog

I currently run a TP/SMF site, and love them both.

But, I sit on the edge of deciding to take on a new idea, a website that has a main "portal" with completely seperate but linked forums within that CMS front page system... did I actually find one? am I reading this correctly?

Sarge

#42
Quote from: catahoulabulldog on April 08, 2007, 11:13:24 PM
I currently run a TP/SMF site, and love them both.

But, I sit on the edge of deciding to take on a new idea, a website that has a main "portal" with completely seperate but linked forums within that CMS front page system... did I actually find one? am I reading this correctly?

No and yes.

Shared Forum Mod (SFMod for short) does not create "completely separate" forums; instead, it creates subforums within one forum.

The base concept of this mod is: subforums are collections of categories, just like categories are collections of boards. So it is actually a content-filtering mod.

There is a reason why it is named "Shared Forum Mod" and not "Multiple Forums Mod": you have one forum installation, one set of users, one set of categories, boards and topics, and they're shared across all subforums. You choose which categories (and their child boards and topics) are displayed by each subforum. You can even share a category between 2 subforums, so that it appears in both of them.

So, recent posts, unread replies, own posts and search results are, by default, filtered to show only those topics/posts in boards inside categories that "belong" to the current subforum.

To repeat, see the mod in action at the online test site http://www.albwebmaster.com/.

I created 4 categories there: the category with ID=1 is included in the "General Forum" and cat. 2 and 3 are in "The IT Forum". (You can see the Forums block in the right side panel.) Category 4 isn't included in any forum, but you can still access its child board "Board 4-1" directly if you know its ID:
http://www.albwebmaster.com/index.php?board=4.0

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

catahoulabulldog

I can see that I will have to install and play to see if this will meet what I am thinking I need..... but all I can say is WOW nice job.... I wish I could understand the "how it works" of this so that I could grab the concept better. shared DB while maintaining seperate content, AND  the ability to have shared content and look?

Sarge

#44
Quote from: catahoulabulldog on April 08, 2007, 11:47:03 PM
I can see that I will have to install and play to see if this will meet what I am thinking I need..... but all I can say is WOW nice job.... I wish I could understand the "how it works" of this so that I could grab the concept better. shared DB while maintaining seperate content, AND  the ability to have shared content and look?

OK, let me give an example to help you grab the concept better. It's really simple, actually.

Say, you have a RPG (role-playing games) forum named "RPG Forum" with 5 categories and their child boards. The first category is for site rules and updates, member introductions, etc. The other categories (2, 3, 4 and 5) are each about a certain RPG setting:

1) General
2) Hogwarts
3) Lord of the Rings
4) Star Wars
5) Dungeons & Dragons

The Hogwarts category, for example, has 7 boards, one for each year at the Hogwarts School of Witchcraft and Wizardry (Harry Potter's school). After registering, forum members can reply and post topics in those boards, as well as boards in other categories if they wish.

Say, you'd like each category to be displayed separately from the others. You'd also like to show a different template for each category (you have already installed the templates, of course). This is where SFMod comes in: you create 5 (sub)forums, one for each category -- you assign category 1 to the General forum, category 2 (Hogwarts) to the Hogwarts forum, category 3 to the LOTR forum and so on.

Then you put 5 links on the homepage, 1 for each forum. When a user clicks on the link for a forum, only categories, boards and topics inside that forum are displayed. Also, TP's Recent block only shows recent topics for that forum. Simple idea, isn't it?

SFMod has a setting called "Default forum," where you choose which forum should be displayed when users visit your site for the first time, or when their previous sessions have expired when they visit again. In this example, you would want to make General the default forum, so that first-time users can read about what your site is about, rules, available RPGs etc.

I'm new to TP, so I'm investigating TP's article system etc. to see if further modifications are needed or desired. If you think something is missing or should be in the mod, let me know!

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Sarge

#45
SFMod 0.2.1

List of changes:
+ Added support for the UTF-8 version of English.

Mod strings are now added to either Modifications.english.php or Modifications.english-utf8.php, whichever is present (click on the picture to see it larger):



Get it here:
http://www.albwebmaster.com/index.php?topic=5.0

Special thanks to KreedGhost for pointing that out.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

KreedGhost

#46
I have been playing with this mod for a few days and been looking it over, getting things going in it and until today I have been able to fix the small things as I said in my post above. Now I have come to an issue that I can't seem to get around, so Sarge hopfully you will have the answer to this one....

It's ironic that you were talking about this mod being used for an RPG forum, this is actually the perfect mod for that and the ironic thing about it is, the forum I am using it on is an RPG forum.

Anyways here is my problem...

I created as I said earlier catagories asigned them to the proper catagory list so they would show up in the sub-forum that I have created. Well I have the sub-forum listed at 3,4,5,6,7,8 because for that one I need the multiple catagories in it, well now my problem is the catagories aren't showing up anywhere, especially in the sub-forum where they should be, and then when I take away any of the numbers from the catagory list nothing shows up in that sub-forum.

I have tried to delete the sub-forum and set it back up but the same two catagories still show in it..

Any suggestions?


Alright, Imma an idiot, though one thing I would like to say, and I think this will depend on how many times you delete catagories, I only have in a sense 5 catagories right now but the newest one is number 12 in the catagory list and I think this is because when you delete a catagory a new number is put in it's place. SO if that is true, then when making new catagories for your sub forums' you should mouse over the catagory name to make sure that it is the same as the number you place up in the catagory list..

If I am wrong, Sarge feel free to call me an idiot.....

Sarge

#47
Quote from: KreedGhost on April 09, 2007, 04:53:13 PM
It's ironic that you were talking about this mod being used for an RPG forum, this is actually the perfect mod for that and the ironic thing about it is, the forum I am using it on is an RPG forum.

If you think that this is the perfect mod for RPG forums, wait until I figure out a (hopefully) proper way to write a mod for multiple profiles...

http://www.simplemachines.org/community/index.php?topic=160699.msg1027243#msg1027243

Of course, my MPMod would be compatible with SFMod. What a powerful duo they would make...

Quote from: KreedGhost on April 09, 2007, 04:53:13 PM
Anyways here is my problem...

<snip>

Alright, Imma an idiot, though one thing I would like to say, and I think this will depend on how many times you delete catagories, I only have in a sense 5 catagories right now but the newest one is number 12 in the catagory list and I think this is because when you delete a catagory a new number is put in it's place. SO if that is true, then when making new catagories for your sub forums' you should mouse over the catagory name to make sure that it is the same as the number you place up in the catagory list..

If I am wrong, Sarge feel free to call me an idiot.....

I won't lie to you... In a way, you're right. :D It has actually to do with how SMF and most database systems (including MySQL) work.




Explanation:

The first category -- created during SMF installation -- gets an ID = 1. Simply said, every created category gets the ID of the last created category + 1 (technically, this statement may be slightly incorrect, but that's what happens in most systems).

If you delete a category, its ID is not reused; neither are category IDs resorted. In other words, every created category ID is unique.

Example: if you have category 1, 2 and 3 and delete category 2, the remaining categories would be 1 and 3; the next created category would have the ID of 4, not 2 (because IDs of deleted categories are not reused) nor 3 (because the category ID list is not resorted).

The next ID to be used is computed and saved automatically in the categories database table. So, even if you create and, later, delete category 4 (the last one created), the system knows that the category ID that will be used next should be 5.




There's another possible situation: you enter a valid category ID in a Category List; some time later, you delete that category but you don't remember to update the mod settings. Boom, the mod "doesn't work."

I was thinking today that the mod should check if the selected theme ID is valid and replace it with 0 ("Forum or Board Default") if it is not. Your issue with category IDs strikes the same note. Actually, theme IDs and other SMF IDs as well follow the same convention as explained above. Therefore, in future versions I will add error checking regarding invalid and corrupt settings.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Sarge

#48
To aid with site indexing, I think it would be best if the "Page Title" for the forum that will be used as "Default Forum" has the name of your site or something similar. That's because the default forum's page title is also used for meta content and is among the first things that Googlebot (or whatever search engine robot is crawling your site) will see.

I have disallowed robots to crawl AlbWebMaster.com, but if I allowed them, I guess that the site's homepage would be listed as "General Forum" and not AlbWebMaster. That's because the mod modifies both meta description and page title:


<meta name="description" content="General Forum" />
...
<title>General Forum</title>

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

KGIII

I have watched... Listened... And pondered... How long 'fore this is a mod that is SMF specific without needing TP or, in case I missed something, is it that way already?

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

Sarge

#50
Quote from: KGIII on April 10, 2007, 05:15:49 AM
I have watched... Listened... And pondered... How long 'fore this is a mod that is SMF specific without needing TP or, in case I missed something, is it that way already?

The mod makes just a few TP-specific changes and they're not essential.

You know, I would have released a SMF-only version already... if I knew a way to insert (sub)forum buttons or links in the default template! See the "To do" list in first post.

I don't want to insert static buttons, because their number can change... and besides, there's no way 10 forum buttons would look good in the main menu, would they?

An idea would be to change the HOME button into a FORUMS dropdown menu, perhaps a suckerfish variant. I have asked about this here:
http://www.simplemachines.org/community/index.php?topic=158224.0
but I didn't get an answer I didn't know already! Maybe it's my English or the tedious way I write, who knows...  :-\

I also asked at the TinyPortal forum:
http://www.tinyportal.net/index.php?topic=14843.0
where I got better responses... which tells a lot about how concise my posts should be.

The way the menu should work is similar to the upper menu (Home   Download   Customize  Support   Community   About   Docs) in the new SMF theme. I like the underline, which shows where you are and which is exactly part of what I need: the second row of the FORUMS menu.

Visit the links at the end of my post here at SM.org and see the image in my post at TP.net to see what I'm talking about.

I might become a Charter Member just to get my hands on the new default theme code...

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

KGIII

Feel free to drop me a PM if you would like. Yeah - I've been watching to see how far you went with this. ;)

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

KreedGhost

If you think that this is the perfect mod for RPG forums, wait until I figure out a (hopefully) proper way to write a mod for multiple profiles...

http://www.simplemachines.org/community/index.php?topic=160699.msg1027243#msg1027243

Of course, my MPMod would be compatible with SFMod. What a powerful duo they would make...


This is perfect for RPG forums, but it is also something that is great to have for any forum that you would want to give an aspect of different "messageboards" to, it allows to unclutter large boards that have tons of catagories, giving the admin the chance to make things look cleaner and less distracting, that is my opinion though.

I was thinking today that the mod should check if the selected theme ID is valid and replace it with 0 ("Forum or Board Default") if it is not. Your issue with category IDs strikes the same note. Actually, theme IDs and other SMF IDs as well follow the same convention as explained above. Therefore, in future versions I will add error checking regarding invalid and corrupt settings.

I think that would be a good idea, because it confused me for a few hours on why it wasn't working. So hopefully anyone else who has this problem will look at that because your explanation explains it rather well.....
------------------------------------------------------
As for the multiple profile mod, I am waiting for that one, we had talked about it in that thread and Sarge if you need help or are looking for ideas to place in it to make it function and give users things that they would need, then I am full off useless information and would be willing ot beta that and also give ideas.....

Sarge

Shared Forum Mod 0.2.2

Download it here:
http://www.albwebmaster.com/index.php?topic=6.0

Changes:
+ Fixed a search tag in modification.xml for conformance.
+ Changed "Forum Theme" into a select menu in mod's control panel.
+ Let the admin not specify a particular theme for a forum by selecting "Forum or Board Default" for a forum theme.

Now you don't have to know a theme's ID in order to set it for a forum. You can select it by name.

You can also choose "Forum or Board Default" to let SMF handle themes for users without the mod getting in the way, just like in an unmodded SMF installation. However, admins can still use their own default theme if the option "Override forum theme (admins only)" is selected.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Sarge

Shared Forum Mod 0.2.3

Download it here:
http://www.albwebmaster.com/index.php?topic=7.0

Changes:
+ Fixed moderation actions that involve 2 forums (moving and merging topics etc).

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

cody

Im having a problem, that I am not quite sure if its related to this mod or not, but I have two sites, both us SMF and TP both are on the same server, but the site that uses the SFMod anytime you go to the Show unread posts, or Show replies, or Show own posts I get The server is currently under high stress. Please try again shortly.

Any help would be greatly appreciated.  The server is not under high stress because its not happening to my other smf/tp site on the same server not to mention I am the only person on the site at the moment..

Sarge

#56
Basically, SFMod only adds the category IDs list to $user_info['query_see_board'], which specifies the list of boards that the member has permission to see (visit); it is passed to MySQL queries (hence the name query_see_board).

Here's the relevant code of SFMod:

$user_info['query_see_board'] .= ' AND FIND_IN_SET(b.ID_CAT, "' . $context['current_forum']['cat_list'] . '")';


For every board the member has access to, access is further restricted by checking whether the board is inside the categories specified for the subforum in question; if it is not, unread posts etc. will not be retrieved for those boards later in SMF code.

Although I haven't made any benchmarking, my guess is that forum speed should increase instead of decrease, since less unread posts etc. will be retrieved for a subforum from the database.

Where do you get the message "The server is currently under high stress. Please try again shortly."?

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

cody

the ?action=unread, ?action=unreadreplies, and ?action=profile;u=1;sa=showPosts pages are the ones that return that error.

Sarge

Quote from: cody on May 10, 2007, 04:33:09 PM
the ?action=unread, ?action=unreadreplies, and ?action=profile;u=1;sa=showPosts pages are the ones that return that error.

Can you post or PM me a link to your forum?

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Iomega0318

Ok so just curious will this work without TP?
I don't really want to use TP and was wondering if the errors I am getting are just because I dont have it installed? Here are the parts of code it is not finding..
<file name="$sourcedir/Load.php">
<operation>
<search position="before"><![CDATA[
        $context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => 'Forum'));
]]></search>
<add><![CDATA[
// Added by the Shared Forum Mod - SFMod.
if (!empty($context['current_forum']['page_title']))
$context['linktree'] = array(array('url' => $scripturl . '?action=' . $context['current_forum']['name'], 'name' => $context['current_forum']['page_title']));
]]></add>
</operation>
</file>

<file name="$sourcedir/Load.php">
<operation>
<search position="replace"><![CDATA[
                                'url' => $scripturl . '?action=forum#' . $board_info['cat']['id'],
]]></search>
<add><![CDATA[
                                'url' => $scripturl . '?action=' . $context['current_forum']['name'] . '#' . $board_info['cat']['id'],
]]></add>
</operation>
</file>

<file name="$themedir/index.template.php">
<operation>
<search position="replace"><![CDATA[
if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">'.$txt['tp-forum'].'</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_last">&nbsp;</td>' : '';
]]></search>
<add><![CDATA[
if($settings['TPortal_front_type']!='boardindex' && !empty($context['current_forum']['TP_show_forum_button']))
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">'.$txt['tp-forum'].'</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_last">&nbsp;</td>' : '';
]]></add>
</operation>
</file>

<file name="$themedir/index.template.php">
<operation>
<search position="replace"><![CDATA[
                                        ', theme_copyright(), ' <br />', tportal_version() , '
]]></search>
<add><![CDATA[
                                        ', theme_copyright(), ' <br />', tportal_version() , '<br />', 'Shared Forum Mod 0.2 &copy; <a href="http://www.zeriyt.com" target="_blank">Z&euml;ri YT!</a>', '
]]></add>
</operation>
</file>

And then it doesn't find TPortal.php but that's because it's not there lol
UOFreeshards.net
UOFreeshards.net 2.1 Aplha Test Site
"I believe in Christianity as I believe in the sun...
not because I see it but because by it I see everything else."
C.S. Lewis

Heed what I say, for it shall be mentioned only once.

Advertisement: