Support Forum

Change Forum & Topic Icon in case of new post

55 Answers

New Answer

DA Dave
Dave
Member

Yes, the new post icon shows in the group view inside the forum row.

YS Yellow Swordfish
Yellow Swordfish
Member

Are you using a custom icon for that forum – uploaded and set in the edit forum admin panel?

DA Dave
Dave
Member

The icon I’m attempting to change is the group icon. The forum in question (the forum with the new topic) is using a custom icon that has been uploaded and set (and working) for some time.

YS Yellow Swordfish
Yellow Swordfish
Member

Ah understood.

The current position is that if you use a custom icon then that will be used regardless of state. The problem here is that to do this this with unique, custom icons (and most users will define a different icon for each forum) is going to require a second custom icon, a second field on the forum table and select list and ui on the create/edit forum admin panels. All of which were out of scope for such a late change to what is an almost released version.

That is planned however.

PR Propheticus
Propheticus
Member

To anyone that was using the SPTHEMEICONS constant to point to the dir/url of the used images: This constant no longer exists in the latest build. You’ve now got to use either SPTHEMEICONSURL or SPTHEMEICONSDIR.

Just sharing, because this change broke our in-house solution for showing custom ‘topic/forum with new post(s)’ icons.

YS Yellow Swordfish
Yellow Swordfish
Member

Sorry about that – I am amazed you are using it!
Once we get to the ‘gold’ release (soon I really hope) then we will nail these down of course.

DA Dave
Dave
Member

Yellow Swordfish said

Ah understood.
The current position is that if you use a custom icon then that will be used regardless of state. The problem here is that to do this this with unique, custom icons (and most users will define a different icon for each forum) is going to require a second custom icon, a second field on the forum table and select list and ui on the create/edit forum admin panels. All of which were out of scope for such a late change to what is an almost released version.
That is planned however.

So using a custom icon for the forum prevents using separate read/unread icons for the group? Just making sure I understand.

MP Mr Papa
Mr Papa
Member

yes, as it currently stands… as Andy indicates, we have a ticket open to support multiple there too…  just may not make 5.0…

CF Conrad_Farlow
Conrad_Farlow
Member

So because I have a custom Icon the following will not work in Group view and I will have to modify the core again after the svn up last night?

# Start the Forum Loop
                # ----------------------------------------------------------------------
                if (sp_has_forums()) : while (sp_loop_forums()) : sp_the_forum();

                    # Start the 'forum' section
                    # ----------------------------------------------------------------------
                    sp_SectionStart('tagClass=spGroupForumSection', 'forum');

                        # Column 1 of the forum row
                        # ----------------------------------------------------------------------
                        sp_ColumnStart('tagClass=spColumnSection spLeft spColumnGuideR&width=6%&height=55px');
                            sp_ForumIndexIcon('tagClass=spRowIcon spLeft&iconUnread=sp_ForumIcon_new_post.png');
                        sp_ColumnEnd();

                        # Column 2 of the forum row
YS Yellow Swordfish
Yellow Swordfish
Member

Ah yes if you are using custom icons. That will probably follow in 5.1

CF Conrad_Farlow
Conrad_Farlow
Member

It’s back in sp-group-view-functions.php now.

This works for me.

 

    if ($spThisForum->unread) {
        $icon = $iconUnread;
        $icon = SPTHEMEICONS.sanitize_file_name($icon);
    }
    else if (!empty($spThisForum->forum_icon)) {
        $icon = SFCUSTOMURL.$spThisForum->forum_icon;
    }
    else {
        $icon = SPTHEMEICONS.sanitize_file_name($icon);
    }
    
    if ($get) {
        return $icon;
MP Mr Papa
Mr Papa
Member

okay.  we plan to allow this in future release…

CF Conrad_Farlow
Conrad_Farlow
Member

Does anyone have some code that allows the use of separate read/unread icons for the group when using a custom icon? My code above no longer works. I have changed SPTHEMEICONs to SPTHEMEICONSUR.

I know that it needs to be done in sp-group-view-functions. I have declared iconUnread on line 30 in the array immediately after icon is declared.

Once I get this working I will be uprading my live site to SP5.0

YS Yellow Swordfish
Yellow Swordfish
Member

Patience dear boy – I will get to it. I am all alone and can only type with one hand (my inferior left at that!)

CF Conrad_Farlow
Conrad_Farlow
Member

Yes but my code was working fine until this latest version. Something has changed methinks. It’s driving me up the wall quite frankly frown