Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Removing Forum Status Icons.
Avatar
Oliver Hull
Rookie
Free Members
sp_UserOfflineSmall Offline
Dec 9, 2014 - 9:30 am

Hi there, new member here.

Is there a way to remove the forum status icons on group/forum lists? I think it looks cluttered. 

Thanks,

Ollie

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 9, 2014 - 10:31 am

Welcome Oliver,

Yes you can remove or change pretty much anything you like through the theme templates. I'm going to assume you are basically familiar with templates and functions.

Using 'Default' theme as an example, find your forum themes folder and navigate to:

sp-resources > forum-themes > default > templates >

and open spGroupView.php, and spForumView.php.

Starting with group view, you will want to comment out the function 'sp_ForumIndexStatusIcons' by placing a '#' at the start so it will appear:

#sp_ForumIndexStatusIcons('tagClass=spStatusIcon spCenter', __sp('This forum is locked'), __sp('This forum has unread posts in %COUNT% topic(s)'), __sp('Add new topic in this forum'), __sp('No permission to start topics'));

Then in forum view, you will want to do the same to the function 'sp_TopicIndexStatusIcons'

It's best to comment them out as if you ever want to add them back later, all you need to do is remove the '#' from the start.

We always recommend making a custom theme or child theme to preserve the changes you've made upon updating.

Hope this helps!

Avatar
Oliver Hull
Rookie
Free Members
sp_UserOfflineSmall Offline
Dec 9, 2014 - 10:48 am

Thank you, that worked perfectly! Is there a way to correctly line up the text now tho?

I'd like this to have even spacing between top and bottom.

Thanks again. 

smile

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 9, 2014 - 11:42 am

It's not an easy one to fix unfortunately. I've found one trick that does work, but I can't tell exactly how it's going to behave. Each forum is going to be a different height depending on what information is held within it.

You would first need to give that column a unique class, so open your spGroupView.php template again, find the column which the function for the status icons was inside (# Column 3 of the forum row) and underneath in the function sp_ColumnStart - you will need to define a new tagClass to make this one column unique - I have used 'yourColumnClassName':

sp_ColumnStart('tagClass=yourColumnClassName spRight&width=14%&height=100%');

You will then need to add the new class you've created to your style sheet (forum-themes > default > styles > default.php) along with these lines:

#spMainContainer .yourColumnClassName {
    position: relative;
    top: 50%;
    transform: translateY(25%);
}

This should center it. At least using default locally I have had success with this trick.

Of course there are other methods, namely flexbox, but you would need to apply this to the parent container (.spGroupForumSection) which will fix your alignment problem perfectly, but will cause 20 odd other elements to go out of line, including some of the columns. It's a big undertaking but it's the only way I know of to get perfect alignment throughout.

Good luck!

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