Commit 303a41c4 authored by Adrien Dorsaz's avatar Adrien Dorsaz

Merge branch 'sharleed'

parents 94ff66c9 6488d412
{
"P_SHARLEED_SHARE_WITH_SHAARLI":"Share with Shaarli",
"P_SHARLEED_SHAARLI_EXCLAMATION":"Shaarli !",
"P_SHARLEED_SHAARLI":"Shaarli",
"P_SHARLEED_PLUGIN_TITLE":"Shaarli plugin",
"P_SHARLEED_SHAARLI_LINK":"Your Shaarli link :",
"P_SHARLEED_SAVE":"Save",
"P_SHARLEED_NB":"NB:",
"P_SHARLEED_NB_INFO":"This option will display a button beside every news to save it on your Shaarli service.",
"P_SHARLEED_CONNECTION_ERROR":"You have to be logged for this action."
}
{
"P_SHARLEED_SHARE_WITH_SHAARLI":"partager sur Shaarli",
"P_SHARLEED_SHAARLI_EXCLAMATION":"Shaare !",
"P_SHARLEED_SHAARLI":"Shaarli",
"P_SHARLEED_PLUGIN_TITLE":"Plugin Shaarli",
"P_SHARLEED_SHAARLI_LINK":"Lien vers votre Shaarli :",
"P_SHARLEED_SAVE":"Enregistrer",
"P_SHARLEED_NB":"NB:",
"P_SHARLEED_NB_INFO":"Cette option affichera un bouton à côté de chaque news pour vous proposer de la partager/stocker sur le gestionnaire de liens shaarli.",
"P_SHARLEED_CONNECTION_ERROR":"Vous devez être connecté pour cette action."
}
......@@ -4,7 +4,7 @@
@author Idleman <idleman@idleman.fr>
@link http://blog.idleman.fr
@licence WTFPL
@version 3.0.1
@version 3.0.2
@description Le plugin Shaarleed permet de partager un lien d'evenement directement sur son script <a target="_blank" href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli">shaarli</a>
*/
......@@ -22,12 +22,12 @@ function shaarleed_plugin_button(&$event){
$title = $result[1];
echo '
<a title="partager sur shaarli" target="_blank" href="'.$shareOption.'?post='.rawurlencode($link).'&title='.$title.'&amp;source=bookmarklet">Shaare!</a>
<a title="'._t('P_SHARLEED_SHARE_WITH_SHAARLI').'" target="_blank" href="'.$shareOption.'?post='.rawurlencode($link).'&title='.$title.'&amp;source=bookmarklet">'._t('P_SHARLEED_SHAARLI_EXCLAMATION').'</a>
';
}
function shaarleed_plugin_setting_link(&$myUser){
echo '<li><a class="toggle" href="#shaarli">Shaarli</a></li>';
echo '<li><a class="toggle" href="#shaarli">'._t('P_SHARLEED_SHAARLI_EXCLAMATION').'</a></li>';
}
function shaarleed_plugin_setting_bloc(&$myUser){
......@@ -36,20 +36,23 @@ function shaarleed_plugin_setting_bloc(&$myUser){
echo '
<section id="shaarli" name="shaarli" class="shaarli">
<form action="action.php?action=shaarleed_update" method="POST">
<h2>Plugin Shaarli</h2>
<h2>'._t('P_SHARLEED_PLUGIN_TITLE').'</h2>
<p class="shaarliBlock">
<label for="plugin_shaarli_link">Lien vers votre shaarli :</label>
<label for="plugin_shaarli_link">'._t('P_SHARLEED_SHAARLI_LINK').'</label>
<input style="width:50%;" type="text" placeholder="http://mon.domaine.com/shaarli/" value="'.$configurationManager->get('plugin_shaarli_link').'" id="plugin_shaarli_link" name="plugin_shaarli_link" />
<input type="submit" class="button" value="Enregistrer"><br/>
<input type="submit" class="button" value="'._t('P_SHARLEED_SAVE').'"><br/>
</p>
<strong>Nb:</strong> cette option affichera un bouton à côté de chaque news pour vous proposer de la partager/stocker sur le gestionnaire de liens shaarli.
<strong>'._t('P_SHARLEED_NB').'</strong> '._t('P_SHARLEED_NB_INFO').'
</form>
</section>
';
}
function shaarleed_plugin_update($_){
$myUser = (isset($_SESSION['currentUser'])?unserialize($_SESSION['currentUser']):false);
if($myUser===false) exit(_t('P_SHARLEED_CONNECTION_ERROR'));
if($_['action']=='shaarleed_update'){
$configurationManager = new Configuration();
$configurationManager->put('plugin_shaarli_link',$_['plugin_shaarli_link']);
......@@ -64,4 +67,4 @@ Plugin::addHook('setting_post_link', 'shaarleed_plugin_setting_link');
Plugin::addHook('setting_post_section', 'shaarleed_plugin_setting_bloc');
Plugin::addHook("action_post_case", "shaarleed_plugin_update");
?>
\ No newline at end of file
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment