Support Forum

Change Forum & Topic Icon in case of new post

55 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

You can use an alternate icon for forum and topic listings when those have unread posts in them but this is currently limited to the use of theme icons and not one-off custom icons. That’s easy and available now.

If you want to do the same things with custom icons then it requires changes to core code which are obviously not recommended as it gets lost on future updates. This will come along at some point but it is nit there yet.

So which do you want to go with?

MA MartiL
MartiL
Member

Personally, I’d simply wait for this te become part of SP, but my members really miss that new-post-icon (please, don’t ask me why, there’s 3 easy ways to find new posts … confused) so I guess we’ll go with option 1, the easy way, so they’re happy untill custom icons become available laugh

MP Mr Papa
Mr Papa
Member

custom icons are available now… but limited to one… we already have a ticket open to do what Conrad did with his code to allow multiple icons…  probably in 5.1…

MA MartiL
MartiL
Member

One custom icon would do the trick …

There’s 2 things stopping people from posting, because they find it too difficult: no new post icon and the editor not being visible (see https://simple-press.com/support-forum/sp5-general-topics/show-editor-when-adding-post-or-topic).

Around 50% of my members are 55+ and not very ‘computer savvy’, so things have to be very self-explanatory and, I think, as much like phpBB as possible laugh

As you can see on the forum, I’m using a custom icon (http://vertrekkersinfo.nl/forum/) and I need a differt icon for forums/topics with unread posts … (“just like all the other fora have” :)).

YS Yellow Swordfish
Yellow Swordfish
Member

Right. The templates are in the /templates folder of your SP theme and the icons in the /images folder.

You will need an icon to represent unread posts at forum l;evel and one at topic level. Both of these go in the /images folder with the rest of the icons. You can name these icons whatever you wish but I would avoid spaces in the name.

You will need to make edits to the spGroupView.php and spForumView.php templates. In both cases the edits are the same. So let’s take spGroupView as the model.

Locate the template tag that displays the forum icons which is called sp_ForumIndexIcon(). You need to add an argument to the parameters being passed which are probably and by default:

'tagClass=spRowIcon spLeft'

Change this to:

'tagClass=spRowIcon spLeft&iconUnread=name_of_unread_icon.png'

inserting the name of your unread forum icon.

Do the same in the spForumView template for the topic icon tag – sp_TopicIndexIcon().

(Update): I should have added: As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)

MA MartiL
MartiL
Member

Wow, that was easy to do, even for me (with no coding knowledge at all) laugh

Thank you very much, works like a charm!

YS Yellow Swordfish
Yellow Swordfish
Member

Always good to hear! Glad it is all working.

AW Aaron Wentzel
Aaron Wentzel
Member

I’ve made the changes to show read and unread icons differently.

However, if i go into a topic that has one unread post and view that page.  Then return to the topic or forum view page it still shows up as unread.  Why is this?  Is something being cached?  What needs to happen to refresh that status?

Does an admin have to mark an item as read?  It appears, items only lose their unread status if i go into the admin bad and say it’s been read.

How does a user mark things as read?  In fact, why wouldn’t it be implicit.  The act of a me, the user, viewing the page should change the status to read? right?

How does this work?

Thanks,

 

Aaron

MP Mr Papa
Mr Papa
Member

its ‘sort of’ implicit… to keep an exact record would be very expensive from a cpu/db perspective… so its unread from last visit…  from the old wiki, but still applicable:

http://wiki.simple-press.com/faq-answers/understand-unread-post-lists/

AW Aaron Wentzel
Aaron Wentzel
Member

I’ve read your documentation and it makes more sense.

However, still seems like perhaps something is off or i’m not clear what ‘User selects to view a topic( and that means the posts of a topic)‘ actually means.

Steps to replicate issue.

1) click on a topic and get a list of read/unread topics

2) click on a topic that shows an unread icon (in my case red comment bubble, also implemented based on your suggestions)

3) scroll down the page and click to the last page reading all of the topics

4) click back into the topic page to see the list of read/unread topics

5) notice the red comment bubble has not disappeared back to it’s read status.

 

What am i missing here?  Is this not how it works?

YS Yellow Swordfish
Yellow Swordfish
Member

I think some of your steps in there should have been ‘forum’ and ‘post’ but i think I get the drift.

Are you an SP admin in your site? And do you use the SP admin bar plugin?