Advertisement:

Author Topic: Request for "category" view  (Read 11297 times)

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Request for "category" view
« on: November 11, 2004, 08:02:50 PM »
When I at the first time tried to navigate through the linktree, I thought that clicking on category (now, for example, it says "... | SMF Support | ...") opens a page with the category view - to show all boards and sub-boards it that category. But no, it doesn't. Instead of it, I am taken to the forum Index...

When there are many sub-boards in a few boards belonging to one category, and there are two or more different categories, it becomes very hard to navigate, to track and see all the latest posts in one particular category.

So why not make a category view, to display only:
 - its boards with their info and last post links;
 - their subboards with their info and last post links;
 - 5 (or how much you'll select) latest 'ssi_recentTopics' or 'ssi_recentPosts' (selectable), applied to this particular category.

I've handycrafted an image to show you an example of what I mean: see attachment
(2 moderators: please attach it to this post it as it won't last long there - site is moving in a few days)

It would be also nice to allow applying of SMF themes to category view. So if you have a big community with different categories (from "website one", "site two" and so on), you would not only ease the pointing of users to their boards, but also give them the feeling of staying on their site by making similar forum-styles.

What do you think about it? Comments are highly appreciated.

Edit: Image attached - Oldiesmann
Etit2: Thank you! - Vedm
« Last Edit: November 12, 2004, 06:04:04 PM by Vedm »
My Forum runs under SMF 1.0 RC1

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,817
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Request for "category" view
« Reply #1 on: November 12, 2004, 01:08:00 PM »
When I at the first time tried to navigate through the linktree, I thought that clicking on category (now, for example, it says "... | SMF Support | ...") opens a page with the category view - to show all boards and sub-boards it that category. But no, it doesn't. Instead of it, I am taken to the forum Index...

When there are many sub-boards in a few boards belonging to one category, and there are two or more different categories, it becomes very hard to navigate, to track and see all the latest posts in one particular category.

So why not make a category view, to display only:
 - its boards with their info and last post links;
 - their subboards with their info and last post links;
 - 5 (or how much you'll select) latest 'ssi_recentTopics' or 'ssi_recentPosts' (selectable), applied to this particular category.

I've handycrafted an image to show you an example of what I mean: here
(2 moderators: please attach it to this post it as it won't last long there - site is moving in a few days)

It would be also nice to allow applying of SMF themes to category view. So if you have a big community with different categories (from "website one", "site two" and so on), you would not only ease the pointing of users to their boards, but also give them the feeling of staying on their site by making similar forum-styles.

What do you think about it? Comments are highly appreciated.

I don't think it needs to show all the childboards like that - just a snapshot of the category as it looks on the board index without all the other categories and stuff. Otherwise it's a great idea.
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline OvermindDL1

  • Jr. Member
  • **
  • Posts: 279
  • Gender: Male
    • OvermindDL1's Website
Re: Request for "category" view
« Reply #2 on: November 12, 2004, 04:19:56 PM »
It looks nice, but it looks like a theme mod to me....

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,817
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Request for "category" view
« Reply #3 on: November 12, 2004, 05:10:42 PM »
This would require more than a theme mod. That's just an example of what it would be like.
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,817
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Request for "category" view
« Reply #4 on: November 12, 2004, 05:33:43 PM »
Try this and see if it works:

Sources/BoardIndex.php

Find
Code: [Select]
// Find all boards and categories, as well as related information.
$result_boards = db_query("
SELECT
c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.description,
b.numPosts, b.numTopics, b.ID_PARENT,
IFNULL(mem.memberName, m.posterName) AS posterName, m.posterTime, m.subject, m.ID_TOPIC,
IFNULL(mem.realName, m.posterName) AS realName," . (!$user_info['is_guest'] ? "
(IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isRead, c.canCollapse,
IFNULL(cc.ID_MEMBER, 0) AS isCollapsed" : ' 1 AS isRead') . ",
IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, m.ID_MSG,
IFNULL(mem2.ID_MEMBER, 0) AS ID_MODERATOR, mem2.realName AS modRealName
FROM {$db_prefix}categories AS c, {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = b.ID_LAST_MSG)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}collapsed_categories AS cc ON (cc.ID_CAT = c.ID_CAT AND cc.ID_MEMBER = $ID_MEMBER)" : '') . "
LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD)
LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = mods.ID_MEMBER)
WHERE $user_info[query_see_board]
AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1
ORDER BY c.catOrder, b.childLevel, b.boardOrder", __FILE__, __LINE__);

Replace
Code: [Select]
// Find all boards and categories, as well as related information.
$result_boards = db_query("
SELECT
c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.description,
b.numPosts, b.numTopics, b.ID_PARENT,
IFNULL(mem.memberName, m.posterName) AS posterName, m.posterTime, m.subject, m.ID_TOPIC,
IFNULL(mem.realName, m.posterName) AS realName," . (!$user_info['is_guest'] ? "
(IFNULL(lb.logTime, 0) >= b.lastUpdated) AS isRead, c.canCollapse,
IFNULL(cc.ID_MEMBER, 0) AS isCollapsed" : ' 1 AS isRead') . ",
IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, m.ID_MSG,
IFNULL(mem2.ID_MEMBER, 0) AS ID_MODERATOR, mem2.realName AS modRealName
FROM {$db_prefix}categories AS c, {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = b.ID_LAST_MSG)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}collapsed_categories AS cc ON (cc.ID_CAT = c.ID_CAT AND cc.ID_MEMBER = $ID_MEMBER)" : '') . "
LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD)
LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = mods.ID_MEMBER)
WHERE $user_info[query_see_board]
" . (isset($_REQUEST['cat']) ? " AND c.ID_CAT = $_REQUEST[id_cat]" : '') . "
AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1
ORDER BY c.catOrder, b.childLevel, b.boardOrder", __FILE__, __LINE__);

Find
Code: [Select]
// Haven't set this category yet.
if (empty($context['categories'][$row_board['ID_CAT']]))
{
$context['categories'][$row_board['ID_CAT']] = array(
'id' => $row_board['ID_CAT'],
'name' => $row_board['catName'],
'is_collapsed' => isset($row_board['canCollapse']) && $row_board['canCollapse'] == 1 && $row_board['isCollapsed'] > 0,
'can_collapse' => isset($row_board['canCollapse']) && $row_board['canCollapse'] == 1,
'collapse_href' => isset($row_board['canCollapse']) ? $scripturl . '?action=collapse;c=' . $row_board['ID_CAT'] . ';sa=' . ($row_board['isCollapsed'] > 0 ? 'expand' : 'collapse;') . '#' . $row_board['ID_CAT'] : '',
'collapse_image' => isset($row_board['canCollapse']) ? '<img src="' . $settings['images_url'] . '/' . ($row_board['isCollapsed'] > 0 ? 'expand.gif" alt="+"' : 'collapse.gif" alt="-"') . ' border="0" />' : '',
'href' => $scripturl . '#' . $row_board['ID_CAT'],
'boards' => array(),
'new' => false
);
$context['categories'][$row_board['ID_CAT']]['link'] = '<a name="' . $row_board['ID_CAT'] . '" href="' . (isset($row_board['canCollapse']) ? $context['categories'][$row_board['ID_CAT']]['collapse_href'] : $context['categories'][$row_board['ID_CAT']]['href']) . '">' . $row_board['catName'] . '</a>';
}

Replace
Code: [Select]
// Haven't set this category yet.
if (empty($context['categories'][$row_board['ID_CAT']]))
{
$context['categories'][$row_board['ID_CAT']] = array(
'id' => $row_board['ID_CAT'],
'name' => $row_board['catName'],
'is_collapsed' => isset($row_board['canCollapse']) && $row_board['canCollapse'] == 1 && $row_board['isCollapsed'] > 0,
'can_collapse' => isset($row_board['canCollapse']) && $row_board['canCollapse'] == 1,
'collapse_href' => isset($row_board['canCollapse']) ? $scripturl . '?action=collapse;c=' . $row_board['ID_CAT'] . ';sa=' . ($row_board['isCollapsed'] > 0 ? 'expand' : 'collapse;') . '#' . $row_board['ID_CAT'] : '',
'collapse_image' => isset($row_board['canCollapse']) ? '<img src="' . $settings['images_url'] . '/' . ($row_board['isCollapsed'] > 0 ? 'expand.gif" alt="+"' : 'collapse.gif" alt="-"') . ' border="0" />' : '',
'href' => $scripturl . '?cat=' . $row_board['ID_CAT'],
'boards' => array(),
'new' => false
);
$context['categories'][$row_board['ID_CAT']]['link'] = '<a href="' . (isset($row_board['canCollapse']) ? $context['categories'][$row_board['ID_CAT']]['collapse_href'] : $context['categories'][$row_board['ID_CAT']]['href']) . '">' . $row_board['catName'] . '</a>';
}

Themes/default/MessageIndex.template.php

Find
Code: [Select]
// Show the category name with a link to the category. (index.php#id)
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="#', $category['id'], '">', $category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>';

Replace
Code: [Select]
// Show the category name with a link to the category. (index.php#id)
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="?cat=', $category['id'], '">', $category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>';

That should work, but let me know if it doesn't.
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Re: Request for "category" view
« Reply #5 on: November 12, 2004, 05:58:26 PM »
2 Oldiesmann:
Thanks, glad you like this idea! But why do you think childboard descriptions and their last post info are exessive (sorry if it doesn't sound well, don't know exactly how to say "not neccesary but existing" in right words)?
I think they would become very useful for the most part of 'category view' users.

2 OvermindDL1:
I hope this deserves to become more then just a mod. ;)
« Last Edit: November 12, 2004, 06:01:29 PM by Vedm »
My Forum runs under SMF 1.0 RC1

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,817
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Request for "category" view
« Reply #6 on: November 12, 2004, 06:28:12 PM »
I don't really see any need for viewing child boards and their descriptions in the category view. Category view is meant to display the main boards within the category. You can click on a board title to see child boards and descriptions.
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Re: Request for "category" view
« Reply #7 on: November 12, 2004, 06:45:19 PM »
Category view is meant to display the main boards within the category. You can click on a board title to see child boards and descriptions.

