Support Forum

'iconUnread' in Group View when custom Icon used for forum Icons

24 Answers

New Answer

MP Mr Papa
Mr Papa
Member

sorry, I actually dont know… did you see it in the changelogs?  you can go back for as long as they have existed…  I will try to check later and see if this is in 5.0 or not… 

or maybe Andy will stop by and answer…

CF Conrad_Farlow
Conrad_Farlow
Member

Any joy? I don’t want to do this in the core again if at all possible.

CF Conrad_Farlow
Conrad_Farlow
Member

Thanks Andy, I hope that your recovery is going well.

I shall change the core like last time, if I can remember how. I’m definitely more forgetful these days confused

Conrad

MP Mr Papa
Mr Papa
Member

hopefull, 5.1 wont be too far off… can guarantee there will be a 5.0.1 before then…

CF Conrad_Farlow
Conrad_Farlow
Member

I just can’t seem to get this working now. Do I need to declare ‘iconUnread’ in the array that starts on line 27 of sp-group-view-functions.php?

My old code was this after line 37 at least I think it was, can you tell me what is wrong?

   

# Check if a custom icon
       if ($spThisForum->unread) {
        $icon = $iconUnread;
        $icon = SPTHEMEICONSURL.sanitize_file_name($icon);
    }
    else if (!empty($spThisForum->forum_icon)) {
        $icon = SFCUSTOMURL.$spThisForum->forum_icon;
    }
    else {
        $icon = SPTHEMEICONSURL.sanitize_file_name($icon);
    }

    if ($get) return $icon;
MP Mr Papa
Mr Papa
Member

$iconunread has to be declared somewhere…   how are you getting a value in it???

CF Conrad_Farlow
Conrad_Farlow
Member

How about here?

    $defs = array('tagId'         => 'spGroupHeaderIcon%ID%',
                  'tagClass'     => 'spHeaderIcon',
                  'icon'         => 'sp_GroupIcon.png',
                  'iconUnread'  => 'sp_ForumIcon_new_post.png' ,
                  'echo'        => 1,
                  'get'            => 0,
                  );

 

Will that work?

YS Yellow Swordfish
Yellow Swordfish
Member

You are saying it doesn’t work but you don’t say in what way it doesn’t work.

CF Conrad_Farlow
Conrad_Farlow
Member

So as to avoid duplication and the fact that there appear to be more people on the other similar thread I have posted here:

https://simple-press.com/support-forum/sp5-theme-topics/change-forum-topic-icon-in-case-of-new-post/page-4/#p102056