News:

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

Main Menu

Multiple Boards (again)

Started by drhamad, December 10, 2004, 03:07:59 AM

Previous topic - Next topic

[Unknown]

I really suggest you send an email or pm to Compuart, referencing this topic, because he may be able to give you the code he was working on.  It used just the one set of tables, and added an ID_FORUM column to boards, if I remember right.

-[Unknown]

drhamad

Quote from: [Unknown] on December 17, 2004, 02:48:08 PM
I really suggest you send an email or pm to Compuart, referencing this topic, because he may be able to give you the code he was working on.  It used just the one set of tables, and added an ID_FORUM column to boards, if I remember right.

-[Unknown]

Interesting.  I will PM him now.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

drhamad

Not to get off topic, but I'm going to get off topic ;)

Does this board have an announcement function?  That is, post a message and set it as announcement and it appears at the very top above the forums?

(Ex on Mazda3Forums.com: "ATTENTION: People who CANNOT Log In  " thread is shown right on top, right on the root level of the forum (and is actually posted in the bottom most section of the forum).

I see an announcement function when you're posting a new topic, but it doesn't seem to do that... I'm not sure what it does do.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

Peter Duggan

Quote from: drhamad on December 17, 2004, 04:43:12 PM
I see an announcement function when you're posting a new topic, but it doesn't seem to do that... I'm not sure what it does do.

It sends a notification email to members who have agreed to receive emails.

NB You can also set up announcement boards where that always happens.

[Unknown]

No, not in the sense you're talking of.  Like I said, the news is very often used for just this - in fact, there's a news fader too.

-[Unknown]

drhamad

Quote from: [Unknown] on December 17, 2004, 11:38:52 PM
No, not in the sense you're talking of.  Like I said, the news is very often used for just this - in fact, there's a news fader too.

-[Unknown]

Yeah the news is a good thing.  The problem is that people can't reply to that.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

[Unknown]

Quote from: drhamad on December 18, 2004, 01:56:40 AM
Yeah the news is a good thing.  The problem is that people can't reply to that.

Well, as I said above (again) if you put a link like this:



This is some news....



At the end or whatever, said restriction is quickly limited, no?  But, I'm just saying that this is a common way the same functionality is achieved without such a modification; adding "announcements" isn't that difficult, depending on how you want them implemented.

-[Unknown]

drhamad

is that "reply" button able to be put in the news menu?
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

[Unknown]

Quote from: drhamad on December 19, 2004, 02:55:26 AM
is that "reply" button able to be put in the news menu?

Of course.  You can use bbc ([ url=http://domain/path/to/smf/index.php?action=post;topic=### ][ img ]http://domain/path/to/reply.gif[ /img ][ /url ]) as I did above, or even just plain html ;).

-[Unknown]

drhamad

Quote from: [Unknown] on December 19, 2004, 02:58:31 AM
Quote from: drhamad on December 19, 2004, 02:55:26 AM
is that "reply" button able to be put in the news menu?

Of course.  You can use bbc ([ url=http://domain/path/to/smf/index.php?action=post;topic=### ][ img ]http://domain/path/to/reply.gif[ /img ][ /url ]) as I did above, or even just plain html ;).

-[Unknown]

Hmm... doesn't seem to work for me.  If you check out the "news box" on http://smftest.fmvperformance.com you can see my attempts to use both bb code and html (though both look weird... they don't include code that I've used and they do include code I didn't use).

Forgive me if we're getting too off topic here... I'd be happy to repost in a different section if preferred.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

[Unknown]

Please don't set "break long words" to anything less than 50.  Personally I recommend it off (0).

-[Unknown]

drhamad

#31
Ya know, I just realized you meant add the reply button below the news, right?  Not in it.  (hits self on head)

Edit:
OK ignore this post, I'm an idiot.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

drhamad

#32
I haven't heard back from compuart yet, but on the tables-method front... any idea what the equivalent of constants.php in phpbb2 is for SMF?
(the table names)

Quote
// Table names
define('AUTH_ACCESS_TABLE', $table_prefix.'auth_access');
define('BANLIST_TABLE', 'banlist');
define('CATEGORIES_TABLE', $table_prefix.'categories');
define('CONFIG_TABLE', $table_prefix.'config');
define('DISALLOW_TABLE', 'disallow');
define('FORUMS_TABLE', $table_prefix.'forums');
define('GROUPS_TABLE', 'groups');
define('POSTS_TABLE', $table_prefix.'posts');
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
define('PRIVMSGS_TABLE', 'privmsgs');
define('PRIVMSGS_TEXT_TABLE', 'privmsgs_text');
define('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');
define('PRUNE_TABLE', $table_prefix.'forum_prune');
define('RANKS_TABLE', 'ranks');
etc
etc
etc

On another of my random subjects also though, I can't for the life of me figure out how to replace rank banners?  (the star graphics)
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

Peter Duggan

Quote from: drhamad on December 20, 2004, 08:36:02 PM
On another of my random subjects also though, I can't for the life of me figure out how to replace rank banners?  (the star graphics)

Edit Membergroups -> (Group Name) -> Modify.

drhamad

Quote from: Peter Duggan on December 20, 2004, 08:43:13 PM
Quote from: drhamad on December 20, 2004, 08:36:02 PM
On another of my random subjects also though, I can't for the life of me figure out how to replace rank banners?  (the star graphics)

Edit Membergroups -> (Group Name) -> Modify.

OK you're right ;)  I'd been screwing up the URL.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

[Unknown]

SMF doesn't use constants for every table name, but there is a mod to do so.

http://www.simplemachines.org/community/index.php?topic=19045.0

It's meant to share the tables between two forums, but that's essentially what you're planning to do.  However, the way I would do it is essentially this: (requires admin ui work...)

ALTER TABLE smf_boards
ADD ID_FORUM tinyint(4) unsigned NOT NULL default 0;

And then add in the Settings.php for each forum:

$ID_FORUM = 1;

(change the 1 to 2, 3, 4, etc. for each forum..)

Next, edit Load.php... find this:
// Just build this here, it makes it easier to change/use.
if ($user_info['is_guest'])
$user_info['query_see_board'] = 'FIND_IN_SET(-1, b.memberGroups)';
// Administrators can see all boards.
elseif ($user_info['is_admin'])
$user_info['query_see_board'] = '1';
// Registered user.... just the groups in $user_info['groups'].
else
$user_info['query_see_board'] = '(FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroups))';


Add after it:
$user_info['query_see_board'] .= ' AND b.ID_FORUM IN (0, ' . $GLOBALS['ID_FORUM'] . ')';

Bam.  Done.  All you do now is set the ID_FORUM's for the boards in question - but, without modifications to ManageBoards.php you'd have to do this with phpMyAdmin... where 0 would be "all" and "1" would be forum #1 only.

The next complication is posts.  So:

ALTER TABLE smf_members
ADD posts1 smallint(5) unsigned NOT NULL default 0,
ADD posts2 smallint(5) unsigned NOT NULL default 0;

And so on for each forum.  Now, in Post.php:
updateMemberData($ID_MEMBER, array('posts' => 'posts + 1'));

Replace:
updateMemberData($ID_MEMBER, array('posts' => 'posts + 1', 'posts' . $GLOBALS['ID_FORUM'] => 'posts' . $GLOBALS['ID_FORUM'] . ' + 1'));

Now, you have to be able to access said post count... so, in Load.php, find this:
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature,

Replace it (twice) with:
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature, mem.posts1, mem.posts2,

Again, add more if you want more forums.  Now, find this:
'location' => &$profile['location'],

Add after:
'posts1' => &$profile['posts1'],

Rinse and repeat, once again.... then you have to edit Display.template.php, using $message['member']['posts1'], etc.

-[Unknown]

drhamad

You have been a great help sir.  I will look into this.  Our SMF tests are coming along quite well so far.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

drhamad

#37
Alright now a couple questions about that method come to mind (I just input all the changes into the files... haven't put them online yet though)

QuoteBam.  Done.  All you do now is set the ID_FORUM's for the boards in question - but, without modifications to ManageBoards.php you'd have to do this with phpMyAdmin... where 0 would be "all" and "1" would be forum #1 only.
I'm confused as to what you're saying here.  What would need to be done in phpmyadmin (which is fine, I know how to use it relatively well, I just don't understand what needs to be done).

And the second question is... how do I move the existing posts to the correct board?  I'd need some sort of sql command to add id_forum=1 to each of one forums table of posts, id_forum=2 for another, right?  In addition, I'd need to combine the individual post tables (since right now each forum stores in a seperately prefixed table) into one.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

drhamad

Merry Christmas to all, esp those who have helped me out so far.

For christmas I got slammed by the PHP virus (I was still running phpBB 2.0.5 on my server) and have been programming in php for 5 hours straight.

SMF, I assume, does not have this problem? :)
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

Jerry

not really unless some one on the server has phpBB installed, it takes out most php files on the server :P So SMF gets problems from phpBB with this worm ;)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Advertisement: