Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.
Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

Community



Donate

Donate for PortaMx !
Your donation is safe and helps support the issues and causes you care most about.

Stats

  • *Total Members: 4339
  • *Latest: AJ

  • *Total Posts: 15834
  • *Total Topics: 2396
  • *Online Today: 5
  • *Most Online: 157
(27.08.09, 03:54:53)
  • *Users: 1
  • *Guests: 4
  • *Total: 5

Author Topic: Order of forums on subforums categories...  (Read 3844 times)

0 Members and 0 Guests are viewing this topic.

Offline luuuciano

  • Jr. Member
  • **
  • Posts: 85
  • Gender: Male
Order of forums on subforums categories...
« on: 13.03.12, 23:40:53 »
It looks like forums are ordered by forum ID ascending?

There is no way to change that? to make them use the order used on the SMF forum setup, for example?

(to order them by "hand")

Online feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5615
  • Gender: Female
Re: Order of forums on subforums categories...
« Reply #1 on: 14.03.12, 13:39:08 »
SubForums do nothing about sorting any content, categories or board.
The one and only what we do is to manipulate the SFM db queries like:
WHERE id_cat IN (list of cat id's)
or
WHERE id_board IN (list of board id's)
We don't modify the order of any.
Many are stubborn in relation to the path, a few in relation to the target.

Offline luuuciano

  • Jr. Member
  • **
  • Posts: 85
  • Gender: Male
Re: Order of forums on subforums categories...
« Reply #2 on: 14.03.12, 14:31:11 »
Mmmmm, but something is happening... look at this screenshot, it shows 1 category on public boardindex:



And this one, showing the smf forum admin of that category (look at the "hand ordering")



Online feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5615
  • Gender: Female
Re: Order of forums on subforums categories...
« Reply #3 on: 14.03.12, 21:51:56 »
Yeah .. I see that also on my test sytem .. Hmm .. I have to check that, stand by
Many are stubborn in relation to the path, a few in relation to the target.

Online feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5615
  • Gender: Female
Re: Order of forums on subforums categories...
« Reply #4 on: 14.03.12, 22:35:04 »
Well .. I found the problem and have a Fix  :)

In the file Sources/Subs-BoardIndex.php find (~ line 64)
Code: [Select]
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
AND b.child_level >= {int:child_level}') : '
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)),
array(
'current_member' => $user_info['id'],
'child_level' => $boardIndexOptions['base_level'],
'blank_string' => '',
)

Replace with:
Code: [Select]
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
AND b.child_level >= {int:child_level}') : '
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)) .'
'. (isset($modSettings['subforums'][$_SERVER['SERVER_NAME']]) ? 'ORDER BY b.board_order' : ''),
array(
'current_member' => $user_info['id'],
'child_level' => $boardIndexOptions['base_level'],
'blank_string' => '',
)
Now the board oder is correct ...
Many are stubborn in relation to the path, a few in relation to the target.

Offline luuuciano

  • Jr. Member
  • **
  • Posts: 85
  • Gender: Male
Re: Order of forums on subforums categories...
« Reply #5 on: 14.03.12, 22:54:09 »
Now the board oder is correct ...

As usual.... amazing! :)

\o/

Offline MiY4Gi

  • Innovator
  • Jr. Member
  • **
  • Posts: 64
  • Gender: Male
  • I bleed enthusiasm!
    • MyAnimeClub
Re: Order of forums on subforums categories...
« Reply #6 on: 11.08.12, 01:17:22 »
Great stuff. I just noticed this problem (i.e. categories in wrong order) on my my two subforums, but this fix worked perfectly.
Check out my new anime club. Discuss and share anime, or just fool around with other forumites. Join us at MyAnimeClub.