diff --git a/wp-content/plugins/bp-dedication/dedication.php b/wp-content/plugins/bp-dedication/dedication.php index 4665f8c..862a599 100644 --- a/wp-content/plugins/bp-dedication/dedication.php +++ b/wp-content/plugins/bp-dedication/dedication.php @@ -88,15 +88,7 @@ class BP_Dedication extends BP_Component { 'includes/bp-dedication-functions.php', 'includes/bp-dedication-classes.php', 'includes/bp-dedication-ajax.php', - /* 'includes/bp-example-filters.php', - - - 'includes/bp-example-template.php', - - 'includes/bp-example-notifications.php', - 'includes/bp-example-widgets.php', - 'includes/bp-example-cssjs.php', - 'includes/bp-example-ajax.php' */ + 'includes/bp-dedication-notifications.php', ); parent::includes($includes); diff --git a/wp-content/plugins/bp-dedication/includes/bp-dedication-create-dedication.php b/wp-content/plugins/bp-dedication/includes/bp-dedication-create-dedication.php index a129ebb..a4baefd 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-create-dedication.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-create-dedication.php @@ -128,26 +128,10 @@ function bp_dedication_create_new_dedication() { return false; } - $user_id = $bp->loggedin_user->id; - $user_link = bp_core_get_userlink($user_id); + /*$user_id = $bp->loggedin_user->id; + $user_link = bp_core_get_userlink($user_id);*/ - /* bp_dedication_record_activity(array( - 'type' => 'accepted_terms', - 'action' => apply_filters('bp_dedication_create_new_dedication_activity_action', - sprintf(__('%s sent a new dedication %s!', 'bp-dedication'), $user_link, $link), $user_id, ), - )); */ - - /* See bp_example_reject_terms() for an explanation of deleting activity items */ -// if ( function_exists( 'bp_activity_delete') ) -// bp_activity_delete( array( 'type' => 'rejected_terms', 'user_id' => $bp->loggedin_user->id ) ); - - /* Add a do_action here so other plugins can hook in */ - do_action('bp_dedication_create_new_dedication', $bp->loggedin_user->id); - - /* * * - * You'd want to do something here, like set a flag in the database, or set usermeta. - * just for the sake of the demo we're going to return true. - */ + do_action( 'bp_dedication_create_new_dedication', $post_id, $friend_info->ID, $bp->loggedin_user->id); return true; } diff --git a/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php b/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php new file mode 100644 index 0000000..9cd9cfe --- /dev/null +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php @@ -0,0 +1,38 @@ +dedications->slug . '/new-dedication/user/' . $from_user_id; + $post_link = get_permalink($post_id); + + /* Set up and send the message */ + $to = $reciever_ud->user_email; + $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( '%s dedicated a song 2 u!', 'bp-dedication' ), stripslashes($sender_name) ); + + $message = sprintf( __( +'%s sent you a dedication! + +To see %s\'s dedication: %s + +--------------------- +', 'bp-dedication' ), $sender_name, $sender_name, $post_link ); + + //$message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'bp-example' ), $reciever_settings_link ); + + // Send it! + wp_mail( $to, $subject, $message ); +} +add_action( 'bp_dedication_create_new_dedication', 'bp_dedication_send_dedication_notification', 10, 3 ); + +?> diff --git a/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php b/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php index df5c60f..44640c3 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php @@ -25,9 +25,6 @@ function bp_dedication_index() { } function bp_dedication_index_title() { - ?> -

- loggedin_user->id, 'bp-example-option-one', attribute_escape( $_POST['bp-example-option-one'] ) ); - } - - add_action( 'bp_template_content_header', 'bp_example_screen_settings_menu_header' ); - add_action( 'bp_template_title', 'bp_example_screen_settings_menu_title' ); - add_action( 'bp_template_content', 'bp_example_screen_settings_menu_content' ); - - bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); -} - - function bp_example_screen_settings_menu_header() { - _e( 'Example Settings Header', 'bp-example' ); - } - - function bp_example_screen_settings_menu_title() { - _e( 'Example Settings', 'bp-example' ); - } - - function bp_example_screen_settings_menu_content() { - global $bp, $bp_settings_updated; ?> - - -
-

-
- - -
- - loggedin_user->id, 'bp-example-option-one', true ) ) : ?> checked="checked" /> -

- -

