Plugin Directory

Changeset 417895


Ignore:
Timestamp:
08/01/2011 12:22:05 PM (15 years ago)
Author:
mortay
Message:

Activado contador de Bitacoras
Añadido contador de LinkedIn
Añadida constante SOCIAL_COUNTERLOAD_CSS_SMALL para ver solo los iconos y ocultar los textos de compartir.

Location:
social-counters/trunk
Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • social-counters/trunk/counters/bitacoras.php

    r415823 r417895  
    55function social_counter__defaults__bitacoras( $defaults = array() ) {
    66   
    7     if ( !empty(social_counter__bitacoras_key()) )
     7    $key = social_counter__bitacoras_key();
     8    if ( !empty($key) )
    89        $defaults[] = 'bitacoras';
    910   
     
    1819    $_post = ( $postparam ) ? $postparam : $post;
    1920   
    20     if ( $_post && !empty(social_counter__bitacoras_key()) ) {
     21    $key = social_counter__bitacoras_key();
     22    if ( $_post && !empty($key) ) {
    2123        return $codeExit . '<div class="misc-pub-section">Bitacoras: ' . social_counter__get('bitacoras', $_post, false) . '</div>';
    2224    }
     
    3537    $shared_counter = 0;
    3638   
    37     if ( $_post && !empty(social_counter__bitacoras_key()) ) {
     39    $key = social_counter__bitacoras_key();
     40    if ( $_post && !empty($key) ) {
    3841       
    3942        $share_counter_meta = get_post_meta($_post->ID, '_shared_counter_bitacoras_v2', true);
     
    5659                if ( !empty($data) ) {
    5760                    $data = json_decode($data);
    58                     if ( sizeof($data) == 1 ) {
    59                         $shared_counter = $data[0]->total_count;
     61                   
     62                    if ( $data->status == 'success' ) {
     63                        $shared_counter = $data->data->votos;
    6064                    }
    6165                }
     
    8892    $_post = ( $postparam ) ? $postparam : $post;
    8993   
    90     if ( $_post && !empty(social_counter__bitacoras_key()) ) {
     94    $key = social_counter__bitacoras_key();
     95    if ( $_post && !empty($key) ) {
    9196       
    9297        $post_title = urlencode( apply_filters('social_counters__the_title', get_the_title($_post->ID)) );
  • social-counters/trunk/css/social-counters.css

    r297911 r417895  
    99        .social-counters .social-counter-en-gbuzz { background: url(../images/en/google-buzz.gif) no-repeat 0 50%; }
    1010        .social-counters .social-counter-en-tuenti { background: url(../images/en/tuenti.gif) no-repeat 0 50%; }
     11        .social-counters .social-counter-en-bitacoras { background: url(../images/en/bitacoras.gif) no-repeat 0 50%; }
     12        .social-counters .social-counter-en-linkedin { background: url(../images/en/linkedin.gif) no-repeat 0 50%; }
    1113       
    1214        .social-counters .social-counter-es-facebook { background: url(../images/es/facebook.gif) no-repeat 0 50%; }
     
    1517        .social-counters .social-counter-es-gbuzz { background: url(../images/es/google-buzz.gif) no-repeat 0 50%; }
    1618        .social-counters .social-counter-es-tuenti { background: url(../images/es/tuenti.gif) no-repeat 0 50%; }
     19        .social-counters .social-counter-es-bitacoras { background: url(../images/en/bitacoras.gif) no-repeat 0 50%; }
     20        .social-counters .social-counter-es-linkedin { background: url(../images/en/linkedin.gif) no-repeat 0 50%; }
     21       
     22    .social-counters-mini {}
     23        .social-counters-mini .social-counter { padding-left: 18px; }
     24            .social-counters .social-counter SPAN { background-color: #fff; }
    1725       
    1826       
  • social-counters/trunk/readme.txt

    r415823 r417895  
    33Tags: social, social bookmarking, counter, twitter, facebook, google, meneame, tuenti, bitacoras.com
    44Requires at least: 2.9
    5 Tested up to: 3.1.2
    6 Stable tag: 2.1.1
     5Tested up to: 3.2.1
     6Stable tag: 2.2.0
    77
    88It allows to place social sharing links with counters (if available) to the most popular social networks: Menéame,Twitter,Facebook,...
     
    5252== Changelog ==
    5353
     54= 2.2.0 =
     55* Added counter from "Bitcoras"
     56* Added counter from "LinkedIn"
     57* Added SOCIAL_COUNTER__LOAD_CSS_SMALL constant to load only icons, not share text.
     58
    5459= 2.1.1 =
    5560* Changed counter system on Twitter, now used Twitter itself, not Tweetmeme
  • social-counters/trunk/social-counters.php

    r415823 r417895  
    44Plugin URI: http://blogestudio.com/plugin/social-counters/
    55Description:  Get Counters from Social Webs
    6 Version: 2.1.1
     6Version: 2.2.0
    77Author: Alejandro Carravedo (Blogestudio)
    88Author URI: http://blogestudio.com
     
    25252.1.1   - Cambiado sistema de contador en Twitter, ahora se usa el propio Twitter, no TweetMeMe
    2626        - Reparado contador de Facebook, ahora funciona con el Graph API, han quitado de sopetón los datos del REST API.
     27       
     282.2.0   - Anadido el contador de "Bitacoras"
     29        - Anadido el contador de "LinkedIn"
     30        - Anadida constante SOCIAL_COUNTER__LOAD_CSS_SMALL para cargar solo los iconos, no los textos de compartir.
    2731
    2832       
    2933*** Configuraciones ***
    3034SOCIAL_COUNTER__LOAD_CSS : Ponerlo a FALSE para que no cargue el estilo por defecto.
     35SOCIAL_COUNTER__LOAD_CSS_SMALL : Ponerlo a TRUE para que cargue solo los iconos.
    3136SOCIAL_COUNTER__TWITTER_USER : Indicar el Usuario de RT para Twitter.
     37
     38
     39*** ToDo ***
     402.3.0   - Pagina de Opciones
     413.0.0   - Convertir en Clase
    3242
    3343*/
     
    3848    define('SOCIAL_COUNTER__LOAD_CSS', true);
    3949
     50if ( !defined('SOCIAL_COUNTER__LOAD_CSS_SMALL') )
     51    define('SOCIAL_COUNTER__LOAD_CSS_SMALL', false);
    4052
    4153
     
    6779require_once('counters/twitter.php');
    6880require_once('counters/facebook.php');
    69 //require_once('counters/bitacoras.php');
     81require_once('counters/bitacoras.php');
     82require_once('counters/linkedin.php');
    7083
    7184
     
    104117    }
    105118   
    106     $codeExit = ( !empty($codeExit) ) ? '<div class="social-counters">'. $codeExit .'</div>' : '';
     119    $mini_counters = ( defined('SOCIAL_COUNTER__LOAD_CSS_SMALL') ) ? SOCIAL_COUNTER__LOAD_CSS_SMALL : false;
     120   
     121    $codeExit = ( !empty($codeExit) ) ? '<div class="social-counters'. ( $mini_counters ? ' social-counters-mini' : '' ) .'">'. $codeExit .'</div>' : '';
    107122   
    108123    return $codeExit;
Note: See TracChangeset for help on using the changeset viewer.