Advertisement:

Author Topic: Favourite (Favorite) Boards [UPDATED FOR RC3]  (Read 9934 times)

Offline Lordmiller

  • Semi-Newbie
  • *
  • Posts: 75
Re: Favourite (Favorite) Boards [UPDATED FOR RC3]
« Reply #80 on: July 21, 2010, 08:16:57 AM »
Mod is working nicely, but having one issue (2.0 RC 3, default installed theme)

On the top title bar of every category, on the right side, is a button "Unread Posts" that shows you all the unread posts of that category. if you click on that button for the "My Favorite Boards" category, you get this error:

An Error Has Occurred!
No valid boards were selected!

Offline poser3dart

  • Newbie
  • *
  • Posts: 9
Re: Favourite (Favorite) Boards [UPDATED FOR RC3]
« Reply #81 on: September 15, 2010, 10:41:30 PM »
Mod is working nicely, but having one issue (2.0 RC 3, default installed theme)

On the top title bar of every category, on the right side, is a button "Unread Posts" that shows you all the unread posts of that category. if you click on that button for the "My Favorite Boards" category, you get this error:

An Error Has Occurred!
No valid boards were selected!

I am having the same problem ( smf 2.0 rc3 core ) except for the error.  Shows in the Category lines as " shrink " "Unread Post"  " Category name".
If I add a fav board the "Unread Post" shows like above on it as well.  When you click on "Unread Post" in my case it shows the unread post in the board.

It has to do with this part of code as far as I can tell in BoardIndex.template.php. (modified) Both from the Core theme.

Code: [Select]
        if (!$context['user']['is_guest'] && (($category['id'] == 0 && count($context['fav_boards']) > 0) || (!empty($category['show_unread']))))
            echo '
                        <a class="unreadlink" href="', $scripturl, '?action=unread;c=', ($category['id'] != 0 ? $category['id'] : implode(',', $context['fav_boards'])), '">', $txt['view_unread_category'], '</a>';

The original part of the code is:

Code: [Select]
        if (!$context['user']['is_guest'] && !empty($category['show_unread']))
            echo '
            <a class="floatright" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';


So any ideas?

Offline poser3dart

  • Newbie
  • *
  • Posts: 9
Re: Favourite (Favorite) Boards [UPDATED FOR RC3]
« Reply #82 on: September 16, 2010, 06:42:01 PM »
Ok fixed it so it shows like default now.

Take the modified code:

Code: [Select]
        if (!$context['user']['is_guest'] && (($category['id'] == 0 && count($context['fav_boards']) > 0) || (!empty($category['show_unread']))))
            echo '
                        <a class="unreadlink" href="', $scripturl, '?action=unread;c=', ($category['id'] != 0 ? $category['id'] : implode(',', $context['fav_boards'])), '">', $txt['view_unread_category'], '</a>';


and replace "unreadlink" with "floatright" as below:

Code: [Select]
        if (!$context['user']['is_guest'] && (($category['id'] == 0 && count($context['fav_boards']) > 0) || (!empty($category['show_unread']))))
            echo '
                        <a class="floatright" href="', $scripturl, '?action=unread;c=', ($category['id'] != 0 ? $category['id'] : implode(',', $context['fav_boards'])), '">', $txt['view_unread_category'], '</a>';

It moves the "Unread Post" back to the right of the category line like it should be.

Hope this helps anyone else with this problem ( Lordmiller ).

Note:  Remember I'm using Core Theme.

Offline Royalduke

  • SMF Hero
  • ******
  • Posts: 4,699
  • Gender: Male
Re: Favourite (Favorite) Boards [UPDATED FOR RC3]
« Reply #83 on: September 17, 2010, 08:17:10 PM »
Sorry, I didn't have the notification turned on for this topic, so didn't know when people needed support.

Anyways thanks poser3dart, I will check out your solution and probably add it to the next version, which will be updated when RC4 comes out.
Failure is not an option, it's never an option. That's my motto.

Need custom SMF work done? Contact me through PM and I will provide you with a free estimate. 5 Year of experience with SMF and counting.

Offline Kcmartz

  • SMF Hero
  • ******
  • Posts: 4,278
  • Community Support Helper
    • @kcmartz on Twitter
    • Kenson's Website
Re: Favourite (Favorite) Boards [UPDATED FOR RC3]
« Reply #84 on: May 16, 2011, 10:59:32 AM »
RC5 is out, no update? I would LOVE this mod. I created a few boards I will never use (macintosh gaming, etc) and would favorite most of the others and hide the categories for the boards I won't use.
Community Support (non-staff)
2.0.4 | Avatar Packs By Me

Thanks,
Kcmartz

Offline bros

  • Full Member
  • ***
  • Posts: 580
Re: Favourite (Favorite) Boards [UPDATED FOR RC3]
« Reply #85 on: April 17, 2013, 01:22:34 PM »
This actually works on 2.0.4

Also, is it possible to make this work if you hide the categories for the boards you don't want to see?

Offline Arantor

  • SMF Legend
  • *
  • Posts: 50,928
    • wedgebook on Facebook
Re: Favourite (Favorite) Boards [UPDATED FOR RC3]
« Reply #86 on: April 17, 2013, 03:10:56 PM »
I don't remember how I wrote this originally but I have the feeling that the answer is largely a no.

The point is that if you hide the categories, the boards themselves are not loaded in the first place. Doing it irrespective of that means another query - only quite an expensive one.