- - - -
- \ No newline at end of file diff --git a/wp-content/plugins/bp-dedication/includes/css/bp-dedication.css b/wp-content/plugins/bp-dedication/includes/css/bp-dedication.css index c2c4faf..13e7a9e 100644 --- a/wp-content/plugins/bp-dedication/includes/css/bp-dedication.css +++ b/wp-content/plugins/bp-dedication/includes/css/bp-dedication.css @@ -1,13 +1,15 @@ form.standard-form textarea.dedication_text { - width: 100% !important; + width: 90% !important; height: 50px; + display: block; } form.standard-form .video_url, form.standard-form .artist_name, form.standard-form .song_name, form.standard-form .dedicate_to_input { - width: 100%; + width: 90%; + display: block; } form.standard-form ul.acfb-holder li { @@ -17,7 +19,6 @@ form.standard-form ul.acfb-holder li { } #thumbs { - float: right; background: #ccc url(img/thumbnail.jpg) center no-repeat; width: 320px; height: 240px; diff --git a/wp-content/plugins/bp-dedication/includes/js/dedication-script.js b/wp-content/plugins/bp-dedication/includes/js/dedication-script.js index 0a90e07..16f7c05 100644 --- a/wp-content/plugins/bp-dedication/includes/js/dedication-script.js +++ b/wp-content/plugins/bp-dedication/includes/js/dedication-script.js @@ -2,18 +2,42 @@ jQuery(document).ready(function(){ var j = jQuery; + j.validator.addMethod("validacionDestinatario", function(value, element, param) { + var result = false; + var idFriendVal = j("#friend_ids").val(); + var eMailFriendVal = j("#friend_email").val(); + var eMailRegExp = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; + + if (idFriendVal != "") { + result = true; + } else { + if ((eMailFriendVal != "") && (eMailRegExp.test(eMailFriendVal))) { + result = true; + } + } + + return result; + + }, "validacionDestinatario"); + // validate signup form on keyup and submit j("#new-dedication-form").validate({ + rules: { + dedicate_to_input: { + required: true, + validacionDestinatario : true + } + }, ignore: [], messages: { - friend_ids: "Please enter at least one member." + dedicate_to_input: "Please choose one member name or enter a valid email" } }); - var onAutocompleteSelect = function(value, data) { + /*var onAutocompleteSelect = function(value, data) { j('#selection').html(' ' + value); alert(data); - } + }*/ var options = { minLength: 1, @@ -32,6 +56,15 @@ jQuery(document).ready(function(){ j("#dedicate_to_input").change(function(){ if(j('#dedicate_to_input').val() == '') { + j('#friend_ids').val(''); + j('#friend_email').val(''); + } + + if(j('#dedicate_to_input').val().indexOf('@', 0) != -1 && j('#dedicate_to_input').val().indexOf('.', 0) != -1) { + j('#friend_email').val(j('#dedicate_to_input').val()); + j('#friend_ids').val(',-1'); + } else { + j('#friend_email').val(''); j('#friend_ids').val(''); } }); @@ -45,11 +78,11 @@ jQuery(document).ready(function(){ // using jYoutube jQuery plugin url = j.jYoutube(j('#video_url').val()); title = getYouTubeInfo(j('#video_url').val(), - function(artist, song){ - j('#artist_name').val(artist); - j('#song_name').val(song); + function(artist, song){ + j('#artist_name').val(artist); + j('#song_name').val(song); - }); + }); // Now append this image to
j('#thumbs').html(j('')); @@ -116,4 +149,5 @@ function ia_on_autocomplete_select( value, data ) { // Remove the value from the send-to-input box // j('#dedicate_to_input').val(''); -} \ No newline at end of file +} + \ No newline at end of file diff --git a/wp-content/plugins/bp-dedication/includes/js/jquery.jyoutube.js.js b/wp-content/plugins/bp-dedication/includes/js/jquery.jyoutube.js similarity index 100% rename from wp-content/plugins/bp-dedication/includes/js/jquery.jyoutube.js.js rename to wp-content/plugins/bp-dedication/includes/js/jquery.jyoutube.js diff --git a/wp-content/plugins/bp-my-groups-widget/bp-my-groups-widget.php b/wp-content/plugins/bp-my-groups-widget/bp-my-groups-widget.php index 179d309..bf3ce3d 100644 --- a/wp-content/plugins/bp-my-groups-widget/bp-my-groups-widget.php +++ b/wp-content/plugins/bp-my-groups-widget/bp-my-groups-widget.php @@ -1,15 +1,14 @@
  • + - -
  • + < ? php bp_group_avatar_mini(); ? > + */ + ?>
    -
    + < ? php bp_group_member_count() ? >
    */ ?> diff --git a/wp-content/themes/score/dedications/index.php b/wp-content/themes/score/dedications/index.php index 8b2d18e..3b6079b 100644 --- a/wp-content/themes/score/dedications/index.php +++ b/wp-content/themes/score/dedications/index.php @@ -1,9 +1,7 @@ @@ -13,7 +11,22 @@ -
    + + +
    diff --git a/wp-content/themes/score/dedications/single/home-column-dedicated-2-me.php b/wp-content/themes/score/dedications/single/home-column-dedicated-2-me.php new file mode 100644 index 0000000..4414800 --- /dev/null +++ b/wp-content/themes/score/dedications/single/home-column-dedicated-2-me.php @@ -0,0 +1,55 @@ +displayed_user->id); +$count = 0; +$dedication_link = bp_core_get_userlink($bp->displayed_user->id, false, true) . $bp->dedications->slug . '/dedicated-2u/'; + +?> +

    + 3) {?> + » + + ?> + + + + + + +
    > + + +
    thumbnail-no-wrap"> + + + <?php if (get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) {
+                echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true);
+            } else {
+                echo get_the_title();
+            } ?> + +
    + + + + +
    +

    + + FROM: +
    + +
    +
    +
    + + + + + diff --git a/wp-content/themes/score/dedications/single/home-column-my-dedications.php b/wp-content/themes/score/dedications/single/home-column-my-dedications.php new file mode 100644 index 0000000..7deab40 --- /dev/null +++ b/wp-content/themes/score/dedications/single/home-column-my-dedications.php @@ -0,0 +1,53 @@ +displayed_user->id); +$count = 0; +$dedication_link = bp_core_get_userlink($bp->displayed_user->id, false, true) . $bp->dedications->slug . '/my-dedications/'; +?> +

    + 3) {?> + » + + + + + + + +
    > + + +
    thumbnail-no-wrap"> + + + <?php if (get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) {
+                echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true);
+            } else {
+                echo get_the_title();
+            } ?> + +
    + + + + +
    +

    + + TO: +
    + +
    +
    +
    + + + + + diff --git a/wp-content/themes/score/dedications/single/home.php b/wp-content/themes/score/dedications/single/home.php index 208ca80..b6bcb2b 100644 --- a/wp-content/themes/score/dedications/single/home.php +++ b/wp-content/themes/score/dedications/single/home.php @@ -1,45 +1,10 @@ -displayed_user->id); -?> +
    + +
    - - - - - - +
    + +
    -
    > - - -
    thumbnail-no-wrap"> - - - <?php if (get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) {
