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

drhamad

Quote from: [Unknown] on July 04, 2005, 04:49:44 AM
You could do that, yes.  Another way would be to replace the ID_FORUM column with a comma separated list of columns, and use:

$user_info['query_see_board'] .= ' AND (FIND_IN_SET(' . $GLOBALS['ID_FORUM'] . ', b.showInForums) OR FIND_IN_SET(0, b.showInForums))';

But, it'd probably be simpler to stick with what you already have.

-[Unknown]


Hmm that's not a bad idea.  Could just do "1, 5" then in the database, right?
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]

Exactly.  Then again, you'd have to change all the modifications you've made so far... but really, I guess they're not that many.

-[Unknown]

drhamad

Quote from: [Unknown] on July 04, 2005, 10:18:38 PM
Exactly.  Then again, you'd have to change all the modifications you've made so far... but really, I guess they're not that many.

-[Unknown]

I haven't done any "5" modifications yet :)
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

Hmm, did I actually say that wrong?

is it in Settings.php, or in the db, that you'd do 1,5
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]

In the database, on the boards table.  There'd be a column like that.

-[Unknown]

drhamad

Alright, just went into one of my forums, did:

Find:

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


Replace with:
$user_info['query_see_board'] .= ' AND (FIND_IN_SET(' . $GLOBALS['ID_FORUM'] . ', b.showInForums) OR FIND_IN_SET(0, b.showInForums))';

Resulted in:
Quote
Unknown column 'b.showInForums' in 'where clause'
File: /home/mspeed/public_html/Sources/BoardIndex.php
Line: 83


Note:
This is without doing any comma stuff - no database changes were made at all.
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]

Well, I meant you'd have to create a "showInForums" column on the boards table, e.g.:

ALTER TABLE boards
ADD COLUMN showInForums tinytext NOT NULL default '0';

-[Unknown]

drhamad

Ahhhhhh.  Sorry, sometimes I need some hand holding ;)  For some reason I was thinking that was an already existing variable.

For some reason I was thinking I'd be able to do it in ID_FORUM

So now there'd be an ID_FORUM column, and a showInForums column.  Post count would still be based off of ID_FORUM of the board.

Now, this may be a stupid question, but wouldn't having the 2 variables conflict?  What happens if ID_FORUM is 1 and showInForums is 2? Or (more likely) 0?
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]

Well, that's what I meant by:

Quote from: [Unknown] on July 04, 2005, 10:18:38 PM
Exactly.  Then again, you'd have to change all the modifications you've made so far... but really, I guess they're not that many.

The way I would do it, myself, would be to remove the ID_FORUM column and use this new column instead...

-[Unknown]

drhamad

Ahhhhh
I was thinking you meant any ID_FORUM=5 stuff I'd already done.

So if I'm reading this correctly then, doing what you just said would ignore the ID_FORUM value in the database entirely (in other words, just delete the column), and use Settings.php ID_FORUM=X to determine what the ID of the forum whole is, and if it matches up with one of the values in showInForum.  Post Count with then be based off of... what?  The Settings.php ID_FORUM?


Quote from: [Unknown] on July 06, 2005, 02:16:52 AM
Well, that's what I meant by:

Quote from: [Unknown] on July 04, 2005, 10:18:38 PM
Exactly.  Then again, you'd have to change all the modifications you've made so far... but really, I guess they're not that many.

The way I would do it, myself, would be to remove the ID_FORUM column and use this new column instead...

-[Unknown]
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

Alright, so I'm going with something slightly different... having a problem though.

I ended up adding a new variable, ID_MULTI_FORUM, also tinyint.
I then added $ID_MULTI_FORUM = 1 to settings.php (where ID_FORUM is also 1).

Now, what I want to happen is for, if EITHER ID_FORUM or ID_MULTI_FORUM = 1  in smf_boards, that board shows.

I tried a couple different methods of adding ID_MULTI_FORUM to:
$user_info['query_see_board'] .= ' AND b.ID_FORUM IN (0, ' . $GLOBALS['ID_FORUM'] . ')'; (in Load.php)
Had the same problem every time though - a line 83 boardindex.php cat_id error.  Any ideas as to how I should properly add id_multi_forum to Load.php?
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

I correct myself... now with one way of doing it, I get no boards (but no errors) and with the other, I'm getting way too many / no organization ;)
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]

Right.  So ID_FORUM would be the "active" forum, and the first ID_FORUM in the showInForums list would be the "primary" one I guess.

It's complicated too.

-[Unknown]

drhamad

Having a bit of a problem with a couple of boards I just made:
http://www.mazdaspeeders.com/index.php?board=923.0

I can't move the topics that are in that board, to the child boards.  It doesn't give me the option of moving to those boards - though it lists nearly everything else on that site.
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]

How exactly did you modify the move code?

-[Unknown]

drhamad

Alright, I figured it out.  It was there.  What the issue was that when you're moving something from a parent board to a child board (or, in general, when you're moving something) it does not show as an option the board you're currently in.  What this meant is that the child boards blended with the child boards of the board above it, so I didn't notice.

For example,

actual structure:
-board1
--board1.1
--board1.2
--board1.3
-board2
--board2.1
--board2.2

What it looked like:
-board1
--board1.1
--board1.2
--board1.3
--board2.1
--board2.2


And of course, with real board names it blended even more, since it was just things like "technical discussion".
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

Using your array method of choosing which forums a board is displayed on, you still need to have the id_forum column obviously.  But would there be a way from which it can determine what post count column to add to by looking at what is in Settings.php, rather than assigned to the board?  In other words, if people post from site A, I want the pc recorded on the site A pc.  This of course always happens if a board is only assigned to that one id_forum, but if it has multiple, you still have to assign only one site to get pc from - I want a post from site A to always be recorded for site A's pc.

Understand what I'm getting at?

Any way to do it?
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 August 12, 2005, 11:17:24 AM
Using your array method of choosing which forums a board is displayed on, you still need to have the id_forum column obviously.  But would there be a way from which it can determine what post count column to add to by looking at what is in Settings.php, rather than assigned to the board?

I think I understand.  The way I was thinking was just to use the first id in the list - for example, if you have "1,2,3" then "1" would be the primary one, which gets the post count.  If it were "2,1,3" then it would be "2".... no?

-[Unknown]

drhamad

So, after using this for some time, this is one MAJOR... disadvantage (I hesitate to use the word "problem," because it is not a dehabilitating issue on the forum)... to using it - Google seems to see all the sites, despite the differing domains, as one.  All the sites are showing up as mazda3forums.com, which is killing my ability to get people to the others (especially FordFusionClub.com, which has been around a while, but is barely even recognized by Google).  I don't know what to do about it :(
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

Elmacik

Any updates on this?
We can share the tables but counting totals is not done automatically... What should we do?
Home of Elmacik

Advertisement: