Plugin Directory

Changeset 1483370


Ignore:
Timestamp:
08/25/2016 01:27:50 PM (9 years ago)
Author:
vcgs
Message:

Versión 1.9.21

Location:
vcgs-toolbox
Files:
6 edited
6 copied

Legend:

Unmodified
Added
Removed
  • vcgs-toolbox/tags/1.9.21/comentarios-pendientes.php

    r1386077 r1483370  
    6767
    6868        // return just the missing replies in the comment table
    69         //add_action( 'pre_get_comments', array( $this, 'return_missing_list' ) );
    70         add_filter('comments_clauses', array($this, 'return_missing_list') , 10, 2);
     69        add_action( 'pre_get_comments', array( $this, 'return_missing_list' ) );
     70        //add_filter('comments_clauses', array($this, 'return_missing_list') , 10, 2);
    7171
    7272        // Add the 'Missing Reply' custom column
     
    164164            } else {
    165165                $currenturl = "edit-comments.php?comment_status=all&missing_reply=1&comment_type=comment&markreplied=".$comment_id;
    166                 $message = '<a href="'.$currenturl.'" title="Marcar como respondido">NO</a>';
     166                $message = '<a href="'.$currenturl.'" title="Pincha en este enlace si quieres que este comentario no aparezca en la lista de pendientes de responder">NO</a>';
    167167                $status  = 'cnrt-has-not-replied';
    168168
     
    311311     * @since   1.0
    312312     */
    313 
    314     public function return_missing_list(array $pieces, WP_Comment_Query $query) {
    315         if (! is_admin())
    316         { return $pieces; }
    317         // Esta función sólo se puede ejecutar si es admin
    318         $current_screen = get_current_screen();
    319        
    320         if ( is_admin() && ('edit-comments' == $current_screen->base) && (isset($_GET['missing_reply'])) && ($_GET['markreplied']) )
    321         {
    322             update_comment_meta( $_GET['markreplied'], '_cnrt_missing',false );
    323         }
    324        
    325         // bail on anything not admin
    326         if ( is_admin() && ('edit-comments' == $current_screen->base) && (isset($_GET['missing_reply'])))
    327         {
    328             global $wpdb;
    329             $options = get_option('vcgstb_options');
    330             $pieces['join'] = " INNER JOIN ".$wpdb->commentmeta." ON ( ".$wpdb->comments.".comment_ID = ".$wpdb->commentmeta.".comment_id )";
    331             $pieces['where'] = "(comment_approved = '1') AND (comment_date >= DATE_SUB(NOW(), INTERVAL ".$options['cope_interval']." MONTH)) AND (".$wpdb->commentmeta.".meta_key = '_cnrt_missing') AND (".$wpdb->commentmeta.".meta_value = true) AND comment_type != 'pingback' AND comment_type != 'trackback'";
    332         }
    333     return $pieces;
    334     }
    335 
     313   
     314    // return just the missing replies in the comment table
     315    public function return_missing_list( $comments = array() ) {
     316        $options = get_option('vcgstb_options');
     317        // bail on anything not admin
     318        if ( ! is_admin() )
     319            return;
     320
     321        // only run this on the comments table
     322        $current_screen = get_current_screen();
     323
     324        if( 'edit-comments' !== $current_screen->base )
     325            return;
     326
     327        // check for query param
     328        if ( ! isset( $_GET['missing_reply'] ) )
     329            return;
     330
     331        // now run action to show missing
     332        $comments->query_vars['meta_key']   = '_cnrt_missing';
     333        $comments->query_vars['meta_value'] = '1';
     334        $comments->query_vars['date_query'] = array(
     335                    'after' => $options['cope_interval'].' months ago'
     336                );
     337        $comments->query_vars['type']='comment';
     338
     339        // Because at this point, the meta query has already been parsed,
     340        // we need to re-parse it to incorporate our changes
     341        $comments->meta_query->parse_query_vars( $comments->query_vars );
     342    } // end missing_reply_list
     343   
     344   
    336345    /**
    337346     * Add the meta tag to comments for query logic later
  • vcgs-toolbox/tags/1.9.21/readme.txt

    r1480934 r1483370  
    33Tags: tools,twitter,tweet this,analytics,icons
    44Requires at least: 3.9
    5 Tested up to: 4.5.3
     5Tested up to: 4.6
    66License: GPL2
    7 Stable tag: 1.9.20
     7Stable tag: 1.9.21
    88
    99Very simple plugin that includes some awesome options, features, shortcodes and scripts for improve your blogging experience.
     
    4040
    4141== Changelog ==
     42= 1.9.21 =
     43* Mejorado el rendimiento de la opción "Comentarios pendientes de responder"
     44* Añadida función de citar los comentarios en Facebook -> Configuración->Vcgs Tooblox->Comentarios
     45* Comprobada la compatibilidad con Wordpress 4.6
     46* Solución de algunos problemas
     47* Eliminación de la opción de añadir las librerías de Bootstrap en tu blog
    4248= 1.9.20 =
    4349* Cambiado el icono de administración por uno más feo
  • vcgs-toolbox/tags/1.9.21/settings.php

    r1348441 r1483370  
    6767      'std' => false,
    6868      'desc' => '<p>Esta sección se refiere a incluir o no los scripts de Font Awesome que te permitirán usar la nomenclatura  para mostrar iconos de Font Awesome en tus posts. Puedes ver un vídeo y ejemplos en mi post: <a href="http://www.vcgs.net/blog/posticoning-mejorar-aspecto-posts-con-iconos/" target="_blank">Posticoning</a>.</p>'));
    69       $options_panel->addCheckbox('bs_activate',array('name'=> 'Incluir las librerías Bootstrap',
    70       'std' => false,
    71       'desc' => '<p>Esta sección se refiere a incluir o no los scripts de cabecera de Bootstrap para poder aprovechar todo su potencial dentro de nuestras páginas. Por poner un ejemplo, puedes ver cómo aprovecharlo en este post, utilizando la utilizadad Layoutit. <strong>¡Cuidado! -> Esta configuración puede provocar algun problema con tu Theme. Si, tras activarlo, observas resultados que no te cuadran, desactívalo enseguida.</strong></p>'));
     69     
    7270      // MIDENLACE
    7371      $options_panel->addCheckbox('me_activate',array('name'=> 'Activar el Shortcode Midenlace',
     
    8280      'std' => false,
    8381      'desc' => '<p>Se refiere a si quieres activar la función por la cual <strong>vcgs-toolbox añadirá automáticamente la imagen destacada de tus posts a tu feed rss</strong>. Por defecto, la imagen destacada no está incluida en el cuerpo de un post cuando se consulta a través del feed, lo que puede provocar que tus posts no se vean muy bien cuando tus lectores usen Feedly o cualquier otro lector RSS. Activando esta opción te aseguras que la imagen destacada se insertará al principio de los posts y éstos se verán bien en las aplicaciones de los usuarios..</p>'));
    84      
     82
     83     
    8584  $options_panel->CloseTab();
    8685 
     
    151150        ));
    152151       
    153         //CONVERTIR TAMBIÉN FRASES DE CLICK TO TWEET
     152          //Compartir y citar texto seleccionado
    154153      $options_panel->addCheckbox('pp_selector',array('name'=> 'Piopiar texto seleccionado',
    155154      'std' => false,
    156155      'desc' => '<p>Si activas esta casilla, se ofrecerá a tus lectores la posibilidad de tuitear el texto que seleccionen de tu post.</p>'));
     156     
    157157     
    158158  $options_panel->CloseTab();
     
    191191      'std' => true,
    192192      'desc' => 'Si activas esta opción, se añadirá también un enlace para que tus lectores puedan tuitear los comentarios que dejan entre sí. Además, si tienes instalado el plugin <a href="https://wordpress.org/plugins/twitter-comment-field/" target="_blank">Twitter Comment Field</a>, Vcgs Toolbox reconocerá el usuario de Twitter de quien comenta y lo mencionará en el tuit. Recuerda que esta opción solo causa efecto si tienes activada la función de Piopialo'));
     193    // AÑADIR LINK DE COMPARTIR COMENTARIOS EN FACEBOOK
     194  $options_panel->addCheckbox('pp_fco',array('name'=> 'Añadir Link para Citar comentarios en Facebook',
     195      'std' => true,
     196      'desc' => 'Si activas esta opción, se añadirá también un enlace para que tus lectores puedan citar los comentarios que dejan entre sí, <strong>ahora también en Facebook</strong>.'));
    193197  // COMENTARIOS PENDIENTES DE RESPONDER
    194198  $options_panel->addCheckbox('cope_activate',array('name'=> 'Activar la función de "Comentarios sin Responder"',
  • vcgs-toolbox/tags/1.9.21/vcgs-toolbox.php

    r1480934 r1483370  
    44 * Plugin URI: http://www.vcgs.net/blog
    55 * Description: La Caja de Herramientas de Víctor Campuzano. Un plugin construido por una comunidad con herramientas y funciones que te ayudarán a hacer más satisfactoria tu experiencia como Blogger. Por favor, visita <a href="http://www.vcgs.net/blog" target="_blank">vcgs.net/blog</a> para más información o contactar conmigo.
    6  * Version: 1.9.20
     6 * Version: 1.9.21
    77 * Author: Víctor Campuzano (vcgs)
    88 * Author URI: http://www.vcgs.net/blog/
     
    313313    $url = urlencode(get_comment_link(get_comment_ID()));
    314314    if (is_admin() || is_feed()) {
    315         $enlace = '<p><a class="piopialo-comment" href="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'"  title="Piopia este comentario"> - Tuitea este comentario <i class="fa fa-twitter"></i></a></p>';
     315        $enlace = '<p><a class="piopialo-comment" href="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'"  title="Piopia este comentario"><i class="fa fa-twitter"></i> Citar Comentario</a></p>';
    316316    } else {
    317         $enlace = '<p><span class="piopialo-comment" data-piolink="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'"  title="Piopia este comentario"> - Tuitea este comentario <i class="fa fa-twitter"></i></span></p>';
     317        $enlace = '<p class="comment-quote-link comment-piolink"><span class="piopialo-comment" data-piolink="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'"  title="Pincha aquí para compartir un enlace directo a este comentario"><i class="fa fa-twitter"></i> Citar Comentario</span></p>';
    318318    }
    319319   
    320320    return $text.$enlace;
    321321}
    322 }
     322}   
    323323
    324324// Selector de texto
     
    339339}
    340340
     341// Función de citar los comentarios en Facebook
     342if($options['pp_fco']=="1")
     343{
     344add_filter( 'comment_text', 'modificar_comentario_facebook');
     345function modificar_comentario_facebook( $text ){
     346   
     347    $options = get_option('vcgstb_options');
     348   
     349    $cid=get_comment_ID();
     350    // Obtener el nombre del autor del comentario
     351    $cauthor = get_comment_author($cid);
     352   
     353    // Obtener la URL directa del comentario
     354    $url = urlencode(get_comment_link($cid));
     355    // Obtener el texto "en bruto" del comentario
     356    $ctext = rawurlencode($cauthor.' ha comentado: '.strip_tags(get_comment_text($cid)));
     357    if (is_admin() || is_feed()) {
     358        $enlace = '<p><a class="facecita-comment" href="https://www.facebook.com/sharer/sharer.php?u='.$url.'&quote='.$ctext.'" title="Cita este compentario en Facebook con un link directo"><i class="fa fa-facebook"></i> Citar Comentario</a></p>';   
     359    } else {
     360        $enlace = '<p class="comment-quote-link comment-facelink"><span class="piopialo-comment" data-piolink="https://www.facebook.com/sharer/sharer.php?u='.$url.'&quote='.$ctext.'" title="Cita este comentario en Facebook con un link directo"><i class="fa fa-facebook"></i> Citar Comentario</span></p>';
     361    }
     362   
     363    return $text.$enlace;
     364}
     365}
    341366
    342367// Ahora comenzamos con el tema de midenlace
  • vcgs-toolbox/trunk/comentarios-pendientes.php

    r1386077 r1483370  
    6767
    6868        // return just the missing replies in the comment table
    69         //add_action( 'pre_get_comments', array( $this, 'return_missing_list' ) );
    70         add_filter('comments_clauses', array($this, 'return_missing_list') , 10, 2);
     69        add_action( 'pre_get_comments', array( $this, 'return_missing_list' ) );
     70        //add_filter('comments_clauses', array($this, 'return_missing_list') , 10, 2);
    7171
    7272        // Add the 'Missing Reply' custom column
     
    164164            } else {
    165165                $currenturl = "edit-comments.php?comment_status=all&missing_reply=1&comment_type=comment&markreplied=".$comment_id;
    166                 $message = '<a href="'.$currenturl.'" title="Marcar como respondido">NO</a>';
     166                $message = '<a href="'.$currenturl.'" title="Pincha en este enlace si quieres que este comentario no aparezca en la lista de pendientes de responder">NO</a>';
    167167                $status  = 'cnrt-has-not-replied';
    168168
     
    311311     * @since   1.0
    312312     */
    313 
    314     public function return_missing_list(array $pieces, WP_Comment_Query $query) {
    315         if (! is_admin())
    316         { return $pieces; }
    317         // Esta función sólo se puede ejecutar si es admin
    318         $current_screen = get_current_screen();
    319        
    320         if ( is_admin() && ('edit-comments' == $current_screen->base) && (isset($_GET['missing_reply'])) && ($_GET['markreplied']) )
    321         {
    322             update_comment_meta( $_GET['markreplied'], '_cnrt_missing',false );
    323         }
    324        
    325         // bail on anything not admin
    326         if ( is_admin() && ('edit-comments' == $current_screen->base) && (isset($_GET['missing_reply'])))
    327         {
    328             global $wpdb;
    329             $options = get_option('vcgstb_options');
    330             $pieces['join'] = " INNER JOIN ".$wpdb->commentmeta." ON ( ".$wpdb->comments.".comment_ID = ".$wpdb->commentmeta.".comment_id )";
    331             $pieces['where'] = "(comment_approved = '1') AND (comment_date >= DATE_SUB(NOW(), INTERVAL ".$options['cope_interval']." MONTH)) AND (".$wpdb->commentmeta.".meta_key = '_cnrt_missing') AND (".$wpdb->commentmeta.".meta_value = true) AND comment_type != 'pingback' AND comment_type != 'trackback'";
    332         }
    333     return $pieces;
    334     }
    335 
     313   
     314    // return just the missing replies in the comment table
     315    public function return_missing_list( $comments = array() ) {
     316        $options = get_option('vcgstb_options');
     317        // bail on anything not admin
     318        if ( ! is_admin() )
     319            return;
     320
     321        // only run this on the comments table
     322        $current_screen = get_current_screen();
     323
     324        if( 'edit-comments' !== $current_screen->base )
     325            return;
     326
     327        // check for query param
     328        if ( ! isset( $_GET['missing_reply'] ) )
     329            return;
     330
     331        // now run action to show missing
     332        $comments->query_vars['meta_key']   = '_cnrt_missing';
     333        $comments->query_vars['meta_value'] = '1';
     334        $comments->query_vars['date_query'] = array(
     335                    'after' => $options['cope_interval'].' months ago'
     336                );
     337        $comments->query_vars['type']='comment';
     338
     339        // Because at this point, the meta query has already been parsed,
     340        // we need to re-parse it to incorporate our changes
     341        $comments->meta_query->parse_query_vars( $comments->query_vars );
     342    } // end missing_reply_list
     343   
     344   
    336345    /**
    337346     * Add the meta tag to comments for query logic later
  • vcgs-toolbox/trunk/readme.txt

    r1480934 r1483370  
    33Tags: tools,twitter,tweet this,analytics,icons
    44Requires at least: 3.9
    5 Tested up to: 4.5.3
     5Tested up to: 4.6
    66License: GPL2
    7 Stable tag: 1.9.20
     7Stable tag: 1.9.21
    88
    99Very simple plugin that includes some awesome options, features, shortcodes and scripts for improve your blogging experience.
     
    4040
    4141== Changelog ==
     42= 1.9.21 =
     43* Mejorado el rendimiento de la opción "Comentarios pendientes de responder"
     44* Añadida función de citar los comentarios en Facebook -> Configuración->Vcgs Tooblox->Comentarios
     45* Comprobada la compatibilidad con Wordpress 4.6
     46* Solución de algunos problemas
     47* Eliminación de la opción de añadir las librerías de Bootstrap en tu blog
    4248= 1.9.20 =
    4349* Cambiado el icono de administración por uno más feo
  • vcgs-toolbox/trunk/settings.php

    r1348441 r1483370  
    6767      'std' => false,
    6868      'desc' => '<p>Esta sección se refiere a incluir o no los scripts de Font Awesome que te permitirán usar la nomenclatura  para mostrar iconos de Font Awesome en tus posts. Puedes ver un vídeo y ejemplos en mi post: <a href="http://www.vcgs.net/blog/posticoning-mejorar-aspecto-posts-con-iconos/" target="_blank">Posticoning</a>.</p>'));
    69       $options_panel->addCheckbox('bs_activate',array('name'=> 'Incluir las librerías Bootstrap',
    70       'std' => false,
    71       'desc' => '<p>Esta sección se refiere a incluir o no los scripts de cabecera de Bootstrap para poder aprovechar todo su potencial dentro de nuestras páginas. Por poner un ejemplo, puedes ver cómo aprovecharlo en este post, utilizando la utilizadad Layoutit. <strong>¡Cuidado! -> Esta configuración puede provocar algun problema con tu Theme. Si, tras activarlo, observas resultados que no te cuadran, desactívalo enseguida.</strong></p>'));
     69     
    7270      // MIDENLACE
    7371      $options_panel->addCheckbox('me_activate',array('name'=> 'Activar el Shortcode Midenlace',
     
    8280      'std' => false,
    8381      'desc' => '<p>Se refiere a si quieres activar la función por la cual <strong>vcgs-toolbox añadirá automáticamente la imagen destacada de tus posts a tu feed rss</strong>. Por defecto, la imagen destacada no está incluida en el cuerpo de un post cuando se consulta a través del feed, lo que puede provocar que tus posts no se vean muy bien cuando tus lectores usen Feedly o cualquier otro lector RSS. Activando esta opción te aseguras que la imagen destacada se insertará al principio de los posts y éstos se verán bien en las aplicaciones de los usuarios..</p>'));
    84      
     82
     83     
    8584  $options_panel->CloseTab();
    8685 
     
    151150        ));
    152151       
    153         //CONVERTIR TAMBIÉN FRASES DE CLICK TO TWEET
     152          //Compartir y citar texto seleccionado
    154153      $options_panel->addCheckbox('pp_selector',array('name'=> 'Piopiar texto seleccionado',
    155154      'std' => false,
    156155      'desc' => '<p>Si activas esta casilla, se ofrecerá a tus lectores la posibilidad de tuitear el texto que seleccionen de tu post.</p>'));
     156     
    157157     
    158158  $options_panel->CloseTab();
     
    191191      'std' => true,
    192192      'desc' => 'Si activas esta opción, se añadirá también un enlace para que tus lectores puedan tuitear los comentarios que dejan entre sí. Además, si tienes instalado el plugin <a href="https://wordpress.org/plugins/twitter-comment-field/" target="_blank">Twitter Comment Field</a>, Vcgs Toolbox reconocerá el usuario de Twitter de quien comenta y lo mencionará en el tuit. Recuerda que esta opción solo causa efecto si tienes activada la función de Piopialo'));
     193    // AÑADIR LINK DE COMPARTIR COMENTARIOS EN FACEBOOK
     194  $options_panel->addCheckbox('pp_fco',array('name'=> 'Añadir Link para Citar comentarios en Facebook',
     195      'std' => true,
     196      'desc' => 'Si activas esta opción, se añadirá también un enlace para que tus lectores puedan citar los comentarios que dejan entre sí, <strong>ahora también en Facebook</strong>.'));
    193197  // COMENTARIOS PENDIENTES DE RESPONDER
    194198  $options_panel->addCheckbox('cope_activate',array('name'=> 'Activar la función de "Comentarios sin Responder"',
  • vcgs-toolbox/trunk/vcgs-toolbox.php

    r1480934 r1483370  
    44 * Plugin URI: http://www.vcgs.net/blog
    55 * Description: La Caja de Herramientas de Víctor Campuzano. Un plugin construido por una comunidad con herramientas y funciones que te ayudarán a hacer más satisfactoria tu experiencia como Blogger. Por favor, visita <a href="http://www.vcgs.net/blog" target="_blank">vcgs.net/blog</a> para más información o contactar conmigo.
    6  * Version: 1.9.20
     6 * Version: 1.9.21
    77 * Author: Víctor Campuzano (vcgs)
    88 * Author URI: http://www.vcgs.net/blog/
     
    313313    $url = urlencode(get_comment_link(get_comment_ID()));
    314314    if (is_admin() || is_feed()) {
    315         $enlace = '<p><a class="piopialo-comment" href="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'"  title="Piopia este comentario"> - Tuitea este comentario <i class="fa fa-twitter"></i></a></p>';
     315        $enlace = '<p><a class="piopialo-comment" href="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'"  title="Piopia este comentario"><i class="fa fa-twitter"></i> Citar Comentario</a></p>';
    316316    } else {
    317         $enlace = '<p><span class="piopialo-comment" data-piolink="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'"  title="Piopia este comentario"> - Tuitea este comentario <i class="fa fa-twitter"></i></span></p>';
     317        $enlace = '<p class="comment-quote-link comment-piolink"><span class="piopialo-comment" data-piolink="http://www.twitter.com/intent/tweet/?text='.$tuitear.'&url='.$url.'&related='.rawurlencode($authusername[0].','.$commentusername[0]).'"  title="Pincha aquí para compartir un enlace directo a este comentario"><i class="fa fa-twitter"></i> Citar Comentario</span></p>';
    318318    }
    319319   
    320320    return $text.$enlace;
    321321}
    322 }
     322}   
    323323
    324324// Selector de texto
     
    339339}
    340340
     341// Función de citar los comentarios en Facebook
     342if($options['pp_fco']=="1")
     343{
     344add_filter( 'comment_text', 'modificar_comentario_facebook');
     345function modificar_comentario_facebook( $text ){
     346   
     347    $options = get_option('vcgstb_options');
     348   
     349    $cid=get_comment_ID();
     350    // Obtener el nombre del autor del comentario
     351    $cauthor = get_comment_author($cid);
     352   
     353    // Obtener la URL directa del comentario
     354    $url = urlencode(get_comment_link($cid));
     355    // Obtener el texto "en bruto" del comentario
     356    $ctext = rawurlencode($cauthor.' ha comentado: '.strip_tags(get_comment_text($cid)));
     357    if (is_admin() || is_feed()) {
     358        $enlace = '<p><a class="facecita-comment" href="https://www.facebook.com/sharer/sharer.php?u='.$url.'&quote='.$ctext.'" title="Cita este compentario en Facebook con un link directo"><i class="fa fa-facebook"></i> Citar Comentario</a></p>';   
     359    } else {
     360        $enlace = '<p class="comment-quote-link comment-facelink"><span class="piopialo-comment" data-piolink="https://www.facebook.com/sharer/sharer.php?u='.$url.'&quote='.$ctext.'" title="Cita este comentario en Facebook con un link directo"><i class="fa fa-facebook"></i> Citar Comentario</span></p>';
     361    }
     362   
     363    return $text.$enlace;
     364}
     365}
    341366
    342367// Ahora comenzamos con el tema de midenlace
Note: See TracChangeset for help on using the changeset viewer.