Skip to content

Commit ef4f573

Browse files
committed
merge conflicts on extra css
1 parent f2f3fae commit ef4f573

File tree

3 files changed

+91
-4
lines changed

3 files changed

+91
-4
lines changed

plugins/cc-global-network/cc-global-network.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@
143143
'_bp_get_activity_action_pre_meta'
144144
);
145145
add_filter( 'bp_core_get_userid_from_nicename', '_bp_core_get_userid', 10, 2 );
146-
add_action( 'bp_setup_nav', 'ccgn_not_logged_in_ui', 150 );
146+
//We're going to avoid this filter cause it crashes with the "public only" rendering of institutional profiles
147+
//add_action( 'bp_setup_nav', 'ccgn_not_logged_in_ui', 150 );
147148

148149
//add_filter( 'bp_xprofile_get_groups', 'ccgn_filter_role_groups', 999, 2 );
149150
add_filter( 'bp_after_has_profile_parse_args', '_bp_hide_profile_field_group' );

plugins/cc-global-network/includes/buddypress-integration.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@ function ccgn_not_logged_in_ui () {
574574
// Actually never show these
575575
// bp_core_remove_nav_item( 'activity' );
576576
//bp_core_remove_nav_item( 'groups' );
577-
if (! is_user_logged_in() ) {
577+
578+
if (! is_user_logged_in() && !$institutional_member ) {
578579
// Just don't display people's profiles
579580
bp_core_remove_nav_item( 'profile' );
580581
// Hide the "view" subtab. Ideally we would hide the "profile" tab...
@@ -891,11 +892,18 @@ function _bp_meta_member_type () {
891892
}
892893

893894
function _bp_not_signed_in_redirect () {
894-
if ( bp_is_directory()
895+
//Condition added to detect if the url is from a institutional member
896+
// In order to leave those profiles in public
897+
global $wp_query;
898+
$user = get_user_by('slug',$wp_query->query_vars['name']);
899+
$institutional_member = ccgn_member_is_institution($user->data->ID);
900+
901+
if ( (bp_is_directory()
895902
|| bp_is_activity_component() || bp_is_groups_component()
896903
// || bp_is_group_forum() // || bp_is_page( BP_MEMBERS_SLUG )
897-
|| bp_is_profile_component() || bp_is_forums_component()
904+
|| bp_is_profile_component() || bp_is_forums_component() )
898905
/*|| bbp_is_single_forum() || bbp_is_single_topic()*/
906+
&& (!$institutional_member)
899907
) {
900908
if( ! is_user_logged_in() ) {
901909
wp_redirect(

themes/cc-commoners/assets/css/extra.css

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,82 @@ table.ccgn-profile tr td.title {
242242
.vouch-list .vouch-item a:hover {
243243
background-color: #ef9c01;
244244
color: white;
245+
}
246+
/*///////////////////////////////////////
247+
GENERAL PAGES
248+
////////////////////////////////////////*/
249+
.error404 .main-content .entry-title {
250+
margin-top: 1.5rem;
251+
color: #BABABA;
252+
text-transform: uppercase;
253+
font-size: 5rem;
254+
text-align: center;
255+
}
256+
.error404 .main-content .entry-title strong {
257+
display: block;
258+
font-size: 9rem;
259+
color: #8E8E8E;
260+
line-height: 6rem;
261+
}
262+
.error404 .main-content .subtitle {
263+
margin: 2rem 0;
264+
font-size: 2.5rem;
265+
color: #838383;
266+
}
267+
.error404 .main-content .std-text p {
268+
font-size: 1.5rem;
269+
}
270+
.main-content .std-text {
271+
margin-bottom: 1rem;
272+
padding-bottom: 1rem;
273+
}
274+
.main-content .std-text p {
275+
margin: .5rem 0;
276+
}
277+
.main-content .std-text .link-list {
278+
margin-top: 1.5rem;
279+
padding-left: 1.8rem;
280+
}
281+
.main-content .std-text .link-list li {
282+
margin-bottom: .5rem;
283+
}
284+
.main-content .search-form {
285+
position: relative;
286+
width: 60%;
287+
margin: 2rem auto;
288+
}
289+
.main-content .search-form .search-field {
290+
padding: .5rem;
291+
border: 0;
292+
border-bottom: 1px solid #C0C0C0;
293+
font-size: 1.2rem;
294+
}
295+
.main-content .search-form .search-field::-webkit-input-placeholder {
296+
color: #BABABA;
297+
font-style: italic;
298+
}
299+
.main-content .search-form .search-field::-moz-placeholder {
300+
color: #BABABA;
301+
font-style: italic;
302+
}
303+
.main-content .search-form .search-field:-moz-placeholder {
304+
color: #BABABA;
305+
font-style: italic;
306+
}
307+
.main-content .search-form .search-field:-ms-input-placeholder {
308+
color: #BABABA;
309+
font-style: italic;
310+
}
311+
.main-content .search-form .search-submit {
312+
position: absolute;
313+
right: 2rem;
314+
top: .3rem;
315+
background-color: transparent;
316+
}
317+
318+
.page-body .gform_wrapper .gform_body input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="file"]) {
319+
padding: 5px 4px !important;
320+
width: auto !important;
321+
font-size: 1rem !important;
322+
border: 1px solid lightgray;
245323
}

0 commit comments

Comments
 (0)