Dotclear

Changeset 3057


Ignore:
Timestamp:
06/10/11 18:35:33 (12 years ago)
Author:
JcDenis
Message:

shareOn 2011.06.10

  • Fixed install on nightly build
  • Removed core->blog reference from prepend
  • Added google +1 button
  • (c) 2011
Location:
plugins/shareOn
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • plugins/shareOn/_admin.php

    r2400 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1212 
    1313if (!defined('DC_CONTEXT_ADMIN')){return;} 
     14 
     15$core->blog->settings->addNamespace('shareOn'); 
    1416 
    1517require_once dirname(__FILE__).'/_widgets.php'; 
  • plugins/shareOn/_define.php

    r2543 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1717     /* Description*/         "Add some buttons to your posts to share them", 
    1818     /* Author */        "JC Denis", 
    19      /* Version */       '0.7', 
     19     /* Version */       '2011.06.11', 
    2020     /* Permissions */        'admin' 
    2121); 
    22      /* date */          #20100813 
    2322?> 
  • plugins/shareOn/_install.php

    r2452 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    2121{ 
    2222     # Check DC version 
    23      if (version_compare(DC_VERSION,'2.2-alpha','<')) 
     23     if (version_compare(str_replace("-r","-p",DC_VERSION),'2.2-alpha','<')) 
    2424     { 
    25           throw new Exception('Plugin called shareOn requires Dotclear 2.2 or higher.'); 
     25          throw new Exception('shareOn requires Dotclear 2.2'); 
    2626     } 
    2727      
     
    3333     "#sidebar .shareonwidget ul li { margin: 4px; padding: 0; border: none; } \n"; 
    3434      
     35     $core->blog->settings->addNamespace('shareOn'); 
    3536     $s = $core->blog->settings->shareOn; 
    3637     $s->put('shareOn_active',false,'boolean','Enable shareOn',false,true); 
  • plugins/shareOn/_prepend.php

    r2543 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1515 
    1616global $core, $__autoload; 
    17 $core->blog->settings->addNamespace('shareOn'); 
    1817 
    1918if (!isset($core->shareOnButtons)) { $core->shareOnButtons = array(); } 
     
    3130$__autoload['ybuzzButton'] = dirname(__FILE__).'/inc/class.shareon.php'; 
    3231$__autoload['gbuzzButton'] = dirname(__FILE__).'/inc/class.shareon.php'; 
     32$__autoload['gplusButton'] = dirname(__FILE__).'/inc/class.shareon.php'; 
    3333 
    3434$core->shareOnButtons['flattr'] = 'flattrButton'; 
     
    4242$core->shareOnButtons['ybuzz'] = 'ybuzzButton'; 
    4343$core->shareOnButtons['gbuzz'] = 'gbuzzButton'; 
     44$core->shareOnButtons['gplus'] = 'gplusButton'; 
    4445 
    4546?> 
  • plugins/shareOn/_public.php

    r2400 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1212 
    1313if (!defined('DC_RC_PATH')){return;} 
     14 
     15$core->blog->settings->addNamespace('shareOn'); 
    1416 
    1517require_once dirname(__FILE__).'/_widgets.php'; 
     
    2527); 
    2628 
    27 if (!$core->blog->settings->shareOn->shareOn_active) 
    28 { 
     29if (!$core->blog->settings->shareOn->shareOn_active) { 
    2930     $core->tpl->addValue('shareOnButton',array('tplShareOn','disable')); 
    3031} 
    31 else 
    32 { 
     32else { 
    3333     $core->tpl->addValue('shareOnButton',array('tplShareOn','button')); 
    3434} 
  • plugins/shareOn/_uninstall.php

    r2206 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
  • plugins/shareOn/_widgets.php

    r2400 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
  • plugins/shareOn/inc/class.shareon.php

    r2543 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    264264     public $js_content = '$(\'<iframe src="http://www.facebook.com/plugins/like.php?href=%URL%&amp;layout=%STYLE%&amp;show_faces=%SHOWFACES%&amp;width=100%&amp;action=%ACTION%&amp;colorscheme=%COLORSCHEME%&amp;height=%HEIGHT%" width="%WIDTH%" height="%HEIGHT%" frameborder="0" scrolling="no" allowtransparency="true"> </iframe>\')'; 
    265265     public $size = array( 
    266           0 => array('style'=>'standard','width'=>450,'height'=>25), 
    267           1 => array('style'=>'button_count','width'=>80,'height'=>25) 
     266          0 => array('style'=>'standard','width'=>450,'height'=>21), 
     267          1 => array('style'=>'button_count','width'=>80,'height'=>21) 
    268268     ); 
    269269     protected $preload = true; 
     
    580580     public $size = array( 
    581581          0 => array('style'=>'normal-count','width'=>51,'height'=>82), 
    582           1 => array('style'=>'small-count','width'=>100,'height'=>0) 
     582          1 => array('style'=>'small-count','width'=>100,'height'=>18) 
    583583     ); 
    584584     protected $preload = false; 
     
    654654     } 
    655655} 
     656 
     657class gplusButton extends shareOn 
     658{ 
     659     public $id = 'gplus'; 
     660     public $name = 'Google +1'; 
     661     public $home = 'http://www.google.com/+1/button/'; 
     662     public $js_var = "var gplus = document.createElement('SCRIPT'), gplus1 = document.getElementsByTagName('SCRIPT')[0]; gplus.type = 'text/javascript'; gplus.async = true; gplus.src = 'http://apis.google.com/js/plusone.js'; gplus1.parentNode.insertBefore(gplus, gplus1); \n"; 
     663     public $nl_content = '<div class="g-plusone" size="%STYLE%" href="%URL%" count="true"></div>'; 
     664     public $size = array( 
     665          0 => array('style'=>'tall','width'=>52,'height'=>80), //50x60 
     666          //1 => array('style'=>'small','width'=>80,'height'=>18) //70x15 
     667          1 => array('style'=>'medium','width'=>70,'height'=>20) //70x15 
     668     ); 
     669     protected $preload = true; 
     670      
     671     public function __construct($core) 
     672     { 
     673          parent::__construct($core); 
     674     } 
     675      
     676} 
    656677?> 
  • plugins/shareOn/index.php

    r2452 r3057  
    33# This file is part of shareOn, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
  • plugins/shareOn/release.txt

    r2543 r3057  
    11 * Added buttons order 
    22 * Added CSS class to buttons box 
     3 * Added language support 
     4 * Moved JS to footer 
    35 * Fixed buttons default size 
     6 
     72011.06.10 
     8 * Fixed install on nightly build 
     9 * Removed core->blog reference from prepend 
     10 * Added google +1 button 
     11 * (c) 2011 
    412 
    5130.7 20100708 
Note: See TracChangeset for help on using the changeset viewer.

Sites map