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
Make restricted areas grey for members with no access
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 15, 2015 - 10:52 pm

not sure what you mean....  custom usergroup???

the code you have is checking against a specific group, but not usergroup... do you really mean group?

If so, is group id of 4 what you want?  its the id of the group of forums that you want to be greyed out...  and the way you have it defined, only guests will see the group greyed...

or do you really want a specific usergroup to also see it greyed out as well as guests??  this is a bit different than what you set out to do...

if so, you might want to try changing:

if($spThisUser->guest && $spThisGroup->group_id != 4) $spOpaque = ' spOpaque';

to

if (!sp_can_view($spThisForum->forum_id, 'post-content')) $spOpaque = ' spOpaque';

but not entirely sure what you want to do...  this would grey out the forum in group view for anyone that cannot view the actual post content (ie sneak peek)...

Avatar
Julian Paul Francis Kitagawa
Member
Free Members
sp_UserOfflineSmall Offline
Feb 15, 2015 - 11:18 pm

Yes, I'm sorry, while having lunch I just realised myself what I'd done.

I have two levels of members with different levels of access to the forum. Guests have no access to anything at all.

This worked perfectly, thank you, and sorry again for the confusion.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 15, 2015 - 11:20 pm

okay, cool...  thanks for the update...

Avatar
Julian Paul Francis Kitagawa
Member
Free Members
sp_UserOfflineSmall Offline
Feb 20, 2015 - 6:00 am

I'm sorry to come back with this one...

But it seems after the recent update, this stopped working.

I'm also getting the message "Either the theme CSS file and/or color Overlay file from the selected theme is missing" in the "themes" admin panel, as well as the following warning (I don't know if it's related though):

February 20, 2015 12:52 am | spaErrWarning | 40 | php


file: /simple-press/sp-api/sp-api-filters.php
line: 1777
function: htmlspecialchars
Warning | htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 20, 2015 - 7:15 am

What recent update?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Julian Paul Francis Kitagawa
Member
Free Members
sp_UserOfflineSmall Offline
Feb 20, 2015 - 3:29 pm

Simplepress Version 5.5.4

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 21, 2015 - 2:50 am

Have you tried resetting the CSS cache if you re using it (Toolbox > Housekeeping)? Or  perhaps initially, turning it off (Options > Global Settings).

andy-signature.png
YELLOW
SWORDFISH
Avatar
Julian Paul Francis Kitagawa
Member
Free Members
sp_UserOfflineSmall Offline
Feb 22, 2015 - 4:01 am

Yes, no difference...

I don't think there's anything wrong in the code as it was working before, but here's an example of what I've got:

# Column 1 of the forum row
# ----------------------------------------------------------------------
sp_ColumnStart("tagClass=spColumnSection spLeft$spOpaque&width=6%&height=55px");
$spOpaque = '';
if (!sp_can_view($spThisForum->forum_id, 'post-content')) $spOpaque = ' spOpaque';

sp_ForumIndexIcon('tagClass=spRowIcon spLeft');
sp_ColumnEnd();

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 22, 2015 - 4:27 am

Yes - the code looks OK to me.

Let's firstly keep the cached CSS option turned off completely.

And then return to this admin panel message. Go to the SP Admin Themes page and select a different Sp theme and update and then re-select the one you want with the overlay you want and update again. Wha happens?

And - by the way - what theme and overlay are you actually using? 

andy-signature.png
YELLOW
SWORDFISH
Avatar
Julian Paul Francis Kitagawa
Member
Free Members
sp_UserOfflineSmall Offline
Mar 12, 2015 - 2:03 am

First of all sorry for taking *so* long to get back to you on this. I moved house, and have been without internet for the last couple of weeks.

I did these things (turn off css cache, update to different theme, then back) but with no change.

And I'm using the default theme, with the "gin and tonic" overlay.

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: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625