From 00eba73c22c7eaaa3920fd0b3b6e43dded9df9e0 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 17 Jul 2012 16:19:40 +0000 Subject: [PATCH] =?UTF-8?q?-=20Subida=20a=20producci=C3=B3n=20de=20la=20ma?= =?UTF-8?q?queta=20-=20Inicio=20de=20p=C3=A1gina=20de=20perfil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@11 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6 --- .../plugins/bp-dedication/dedication.php | 31 ++++++++--- .../includes/bp-dedication-screens.php | 30 +++++++++++ wp-content/themes/score/dedications/index.php | 32 ++---------- .../themes/score/dedications/single/home.php | 45 ++++++++++++++++ wp-content/themes/score/header.php | 12 +++-- .../score/lib/admin/inc/theme-options.php | 19 +++++++ .../lib/buddypress/functions-buddypress.php | 7 +++ .../themes/score/members/single/home.php | 19 ++++--- .../score/members/single/member-header.php | 1 + .../themes/score/members/single/profile.php | 36 ++++++------- .../members/single/small-member-header.php | 25 +++++++++ wp-content/themes/score/style-asong2u.css | 51 +++++++++++++++---- wp-content/themes/score/video-slider.php | 30 ++++++++--- 13 files changed, 253 insertions(+), 85 deletions(-) create mode 100644 wp-content/themes/score/dedications/single/home.php create mode 100644 wp-content/themes/score/members/single/small-member-header.php diff --git a/wp-content/plugins/bp-dedication/dedication.php b/wp-content/plugins/bp-dedication/dedication.php index 5c056f1..4665f8c 100644 --- a/wp-content/plugins/bp-dedication/dedication.php +++ b/wp-content/plugins/bp-dedication/dedication.php @@ -106,35 +106,52 @@ class BP_Dedication extends BP_Component { } */ } + function get_count_dedications_from_user($user_id) { + $dedications = bp_dedication_get_dedications_from_user($user_id); + return count($dedications); + } + + function get_count_dedications_to_user($user_id) { + $dedications = bp_dedication_get_dedications_to_user($user_id); + return count($dedications); + } + function setup_nav() { $main_nav = array( 'name' => __('Dedications', 'bp-dedication'), 'slug' => bp_get_dedication_slug(), 'position' => 80, - 'screen_function' => 'bp_dedication_my_dedications', - 'default_subnav_slug' => 'my-dedications' + 'screen_function' => 'bp_dedication_index', + 'default_subnav_slug' => 'dedication-profile' ); $dedication_link = trailingslashit(bp_displayed_user_domain() . bp_get_dedication_slug()); + + $sub_nav[] = array( + 'name' => __('Profile', 'bp-dedication'), + 'slug' => 'dedication-profile', + 'parent_url' => $dedication_link, + 'parent_slug' => bp_get_dedication_slug(), + 'screen_function' => 'bp_dedication_index', + 'position' => 10 + ); - // Add a few subnav items under the main Example tab $sub_nav[] = array( 'name' => __('My dedications', 'bp-dedication'), 'slug' => 'my-dedications', 'parent_url' => $dedication_link, 'parent_slug' => bp_get_dedication_slug(), 'screen_function' => 'bp_dedication_my_dedications', - 'position' => 10 + 'position' => 20 ); - // Add the subnav items to the friends nav item $sub_nav[] = array( 'name' => __('Dedicated 2u', 'bp-dedication'), 'slug' => 'dedicated-2u', 'parent_url' => $dedication_link, 'parent_slug' => bp_get_dedication_slug(), 'screen_function' => 'bp_dedication_dedications_to_me', - 'position' => 20 + 'position' => 30 ); if (bp_displayed_user_id() == bp_loggedin_user_id()) { @@ -144,7 +161,7 @@ class BP_Dedication extends BP_Component { 'parent_url' => $dedication_link, 'parent_slug' => bp_get_dedication_slug(), 'screen_function' => 'bp_dedication_new_dedication', - 'position' => 30 + 'position' => 40 ); } 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 24a0e06..df5c60f 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php @@ -14,6 +14,36 @@ function bp_dedication_directory_setup() { } add_action( 'bp_screens', 'bp_dedication_directory_setup' ); +function bp_dedication_index() { + global $bp; + + do_action( 'bp_dedication_index' ); + + add_action( 'bp_template_title', 'bp_dedication_index_title' ); + add_action( 'bp_template_content', 'bp_dedication_index_content' ); + bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'dedications/index' ) ); +} + + function bp_dedication_index_title() { + ?> +

+ displayed_user->domain . $bp->current_component . '/screen-one/send-h5', 'bp_example_send_high_five' ); + } + + function bp_dedication_my_dedications() { global $bp; diff --git a/wp-content/themes/score/dedications/index.php b/wp-content/themes/score/dedications/index.php index 537d4ce..b61e097 100644 --- a/wp-content/themes/score/dedications/index.php +++ b/wp-content/themes/score/dedications/index.php @@ -9,42 +9,20 @@ - + +
+ + + - -
- -
- -
- -
- -

diff --git a/wp-content/themes/score/dedications/single/home.php b/wp-content/themes/score/dedications/single/home.php new file mode 100644 index 0000000..208ca80 --- /dev/null +++ b/wp-content/themes/score/dedications/single/home.php @@ -0,0 +1,45 @@ +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/header.php b/wp-content/themes/score/header.php index c111054..3ef5d27 100644 --- a/wp-content/themes/score/header.php +++ b/wp-content/themes/score/header.php @@ -64,13 +64,19 @@ + + +
+ +
+ + +
- +
- -
diff --git a/wp-content/themes/score/lib/admin/inc/theme-options.php b/wp-content/themes/score/lib/admin/inc/theme-options.php index 9bb48f1..31097ed 100644 --- a/wp-content/themes/score/lib/admin/inc/theme-options.php +++ b/wp-content/themes/score/lib/admin/inc/theme-options.php @@ -261,6 +261,23 @@ $options = array( ), "type" => "select"), array("type" => "close"), + + +array("name" => __('Video Slider Settings', 'gp_lang'), + "type" => "title"), + array("type" => "open", + "id" => $shortname . "_video_slider_settings"), + array( + "name" => __('Number Of Slides', 'gp_lang'), + "desc" => __('The number of slides to display (set to -1 to display all slides).', 'gp_lang'), + "id" => $shortname . "_video_slides", + "std" => "5", + "type" => "text", + "size" => "small"), + array("type" => "close"), + + + array("name" => __('Slider Settings', 'gp_lang'), "type" => "title"), array("type" => "open", @@ -314,6 +331,8 @@ $options = array( "type" => "text", "size" => "small"), array("type" => "close"), + + array("name" => __('Homepage Settings', 'gp_lang'), "type" => "title"), array("type" => "open", diff --git a/wp-content/themes/score/lib/buddypress/functions-buddypress.php b/wp-content/themes/score/lib/buddypress/functions-buddypress.php index 3d5bb11..075e551 100644 --- a/wp-content/themes/score/lib/buddypress/functions-buddypress.php +++ b/wp-content/themes/score/lib/buddypress/functions-buddypress.php @@ -3,6 +3,10 @@ // Load the default BuddyPress AJAX functions require_once(BP_PLUGIN_DIR . '/bp-themes/bp-default/_inc/ajax.php'); +if (bp_is_active('dedications')) : + define("BP_DEFAULT_COMPONENT","dedications"); +endif; + $countries_array = array( 'AF' => 'Afghanistan', 'AX' => 'Aland Islands', @@ -453,6 +457,9 @@ function remove_xprofile_links() { add_action('bp_init', 'remove_xprofile_links'); + + + function check_country_field() { global $wpdb; global $countries_array; diff --git a/wp-content/themes/score/members/single/home.php b/wp-content/themes/score/members/single/home.php index 6a5a61f..7db0ccc 100644 --- a/wp-content/themes/score/members/single/home.php +++ b/wp-content/themes/score/members/single/home.php @@ -17,19 +17,18 @@ +
+
- +
+
diff --git a/wp-content/themes/score/members/single/member-header.php b/wp-content/themes/score/members/single/member-header.php index 902bc65..f647b62 100644 --- a/wp-content/themes/score/members/single/member-header.php +++ b/wp-content/themes/score/members/single/member-header.php @@ -19,6 +19,7 @@
+

diff --git a/wp-content/themes/score/members/single/profile.php b/wp-content/themes/score/members/single/profile.php index 8c023e1..714e852 100644 --- a/wp-content/themes/score/members/single/profile.php +++ b/wp-content/themes/score/members/single/profile.php @@ -10,39 +10,33 @@ ?> - -