Why click once more, if you can (in what I suggest) just take a look? :)
My Forum runs under SMF 1.0 RC1

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,817
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Request for "category" view
« Reply #8 on: November 12, 2004, 07:00:31 PM »
Because otherwise you have a bunch of additional template work to do. It's a lot simpler to do it this way.

* Oldiesmann goes back to sprucing this up to turn it into a mod
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline David

  • Destroyer Dave
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,928
  • Gender: Male
    • David Recordon
Re: Request for "category" view
« Reply #9 on: November 12, 2004, 07:57:45 PM »
I really like how SMF does it compared to vB.  In vB, it does what you suggest.  Show you just the boards in that one category.  I normally find myself doing this by accident, and then navigating back to the board index is harder.  Rather by using anchors on the boardindex so you see the category it keeps navigation simplified.
This space for rent.

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Re: Request for "category" view
« Reply #10 on: November 13, 2004, 11:53:20 AM »
2 Oldiesmann:
Check this out:
http://eglador.info/forum/index.php?cat=2

I'm getting following errors:
Quote
Notice: Undefined index: id_cat in /opt/hosting/eglador.info/html/forum/Sources/BoardIndex.php on line 81
Quote
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1
ORDER BY c.ca
File: /opt/hosting/eglador.info/html/forum/Sources/BoardIndex.php
Row: 84
SMF version - 1.0 RC1, maybe that's what is causing the problem?

Because otherwise you have a bunch of additional template work to do. It's a lot simpler to do it this way.
Maybe when it writes "Child Boards: list", just replace this with inserting table of childboards (from board index)? This should be simple in coding.
(example of what I mean)

2 David: it should't be harder to navigate to Index - you have linktree and "Home" button. Maybe you get confused in vB just because you got used to how it's in SMF?
My Forum runs under SMF 1.0 RC1

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,817
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Request for "category" view
« Reply #11 on: November 13, 2004, 12:04:46 PM »
Sorry about that. Find where it says $_REQUEST[id_cat] in Boardindex.php and change that to $_REQUEST[cat]

As for the childboard display - I guess that could be done, but the point is it's ugly and takes up a ton of space. What happens if you have 4 or 5 child boards someplace or a child board has child boards?
« Last Edit: November 13, 2004, 12:07:35 PM by Oldiesmann »
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Re: Request for "category" view
« Reply #12 on: November 13, 2004, 12:35:20 PM »
Aw, nice, now it's working! Thank you very much.

Yes, Oldiesmann, you are right, this way of inserting subboards is uglier. If the first offered way is much harder to code - okay, let's stay without it.

So, in the manner you've done it, this view is still without 'ssi_recentPosts' applied to particular category, and it cannot be themed personally. Just a little modded Index page. For this grade of modding it would be easier to just autocollapse other categories by clicking on selected category. It is the way it's done in phpBB.
My Forum runs under SMF 1.0 RC1

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,817
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Request for "category" view
« Reply #13 on: November 13, 2004, 01:02:58 PM »
Yes, it's just a modified index. Why does it have to be more than that? As far as recent posts goes:

Sources/Recent.php

Find
Code: [Select]
// Find all the posts.  Newer ones will have higher IDs.  (assuming the last 4 * number are accessable...)
$request = db_query("
SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG,
IFNULL(mem.realName, m.posterName) AS posterName, t.ID_BOARD, b.name AS bName,
m.body, m.smileysEnabled
FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 4 * $showlatestcount) . "
AND t.ID_TOPIC = m.ID_TOPIC
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $showlatestcount", __FILE__, __LINE__);

Replace
Code: [Select]
// Find all the posts.  Newer ones will have higher IDs.  (assuming the last 4 * number are accessable...)
$request = db_query("
SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG,
IFNULL(mem.realName, m.posterName) AS posterName, t.ID_BOARD, b.name AS bName,
m.body, m.smileysEnabled
FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 4 * $showlatestcount) . "
AND t.ID_TOPIC = m.ID_TOPIC
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
" . isset($_REQUEST['cat']) ? "AND b.ID_CAT = $_REQUEST[cat]" : '' . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $showlatestcount", __FILE__, __LINE__);

That will change the functionality of the "most recent posts" thing on the board index to only show the latest posts from a certain category if you're viewing a category.

Auto-collapsing - what's wrong with this method? It works just as well doesn't it?

Themeing - why do you need to be able to theme this particular section? It just displays the category the exact same way it does on the board index. I don't see any reason in making this more complicated than it needs to bee.
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Re: Request for "category" view
« Reply #14 on: November 13, 2004, 01:55:50 PM »
http://www.phpbb.com/phpBB/ - try clicking on categories' names. You'll see what it does. :)
That would also be the solution to the confusing of 'category view' accident users - what David mentioned above.

About 'themeing' the caterories: that's what I suggested in my first message:
It would be also nice to allow applying of SMF themes to category view. So if you have a big community with different categories (from "website one", "site two" and so on), you would not only ease the pointing of users to their boards, but also give them the feeling of staying on their site by making similar forum-styles.


When I apply your code for Recent.php, I get the following error:
Quote
Notice: Undefined index: cat in /opt/hosting/eglador.info/html/forum/Sources/Recent.php on line 98

That 'line 98' contains 13'th row from your code:
Quote
         " . isset($_REQUEST['cat']) ? "AND b.ID_CAT = $_REQUEST[cat]" : '' . "


Edit: added somewhat deeper explanations
« Last Edit: November 13, 2004, 02:50:32 PM by Vedm »
My Forum runs under SMF 1.0 RC1

Offline morph

  • Sr. Member
  • ****
  • Posts: 921
  • Gender: Male
  • return $personaltext;
    • CRASHrobotics
Re: Request for "category" view
« Reply #15 on: November 13, 2004, 01:58:51 PM »
Code: [Select]
" . isset($_REQUEST['cat']) ? "AND b.ID_CAT = $_REQUEST[cat]" : '' . "
Try changing that to:
Code: [Select]
" . isset($_REQUEST[cat]) ? "AND b.ID_CAT = $_REQUEST[cat]" : "" . "

Coming soon!

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Re: Request for "category" view
« Reply #16 on: November 13, 2004, 02:57:17 PM »
Already tried that. Also produces errors:
Quote
Notice: Use of undefined constant cat - assumed 'cat' in /opt/hosting/eglador.info/html/forum/Sources/Recent.php on line 98

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND b.ID_CAT = 2' at line 1
File: /forum/Sources/Recent.php
Line: 101

2 Oldiesmann:
Please note I've added some explanations to my previous message here.
My Forum runs under SMF 1.0 RC1

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Re: Request for "category" view
« Reply #17 on: November 13, 2004, 07:43:36 PM »
Oldiesmann, looking at your code once again, I rememered how you've made it for Sources/BoardIndex.php
Compare
Code: [Select]
" . isset($_REQUEST['cat']) ? "AND b.ID_CAT = $_REQUEST[cat]" : '' . "with
Code: [Select]
" . (isset($_REQUEST['cat']) ? " AND b.ID_CAT = $_REQUEST[cat]" : '') . "Second one works! :)

But look here - there are only two last messages, why?
And four in here...
How can I set the quantity of 'recent posts' to display?
« Last Edit: November 13, 2004, 07:49:07 PM by Vedm »
My Forum runs under SMF 1.0 RC1

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Request for "category" view
« Reply #18 on: November 14, 2004, 04:31:26 AM »
I really like how SMF does it compared to vB.  In vB, it does what you suggest.  Show you just the boards in that one category.  I normally find myself doing this by accident, and then navigating back to the board index is harder.  Rather by using anchors on the boardindex so you see the category it keeps navigation simplified.

Completely and totally agreed.  I have always hated this other method - for example, I might go "crawling" down the board index... how can I do this if clicking a category name (which I will often do to go to the next board down on the list, possibly in the next category) when it takes me to a mini-page?

Forgive me, but I would like to think I post and read a lot here.  And, by virtue of that, I have seen a lot of what makes navigation difficult and easy.  I really don't think your proposal would make navigation easier - except when you're so used to it happening that you expect it.  However, it really isn't the most LOGICAL way, it's just the most vBulletin/Invision/phpBB way.

It is an error in logical judgement to assume that just because everyone does it, it is the best way.  While this is often true, too many people take it as fact that "many doing stupid" leads to "stupid is best way".  This is another reason I don't like arguments that reference other software - it stands moot to me.  I'm saying this so you don't respond saying, "well they do it so it must be better navigation!"

The way of calculating recent posts is limited to only the most recent X posts.  This is logical anyway, because if they are old... they are not recent.  A week old post is not recent, is it?  You're just saying it is because you want 5 posts there - but that's again not the logical purpose of the feature.  Off my tangent, you'll have to increase that limit for your way to work properly.  But, this will make your forum slower, obviously.

-[Unknown]

Offline Vedm

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
    • LiveJournal (in Russian)
Re: Request for "category" view
« Reply #19 on: November 14, 2004, 09:13:11 PM »
[Unknown], I must reveal the truth: SMF is the second forum system I'm administrating. :D First was YaBB SE. I wasn't used to using any kind of such software - never liked empty chatting. :)

It started in August - when friend of mine who owned an RPG forum asked me to look after it. And I had a plenty of free time and wanted to learn new... So I discovered YaBB SE project has stopped and SMF is stated as a replacement. For the person with lack of appropriate 'web' knowledge (I'm a systems engineer, projecting and building workstations & entry level servers is my bread for breakfast) I moved REALLY fast, in just one night - and I wish to thank you for that.

When the domain/forum owner phoned me and asked if we can merge the forum with another one, I started learning phpBB and also vB (the only system allowing merging of different forums into it).

And while I got myself confused with SMF linktree - since first window-based OS I got used to the Explorer kind of tree browsing (you click subfolder - you're transferred into it) - I looked at how everything is made in other systems. And found the phpBB way of browsing and switching categories interesting. Then I thought - if you combine applying of 'recent posts' to the category with phpBB 'collapse-other-categories' feature - it could be great for big boards.

Please forgive me if I'm wrong. There's an old saying: "Sometimes unsophisticated sight is more sharp" - maybe in this case it isn't. :-\
My Forum runs under SMF 1.0 RC1