-                echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true);
-            } else {
-                echo get_the_title();
-            } ?> - -
    - - - -
    -

    - - TO: -
    - - -
    - - - diff --git a/wp-content/themes/score/dedications/single/new-dedication.php b/wp-content/themes/score/dedications/single/new-dedication.php index 2a4b282..7a7d503 100644 --- a/wp-content/themes/score/dedications/single/new-dedication.php +++ b/wp-content/themes/score/dedications/single/new-dedication.php @@ -37,24 +37,25 @@ global $bp; break; } - ?>

    -
    1. - +
      • - - + + +
      +
        +
      • @@ -64,6 +65,8 @@ global $bp;
      • +
        +
      • @@ -87,16 +90,10 @@ global $bp;
      • */ ?>
      -
      -
      -
      -
      -
        -
        - +
        diff --git a/wp-content/themes/score/groups/single/home.php b/wp-content/themes/score/groups/single/home.php index b02d55c..1e7385f 100644 --- a/wp-content/themes/score/groups/single/home.php +++ b/wp-content/themes/score/groups/single/home.php @@ -1,6 +1,6 @@ -
        +
        diff --git a/wp-content/themes/score/home-comments.php b/wp-content/themes/score/home-comments.php index d8a2abd..dc6b80a 100644 --- a/wp-content/themes/score/home-comments.php +++ b/wp-content/themes/score/home-comments.php @@ -58,7 +58,7 @@ $count = 1; 2) : ?>
        - » + »
        diff --git a/wp-content/themes/score/lib/admin/inc/theme-sidebars.php b/wp-content/themes/score/lib/admin/inc/theme-sidebars.php index e878e91..bde718a 100644 --- a/wp-content/themes/score/lib/admin/inc/theme-sidebars.php +++ b/wp-content/themes/score/lib/admin/inc/theme-sidebars.php @@ -20,6 +20,12 @@ register_sidebar(array('name' => __('New dedication sidebar ', 'gp_lang'), 'id' 'before_title' => '

        ', 'after_title' => '

        ')); +register_sidebar(array('name' => __('Dedication profile sidebar ', 'gp_lang'), 'id' => 'dedication-profile', + 'before_widget' => '
        ', + 'after_widget' => '
        ', + 'before_title' => '

        ', + 'after_title' => '

        ')); + register_sidebar(array('name' => __('Default Sidebar', 'gp_lang'), 'id' => 'default', 'before_widget' => '
        ', 'after_widget' => '
        ', diff --git a/wp-content/themes/score/sidebar-buddypress.php b/wp-content/themes/score/sidebar-buddypress.php index caa12fb..64678b0 100644 --- a/wp-content/themes/score/sidebar-buddypress.php +++ b/wp-content/themes/score/sidebar-buddypress.php @@ -1,10 +1,19 @@ -