Skip to content

Commit

Permalink
Managed pin post activity with bb platform and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vapvarun committed Nov 2, 2023
1 parent ced86f2 commit c3604a8
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 52 deletions.
28 changes: 16 additions & 12 deletions assets/css/buddypress.css
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,9 @@ body .buddypress-wrap form.bp-messages-search-form input[type="search"],
/*--------------------------------------------------------------
# rtMedia Specific
--------------------------------------------------------------*/
div#rtmedia-action-update>span {
display: none;
}

.bp-nouveau .activity-update-form.activity-update-form #aw-whats-new-reset {
margin-top: 0;
Expand Down Expand Up @@ -1039,7 +1042,7 @@ button.mfp-arrow {

/* rtm-lightbox */

body .mfp-arrow {
body:not(.buddyx-mediapress) .mfp-arrow {
cursor: pointer;
position: absolute;
opacity: 0.65;
Expand All @@ -1059,7 +1062,7 @@ body .mfp-arrow {
-webkit-appearance: none;
}

body .mfp-arrow:after {
body:not(.buddyx-mediapress) .mfp-arrow:after {
content: '';
display: block;
width: 0;
Expand All @@ -1072,36 +1075,37 @@ body .mfp-arrow:after {
border: medium inset transparent;
}

body .mfp-arrow:after {
body:not(.buddyx-mediapress) .mfp-arrow:after {
border-top-width: 13px;
border-bottom-width: 13px;
top: 8px;
}

body .mfp-arrow-left:after,
body .mfp-arrow-right:after {
font-family: 'FontAwesome';
body:not(.buddyx-mediapress) .mfp-arrow-left:after,
body:not(.buddyx-mediapress) .mfp-arrow-right:after {
font-family: "Font Awesome 5 Free";
font-size: 24px;
font-weight: 900;
color: #fff;
border-left: 0;
margin-left: 13px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

body .mfp-arrow-left:after {
content: '\f137';
body:not(.buddyx-mediapress) .mfp-arrow-left:after {
content: '\f104';
}

body .mfp-arrow-right:after {
content: '\f138';
body:not(.buddyx-mediapress) .mfp-arrow-right:after {
content: '\f105';
}

body .mfp-arrow-left:before {
body:not(.buddyx-mediapress) .mfp-arrow-left:before {
border: none;
}

body .mfp-arrow-right:before {
body:not(.buddyx-mediapress) .mfp-arrow-right:before {
border: none;
}

Expand Down
2 changes: 1 addition & 1 deletion assets/css/buddypress.min.css

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions assets/css/platform.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ input[type="search"]::-webkit-search-results-decoration {
top: 30px;
}

.activity-list .bb-pin-action {
top: 5px;
}

.bb-action-popup .bb-model-header .bb-model-close-button .bb-icon-times {
font-size: 24px;
}

.activity-list .bb-activity-more-options-wrap .bb-activity-more-options .generic-button {
margin: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/css/platform.min.css

Large diffs are not rendered by default.

100 changes: 64 additions & 36 deletions buddypress/activity/entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,45 @@
* @version 3.0.0
*/

bp_nouveau_activity_hook( 'before', 'entry' ); ?>
bp_nouveau_activity_hook( 'before', 'entry' );

<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>" data-bp-activity-id="<?php bp_activity_id(); ?>" data-bp-timestamp="<?php bp_nouveau_activity_timestamp(); ?>" data-bp-activity="<?php if ( function_exists( 'bp_nouveau_edit_activity_data' ) ) { bp_nouveau_edit_activity_data(); } ?>">
$link_preview_string = '';
$link_url = '';

<?php
if ( function_exists('buddypress') && isset(buddypress()->buddyboss )) {
$link_preview_data = bp_activity_get_meta( bp_get_activity_id(), '_link_preview_data', true );
if ( ! empty( $link_preview_data ) && count( $link_preview_data ) ) {
$link_preview_string = wp_json_encode( $link_preview_data );
$link_url = ! empty( $link_preview_data['url'] ) ? $link_preview_data['url'] : '';
}

$link_embed = bp_activity_get_meta( bp_get_activity_id(), '_link_embed', true );
if ( ! empty( $link_embed ) ) {
$link_url = $link_embed;
}

?>

<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>" data-bp-activity-id="<?php bp_activity_id(); ?>" data-bp-timestamp="<?php bp_nouveau_activity_timestamp(); ?>" data-bp-activity="<?php if ( function_exists( 'bp_nouveau_edit_activity_data' ) ) { bp_nouveau_edit_activity_data(); } ?> data-link-preview='<?php echo esc_attr( $link_preview_string ); ?>' data-link-url='<?php echo esc_attr( $link_url ); ?>">

<?php
if ( function_exists( 'buddypress' ) && isset( buddypress()->buddyboss ) ) {
bb_nouveau_activity_entry_bubble_buttons();
}
?>

<div class="activity-card-head">

<?php
if ( function_exists( 'buddypress' ) && isset( buddypress()->buddyboss ) ) {
?>
<div class="bb-pin-action">
<span class="bb-pin-action_button" data-balloon-pos="up" data-balloon="<?php esc_attr_e( 'Pinned Post', 'buddyx' ); ?>">
<i class="bb-icon-f bb-icon-thumbtack"></i>
</span>
</div>
<?php
}
?>

<div class="activity-card-head">
<h6 class="card-head-content-type">
<?php echo buddyx_bp_get_activity_css_first_class(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</h6>
Expand All @@ -39,45 +67,45 @@

<div class="activity-header">

<?php bp_activity_action(); ?>

<?php if ( function_exists('BuddyPress') && isset(buddypress()->buddyboss ) ) { ?>
<p class="activity-date">
<a href="<?php echo esc_url( bp_activity_get_permalink( bp_get_activity_id() ) ); ?>"><?php echo bp_core_time_since( bp_get_activity_date_recorded() ); ?></a>
<?php
if ( function_exists( 'bp_nouveau_activity_is_edited' ) ){
bp_nouveau_activity_is_edited();
}
?>
</p>
<?php } ?>

<?php
if ( function_exists( 'bp_nouveau_activity_privacy' ) ) {
bp_nouveau_activity_privacy();
}
?>

</div>
<?php bp_activity_action(); ?>

<?php if ( function_exists( 'BuddyPress' ) && isset( buddypress()->buddyboss ) ) { ?>
<p class="activity-date">
<a href="<?php echo esc_url( bp_activity_get_permalink( bp_get_activity_id() ) ); ?>"><?php echo bp_core_time_since( bp_get_activity_date_recorded() ); ?></a>
<?php
if ( function_exists( 'bp_nouveau_activity_is_edited' ) ) {
bp_nouveau_activity_is_edited();
}
?>
</p>
<?php } ?>
<?php
if ( function_exists( 'bp_nouveau_activity_privacy' ) ) {
bp_nouveau_activity_privacy();
}
?>

</div>

</div>


<div class="activity-content">

<?php if ( bp_nouveau_activity_has_content() ) : ?>
<?php if ( bp_nouveau_activity_has_content() ) : ?>

<div class="activity-inner">
<div class="activity-inner">

<?php
if ( function_exists( 'buddypress' ) && isset( buddypress()->buddyboss ) ) {
bp_nouveau_activity_content();
} else {
bp_get_template_part( 'activity/type-parts/content', bp_activity_type_part() );
}
?>
<?php
if ( function_exists( 'buddypress' ) && isset( buddypress()->buddyboss ) ) {
bp_nouveau_activity_content();
} else {
bp_get_template_part( 'activity/type-parts/content', bp_activity_type_part() );
}
?>

</div>
</div>

<?php endif; ?>

Expand Down
6 changes: 5 additions & 1 deletion languages/buddyx.pot
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: wbcomdesigns\n"
"POT-Creation-Date: 2023-10-10 07:59+0000\n"
"POT-Creation-Date: 2023-11-01 06:35+0000\n"
"Report-Msgid-Bugs-To: Buddyx\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
Expand Down Expand Up @@ -802,6 +802,10 @@ msgstr ""
msgid "Pages:"
msgstr ""

#: ../buddyx/buddypress/activity/entry.php:42
msgid "Pinned Post"
msgstr ""

#. translators: %s = last activity timestamp (e.g. "active 1 hour ago")
#: ../buddyx/buddypress/groups/groups-loop.php:55, ../buddyx/buddypress/groups/single/cover-image-header.php:121, ../buddyx/buddypress/groups/single/group-header.php:48
msgid "active %s"
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ Copyright 2013 Klaus Hartl
Released under the MIT license

== Changelog ==
= 4.6.1 =
* Fix: (#578) Managed pin post activity with bb platform and fixes
* Fix: (#577) Managed MediaPress gallery navigation arrows

= 4.6.0 =
* Fix: (#573) Updated documentation link
* Improvement: (#573) Added global border, form, and button radius settings
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://wbcomdesigns.com/downloads/buddyx-theme/
Author: wbcomdesigns,vapvarun
Author URI: https://github.com/vapvarun/buddyx
Description: BuddyX is an ideal theme for community and membership websites. It provides a solution to all kinds of communities. Thanks to its BuddyPress support, your website can now have member profiles, send private messages, create groups, and more. It is a lightweight, fully responsive, SEO-optimised RTL and translation-ready theme. BuddyX supports WooCommerce, WC Vendors, LearnDash, LearnPress, and Gamipress plugins. It is highly customizable and works perfectly with page builders like Elementor and Gutenberg. BuddyX is perfect for creating social learning, marketplace, and blogging websites using BuddyPress integration. BuddyX uses the latest best practices for progressive web content and optimization. It is well-tested with the latest BuddyPress version and popular BuddyPress add-ons. Wbcom Designs is responsible for developing, maintaining, and supporting it.
Version: 4.6.0
Version: 4.6.1
Requires at least: 4.8
Tested up to: 6.3.2
Requires PHP: 7.4
Expand Down

0 comments on commit c3604a8

Please sign in to comment.