Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Custom icons in mobile view
Avatar
Wendell
Member
sp_UserOfflineSmall Offline
Feb 8, 2016 - 10:15 am

hi again! just wondering if it's possible to replace the add topic button (in forum view - mobile) with the custom icon of that forum in desktop view.

Image Enlarger

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 8, 2016 - 10:34 am

Hey Wendell,

OK Let's see if I've understood what you want to do here!.. Should be pretty straight forward and I'm guessing you already have a child theme in place? If so, skip the next bit.

If not, make sure to download the Unified Child Theme Framework and checkout the Creating a Child Theme document for instructions on how to set things up.

First thing you will need to do is make sure your child theme has a copy of Unified's spGroupView.php in the templates folder.

Please note that Unified has both mobile and desktop sections to it's templates:

if($spDevice != 'mobile') = Desktop

if($spDevice == 'mobile') = Mobile

So, open your child themes spGroupView.php, navigate to line 45 (note this is inside a desktop section) and copy the entire function:

sp_GroupHeaderIcon('tagClass=spHeaderIcon spLeft');

Next navigate to line 91 (note this is inside a mobile section) and you should see the function:

sp_ForumIndexAddIcon('tagClass=spIcon spRight', __sp('Add new topic in this forum'));

You can either leave it in, comment it out with a hash (#) or completely remove it, but all you need to do is paste the entire sp_GroupHeaderIcon function into it's slot or directly underneath it.

You may also need to change sp_GroupHeaderIcon's spLeft to be spRight as it should then line up better with the other icons in the column.

Hope that helps, and hope I got it right!

Avatar
Wendell
Member
sp_UserOfflineSmall Offline
Feb 8, 2016 - 10:45 am

hi @ike 

i want the 'forum' icon to show, not the 'group' icon. anyway, i just replaced group with forum and it worked!

thanks so much! smile

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 8, 2016 - 10:50 am

My mistake! I didn't think I'd fully understood that but that's my reading for you..

Simply replace:

sp_GroupHeaderIcon('tagClass=spHeaderIcon spRight');

With:

sp_ForumHeaderIcon('tagId=spSubForumHeaderIcon&tagClass=spHeaderIcon spLeft');

Again, same applies about changing the spLeft to spRight.

Avatar
Wendell
Member
sp_UserOfflineSmall Offline
Feb 8, 2016 - 11:05 am

my site and my forum is indeed looking great, on desktop and mobile view. (http://brgyginebra.ph)

even made the forum my home page, thanks to Simple-Press!

keep up the excellent work @ike @yellow-swordfish @mr-papa laugh

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 8, 2016 - 2:28 pm

I must say you're forum ties into your site very well and looks fantastic! You've done a great job and I'm glad we've been able to help where requested, it's great to see. And of course, thank you for the kind words!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626