Support Forum

Hide Group-/Forum icons on mobile theme

SA Sander58
Sander58
Member

Hi,

 

I use the wordpress mobile pack on my website: www.wparea.de and everything works nice. The Forum is also okay, but the icons beside the forum/group/topic-names overlap the letters a little bit. This just occurs on mobile version of the forum and I’d like to know if there is an opportunity to hide these icons on mobile site?

 

Regards

5 Answers

New Answer

MP Mr Papa
Mr Papa
Member

its your theme, so you could make a special check in your theme for mobile and not call the template tag that displays the icon.. ie:

    global $SFMOBILE;
    if (!$SFMOBILE) {
        # call icon template tag here
    }

SA Sander58
Sander58
Member

Thanks for the answer, but could you tell me a little bit more details about this? Do I have to add exactly

“global $SFMOBILE;

if (!$SFMOBILE) {# call icon template tag here}” in my defailt.php?? And do I have to replace “call icon template tag here” by another phrase? If yes, which one?

 

Regards

YS Yellow Swordfish
Yellow Swordfish
Member

Well – for example – in th aspForumView temlate whiuch is the liost of topics in a forum, find the line of code that displays the topic icon:

sp_TopicIndexIcon(‘tagClass=spRowIcon spLeft’);

and wrap it with Steves suggested code above. So it becomes:

global $SFMOBILE;
if ( !$SFMOBILE ) {
      sp_TopicIndexIcon('tagClass=spRowIcon spLeft');
}

This will then not display the icon if a mobile device is being used.

SA Sander58
Sander58
Member

Thank you very much MR. Papa and Yellow Swordfish! This was wthat I need 🙂

Btw: I will change the translation of “ago” in german tomorrow. Because “vor” like it is now does not make sense. It would just make sense, if “vor” would be placed before the time specification (of latest post). I hope you will accept this.