Support Forum
Hi!
So, after taking care of my issues, I began to make my own theme editing the css-only one.
Is there any way to make the Forum Icon and Topic Icon change in case of new post ? Personnaly, I don't dislike your method (the little bubble) but most of people are used to the Icon changing and It could be usefull to add it.
Thanks in advance ! ^^
Sadly, using just CSS styling and the available options there currently doesn't seem to be an easy way to do this. The standard themes do not change the Class or ID for Forum/Topic icons when there's a new post. So, there's no class/id to refer to in your CSS styling.
It is possible though. It just takes quite a bit of coding in some of the template files. Our own community is lucky to have an in-house programmer that knows his way around PHP. He has recently 'hacked' this feature into our custom theme, after receiving similar requests from our user base.
I do understand some PHP and could post the code and try to explain it a bit. Nevertheless, I think it's wiser to let him elaborate on the matter if he feels like it 😛
we have added a new class to an forum or topic row if it has unread topics/posts in it... its in svn, but not sure it was in last update... should be tomorrow...
also thought we had a separate icon already, but will have to let Andy jump in here...
Visit Cruise Talk Central and Mr Papa's World
You need to supply the alternate icon but you can change both the forum icon (Group View) and the topic icon (Forum View) by passing the argument 'iconUnread=xxxx.png' in the arguments list of the relevant function in the group and forum templates. This will then use the alternate 'unread' icon if the parent contains unread posts.
YELLOW
SWORDFISH
|
For both Dave H and CuberToy:
As we have not got the documentation up and running yet here is a quick shot at it.
You will be editing the template for the theme you are using. As always - remember that if you edit one of the supplied themes then it will be overwritten on a subsequent update so it is recommended to make your own theme by copying the exiting one you are using.
So - to make this change to the forum view (list of topics) go to the templates folder of the thee and open the template for Forum View.
If you take a little time to read through it you will see how this constructs the forum view display. It is really pretty straightforward.
In this case the function that displays the topic icon is probably in the theme as:
sp_TopicIndexIcon('tagClass=spRowIcon spLeft');
each function has a pre-defined set of arguments that can be passed but you only need to pass one if you want to change the default. To add an alternative icon as requested then change the above to read:
sp_TopicIndexIcon('tagClass=spRowIcon spLeft&iconUnread=iconname.png');
Note the ampersand delimiter (just like WP template tag functions) and no spaces between arguments. You will, of course, have to supply the icon in the themes images folder and name it correctly in the argument above.
YELLOW
SWORDFISH
|
Totally missed that line while searching. It works great.
Thanks a lot ! (Now, just have to make thess icons :p)
If it can help. Theses lines are in :
For Forum : spForumView.php line 143
For Group : spGroupView.php line 47
on the css-only theme.
Don't worry, I've created a new folder as well ^^
1 Guest(s)