Changeset 24758


Ignore:
Timestamp:
Oct 5, 2013, 12:02:41 AM (7 years ago)
Author:
mistic100
Message:

add reddit button

Location:
extensions/SocialButtons
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/admin.php

    r24757 r24758  
    3939      'img_size' => $_POST['pinterest']['img_size'],
    4040      ),
     41    'reddit' => array(
     42      'enabled' => isset($_POST['reddit']['enabled']),
     43      'type' => $_POST['reddit']['type'],
     44      'community' => $_POST['reddit']['community'],
     45      ),
    4146    );
    4247 
  • extensions/SocialButtons/include/install.inc.php

    r24757 r24758  
    3838        'img_size' => 'Original',
    3939        ),
     40      'reddit' => array(
     41        'enabled' => true,
     42        'type' => 'interactive',
     43        'community' => null,
     44        ),
    4045      );
    4146   
     
    7681    }
    7782   
     83    if (empty($new_conf['reddit']))
     84    {
     85      $new_conf['reddit'] = array(
     86        'enabled' => false,
     87        'type' => 'interactive',
     88        'community' => null,
     89        );
     90    }
     91   
    7892    if (!isset($new_conf['on_index']))
    7993    {
  • extensions/SocialButtons/language/en_UK/plugin.lang.php

    r24757 r24758  
    1313$lang['on photo and album'] = 'on photo and album';
    1414$lang['only on photo'] = 'only on photo';
     15$lang['Community'] = 'Community';
    1516$lang['Light mode'] = 'Light mode';
    1617$lang['When light mode is activated no external script is loaded, it <b>speeds up the load of the page and disables user tracking</b> but also disables annotations and in-page popups.'] = 'When light mode is activated no external script is loaded, it <b>speeds up the load of the page and disables user tracking</b> but also disables annotations and in-page popups.';
  • extensions/SocialButtons/language/fr_FR/plugin.lang.php

    r24757 r24758  
    1515$lang['on photo and album'] = 'sur les photos et les albums';
    1616$lang['only on photo'] = 'uniquement sur les photos';
     17$lang['Community'] = 'Communauté';
    1718$lang['Light mode'] = 'Mode léger';
    1819$lang['When light mode is activated no external script is loaded, it <b>speeds up the load of the page and disables user tracking</b> but also disables annotations and in-page popups.'] = 'Quand le mode léger est activé aucun script externe n\'est chargé, celà <b>accélère le chargement de la page est désactive le tracking des utilisateurs</b> mais désactive aussi les annotations et les popups détaillés.';
  • extensions/SocialButtons/main.inc.php

    r24757 r24758  
    153153    socialbutt_pinterest($basename, $root_url, $tpl_vars, $buttons);
    154154  }
     155  if ($conf['SocialButtons']['reddit']['enabled'])
     156  {
     157    include_once(SOCIALBUTT_PATH . 'include/reddit.inc.php');
     158    socialbutt_reddit($basename, $root_url, $tpl_vars, $buttons);
     159  }
    155160 
    156161  unset_make_full_url();
  • extensions/SocialButtons/template/admin.tpl

    r24757 r24758  
    337337</div> {* <!-- tumblr --> *}
    338338
     339<div class="socialbutt {if not $reddit.enabled}disabled{else}enabled{/if}"> {* <!-- reddit --> *}
     340<table>
     341  <thead>
     342    <tr><td colspan="2">
     343      <label title="{if $reddit.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
     344        <img src="{$SOCIALBUTT_PATH}template/images/reddit_logo.png"/>
     345        <input class="enable" style="display:none;" type="checkbox" name="reddit[enabled]" {if $reddit.enabled}checked="checked"{/if}/>
     346      </label>
     347    </td></tr>
     348  </thead>
     349  <tbody>
     350    <tr class="property">
     351      <td>
     352        {'Button type'|@translate}
     353      </td>
     354      <td></td>
     355    </tr>
     356    <tr class="button">
     357      <td><label>
     358        <img src="http://fr.reddit.com/static/spreddit7.gif"/>
     359        <input type="radio" name="reddit[type]" value="spreddit7" {if $reddit.type=='spreddit7'}checked="checked"{/if}/>
     360      </label></td>
     361      <td><label>
     362        <input type="radio" name="reddit[type]" value="spreddit6" {if $reddit.type=='spreddit6'}checked="checked"{/if}/>
     363        <img src="http://fr.reddit.com/static/spreddit6.gif"/>
     364      </label></td>
     365    </tr>
     366    <tr class="button">
     367      <td><label>
     368        <img src="http://fr.reddit.com/static/spreddit1.gif"/>
     369        <input type="radio" name="reddit[type]" value="spreddit1" {if $reddit.type=='spreddit1'}checked="checked"{/if}/>
     370      </label></td>
     371      <td><label>
     372        <input type="radio" name="reddit[type]" value="interactive" {if $reddit.type=='interactive'}checked="checked"{/if}/>
     373        <img src="{$SOCIALBUTT_PATH}template/images/reddit_interactive.png"/>
     374      </label></td>
     375    </tr>
     376    <tr class="property">
     377      <td>
     378        <label for="reddit_community">{'Community'|@translate}</label>
     379      </td>
     380      <td>
     381        <input type="text" id="reddit_community" name="reddit[community]" value="{$reddit.community}"/>
     382      </td>
     383    </tr>
     384  </tbody>
     385</table>
     386</div> {* <!-- tumblr --> *}
     387
    339388<br>
    340389
Note: See TracChangeset for help on using the changeset viewer.