Tarea #1014 -> Compartir una dedicatoria con el "share"
git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@123 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
parent
61ce72a993
commit
5aeb57490e
@ -1,6 +1,15 @@
|
||||
<?php
|
||||
|
||||
// Ondemand function to generate tinyurl
|
||||
|
||||
|
||||
function bp_dedication_send_dedication_notification( $post_id, $to_user_email, $from_user_id ) {
|
||||
|
||||
function getTinyUrl($url) {
|
||||
$tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url);
|
||||
return $tinyurl;
|
||||
}
|
||||
|
||||
global $bp;
|
||||
|
||||
/* Let's grab both user's names to use in the email. */
|
||||
@ -19,6 +28,7 @@ function bp_dedication_send_dedication_notification( $post_id, $to_user_email, $
|
||||
|
||||
$post_link = get_option('siteurl') . '/index.php';
|
||||
$post_link = add_query_arg('refid', $enc_link, $post_link);
|
||||
$post_link = getTinyUrl($post_link);
|
||||
|
||||
/* Set up and send the message */
|
||||
$subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( '%s dedicated a song 2 u!', 'bp-dedication' ), stripslashes($sender_name) );
|
||||
|
||||
@ -777,4 +777,10 @@ function gp_get_total_unread_dedications() {
|
||||
else return 0;
|
||||
}
|
||||
|
||||
// Ondemand function to generate tinyurl
|
||||
function getTinyUrl($url) {
|
||||
$tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url);
|
||||
return $tinyurl;
|
||||
}
|
||||
|
||||
?>
|
||||
@ -107,10 +107,22 @@ function updateInfo() {
|
||||
var artist = jQuery('#postdata-artist-' + id).html();
|
||||
var song = jQuery('#postdata-song-' + id).html();
|
||||
var link = jQuery('#postdata-link-' + id).html();
|
||||
var enc_link = jQuery('#postdata-extlink-' + id).html();
|
||||
|
||||
var nUrl = oUrl + 'id/' + the_id;
|
||||
jQuery('#dedicate_this_song_button').attr("href", nUrl);
|
||||
|
||||
// Social networks
|
||||
nUrl = 'https://www.facebook.com/sharer.php?u=' + enc_link;
|
||||
jQuery('#fsbbtn a').attr("href", nUrl);
|
||||
nUrl = 'http://twitter.com/intent/tweet?source=sharethiscom&url=' + enc_link;
|
||||
jQuery('#twtbtn a').attr("href", nUrl);
|
||||
nUrl = 'https://plusone.google.com/_/+1/confirm?url=' + enc_link;
|
||||
jQuery('#gpsbtn a').attr("href", nUrl);
|
||||
nUrl = 'javascript:void(window.open("http://www.myspace.com/Modules/PostTo/Pages/?u=' + enc_link + '"+encodeURIComponent(document.location.toString()),"ptm","height=450,width=550").focus())';
|
||||
jQuery('#mysbtn a').attr("href", nUrl);
|
||||
|
||||
|
||||
jQuery('#dedication-data-panel').hide('fast');
|
||||
jQuery('#dedication-data-panel').slideUp(
|
||||
'fast',
|
||||
@ -156,6 +168,7 @@ function updateInfo() {
|
||||
);
|
||||
jQuery('#dedicationComments_container').slideDown();
|
||||
|
||||
|
||||
if(jQuery('#postdata-mark-read-' + id).length > 0) {
|
||||
console.log('doy por leido ' + id);
|
||||
jQuery('#postdata-mark-read-' + id + ' .mar_mark_as_read').click();
|
||||
@ -183,6 +196,7 @@ function shrinkTitle()
|
||||
|
||||
|
||||
jQuery(window).ready(function() {
|
||||
|
||||
if (jQuery('#slider-wrapper')) {
|
||||
jQuery('#componentWrapper').videoGallery({
|
||||
componentFixedSize: true,
|
||||
|
||||
@ -17,7 +17,7 @@ if(get_post_meta($post->ID, 'ghostpool_thumbnail_height', true) && get_post_meta
|
||||
$gp_settings['image_height'] = $gp_settings['thumbnail_height'];
|
||||
}
|
||||
|
||||
|
||||
$gp_settings['enc_link'] = getTinyUrl(add_query_arg('refid', bp_dedication_encode(get_permalink()), get_option('siteurl') . '/index.php'));
|
||||
|
||||
// Song data
|
||||
$gp_settings['video'] = get_post_meta($post->ID, 'ghostpool_dedication_url', true);
|
||||
|
||||
@ -129,6 +129,7 @@ if (have_posts()) {
|
||||
<span id="postdata-artist-<?php echo $slide_counter; ?>"><?php echo $gp_settings['artist_short']; ?></span>
|
||||
<span id="postdata-song-<?php echo $slide_counter; ?>"><?php echo $gp_settings['song_short']; ?></span>
|
||||
<span id="postdata-link-<?php echo $slide_counter; ?>"><?php the_permalink(); ?></span>
|
||||
<span id="postdata-extlink-<?php echo $slide_counter; ?>"><?php echo $gp_settings['enc_link']; ?></span>
|
||||
<span id="postdata-comments-<?php echo $slide_counter; ?>">
|
||||
<?php if (0) /*$_ishome)*/ require('home-comments.php'); ?>
|
||||
</span>
|
||||
@ -154,7 +155,6 @@ if (have_posts()) {
|
||||
<div id="shareHolder">
|
||||
<div id="shareHolderInner">
|
||||
<div id="fb-root"></div>
|
||||
<div id="shareme" data-url="" data-text="Make your sharing widget with Sharrre"></div>
|
||||
<div id='fsbbtn'><a href="https://www.facebook.com/" target='_blank'><img src='<?php echo get_template_directory_uri(); ?>/lib/scripts/videoslider/data/facebook.png' width='20' height='20' alt='facebook'/></a></div>
|
||||
<div id='twtbtn'><a href="https://www.twitter.com/" target='_blank'><img src='<?php echo get_template_directory_uri(); ?>/lib/scripts/videoslider/data/twitter.png' width='20' height='20' alt='twitter'/></a></div>
|
||||
<div id='gpsbtn'><a href="https://plus.google.com/" target='_blank'><img src='<?php echo get_template_directory_uri(); ?>/lib/scripts/videoslider/data/google_plus.png' width='20' height='20' alt='google'/></a></div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user