Dotclear

Changeset 2914


Ignore:
Timestamp:
01/30/11 14:49:58 (12 years ago)
Author:
JcDenis
Message:

optionsForComment 0.2

  • Removed Twitter feature (this this to another plugin to do that)
  • Added behaviors to open plugins (see exemple in plugin dcLibTwitter)
Location:
plugins/optionsForComment
Files:
1 added
2 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • plugins/optionsForComment/_admin.php

    r2676 r2914  
    33# This file is part of optionsForComment, 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/optionsForComment/_define.php

    r2676 r2914  
    33# This file is part of optionsForComment, 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 options on comments", 
    1818     /* Author */             "JC Denis", 
    19      /* Version */            '0.1', 
     19     /* Version */            '0.2', 
    2020     /* Permissions */        'admin' 
    2121); 
     22     /* date */          #20110130 
    2223?> 
  • plugins/optionsForComment/_prepend.php

    r2676 r2914  
    33# This file is part of optionsForComment, 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#  
     
    1818$__autoload['optionsForComment'] = dirname(__FILE__).'/inc/class.optionsforcomment.php'; 
    1919 
    20 # Twitter login 
    21 $__autoload['ofcTwitterLogin'] = dirname(__FILE__).'/inc/lib.ofc.twitterlogin.php'; 
    22 $__autoload['libOfcTwitterLogin'] = dirname(__FILE__).'/inc/lib.ofc.twitterlogin.php'; 
    23 $__autoload['urlOfcTwitterLogin'] = dirname(__FILE__).'/inc/lib.ofc.twitterlogin.php'; 
    24 $core->url->register('ofcTwitterLogin','ofctl','^ofctl$',array('urlOfcTwitterLogin','login')); 
    25 $core->addBehavior('optionsForCommentAdminPrepend',array('ofcTwitterLogin','optionsForCommentAdminPrepend')); 
    26 $core->addBehavior('optionsForCommentAdminHeader',array('ofcTwitterLogin','optionsForCommentAdminHeader')); 
    27 $core->addBehavior('optionsForCommentPublicPrepend',array('ofcTwitterLogin','optionsForCommentPublicPrepend')); 
    28 $core->addBehavior('optionsForCommentPublicCreate',array('ofcTwitterLogin','optionsForCommentPublicCreate')); 
    29 $core->addBehavior('optionsForCommentPublicHead',array('ofcTwitterLogin','optionsForCommentPublicHead')); 
    30 $core->addBehavior('optionsForCommentAdminForm',array('ofcTwitterLogin','optionsForCommentAdminForm')); 
    31 $core->addBehavior('optionsForCommentPublicForm',array('ofcTwitterLogin','optionsForCommentPublicForm')); 
    32 $core->addBehavior('noodlesNoodleImageInfo',array('libOfcTwitterLogin','noodlesNoodleImageInfo')); 
     20# Button Twitter login 
     21// see plugin dcLibTwitter 
    3322 
    3423# Email optionnel 
  • plugins/optionsForComment/_public.php

    r2676 r2914  
    33# This file is part of optionsForComment, 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#  
     
    2626     # Au debut du formulaire publique 
    2727     $core->addBehavior('publicCommentFormBeforeContent',array('optionsForComment','publicCommentFormBeforeContent')); 
     28     # Dans l'entete de la page publique 
     29     $core->addBehavior('publicFooterContent',array('optionsForComment','publicFooterContent')); 
    2830} 
    2931?> 
  • plugins/optionsForComment/inc/class.optionsforcomment.php

    r2676 r2914  
    11<?php 
     2# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# This file is part of optionsForComment, a plugin for Dotclear 2. 
     4#  
     5# Copyright (c) 2009-2011 JC Denis and contributors 
     6# jcdenis@gdwd.com 
     7#  
     8# Licensed under the GPL version 2.0 license. 
     9# A copy of this license is available in LICENSE file or at 
     10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     11# -- END LICENSE BLOCK ------------------------------------ 
     12 
     13if (!defined('DC_RC_PATH')){return;} 
    214 
    315class optionsForComment 
     
    3850               '<style type="text/css">'."\n".$p."</style>\n"; 
    3951          } 
     52           
    4053          # JS class 
    4154          echo  
     
    4558          $js_vars = new ArrayObject(); 
    4659           
    47           $core->callBehavior('optionsForCommentPublicHead',$core,$_ctx,$js_vars); 
     60          $res = $core->callBehavior('optionsForCommentPublicHead',$core,$_ctx,$js_vars); 
    4861           
    4962          echo  
     
    5770          echo  
    5871          "//]]>\n". 
    59           "</script>\n"; 
     72          "</script>\n". 
     73          $res; 
    6074     } 
    6175      
  • plugins/optionsForComment/inc/lib.ofc.anonymouscomment.php

    r2676 r2914  
    11<?php 
     2# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# This file is part of optionsForComment, a plugin for Dotclear 2. 
     4#  
     5# Copyright (c) 2009-2011 JC Denis and contributors 
     6# jcdenis@gdwd.com 
     7#  
     8# Licensed under the GPL version 2.0 license. 
     9# A copy of this license is available in LICENSE file or at 
     10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     11# -- END LICENSE BLOCK ------------------------------------ 
     12 
     13if (!defined('DC_RC_PATH')){return;} 
    214 
    315class ofcAnonymousComment extends optionsForComment 
     
    517     public static function optionsForCommentAdminPrepend($core,$action) 
    618     { 
    7           if ($action != 'savesettings') { 
     19          if (!defined('DC_CONTEXT_ADMIN') || $action != 'savesettings') { 
    820               return; 
    921          } 
     
    1426     public static function optionsForCommentAdminFormMode($core) 
    1527     { 
     28          if (!defined('DC_CONTEXT_ADMIN')){return;} 
     29           
    1630          $p = (boolean) $core->blog->settings->optionsForComment->anonymouscomment; 
    1731           
  • plugins/optionsForComment/inc/lib.ofc.emailoptionnel.php

    r2676 r2914  
    11<?php 
     2# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# This file is part of optionsForComment, a plugin for Dotclear 2. 
     4#  
     5# Copyright (c) 2009-2011 JC Denis and contributors 
     6# jcdenis@gdwd.com 
     7#  
     8# Licensed under the GPL version 2.0 license. 
     9# A copy of this license is available in LICENSE file or at 
     10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     11# -- END LICENSE BLOCK ------------------------------------ 
     12 
     13if (!defined('DC_RC_PATH')){return;} 
    214 
    315class ofcEmailOptionnel extends optionsForComment 
     
    517     public static function optionsForCommentAdminFormMode($core) 
    618     { 
     19          if (!defined('DC_CONTEXT_ADMIN')){return;} 
     20           
    721          $p = $core->blog->settings->optionsForComment->mode == 'emailoptionnel'; 
    822           
     
    1529     public static function optionsForCommentPublicPrepend($core,$rs) 
    1630     { 
     31          if (!defined('DC_CONTEXT_ADMIN')){return;} 
     32           
    1733          if ($core->blog->settings->optionsForComment->mode != 'emailoptionnel'  
    1834           || $rs['c_content'] === null  
  • plugins/optionsForComment/index.php

    r2676 r2914  
    33# This file is part of optionsForComment, 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/optionsForComment/js/ofc.anonymouscomment.js

    r2676 r2914  
     1/* -- BEGIN LICENSE BLOCK ---------------------------------- 
     2 * This file is part of optionsForComment, a plugin for Dotclear 2. 
     3 *  
     4 * Copyright (c) 2009-2011 JC Denis and contributors 
     5 * jcdenis@gdwd.com 
     6 *  
     7 * Licensed under the GPL version 2.0 license. 
     8 * A copy of this license is available in LICENSE file or at 
     9 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     10 * -- END LICENSE BLOCK ------------------------------------*/ 
     11 
    112$(document).ready(ofcAnonymousCommentInit); 
    213 
  • plugins/optionsForComment/js/ofc.emailoptionnel.js

    r2676 r2914  
     1/* -- BEGIN LICENSE BLOCK ---------------------------------- 
     2 * This file is part of optionsForComment, a plugin for Dotclear 2. 
     3 *  
     4 * Copyright (c) 2009-2011 JC Denis and contributors 
     5 * jcdenis@gdwd.com 
     6 *  
     7 * Licensed under the GPL version 2.0 license. 
     8 * A copy of this license is available in LICENSE file or at 
     9 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     10 * -- END LICENSE BLOCK ------------------------------------*/ 
     11 
    112$(document).ready(ofcEmailOptionnel); 
    213 
  • plugins/optionsForComment/js/optionsforcomment.js

    r2676 r2914  
     1/* -- BEGIN LICENSE BLOCK ---------------------------------- 
     2 * This file is part of optionsForComment, a plugin for Dotclear 2. 
     3 *  
     4 * Copyright (c) 2009-2011 JC Denis and contributors 
     5 * jcdenis@gdwd.com 
     6 *  
     7 * Licensed under the GPL version 2.0 license. 
     8 * A copy of this license is available in LICENSE file or at 
     9 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     10 * -- END LICENSE BLOCK ------------------------------------*/ 
     11 
    112$(document).ready(ofcInit); 
    213 
  • plugins/optionsForComment/locales/fr/main.lang.php

    r2676 r2914  
    11<?php 
    22// Language: Français  
    3 // Module: optionsForComment - 0.1-alpha1 
    4 // Date: 2010-09-25 13:30:19  
     3// Module: optionsForComment - 0.2 
     4// Date: 2011-01-29 23:18:33  
    55// Translated with dcTranslater - 1.5  
    66 
    7 #inc/lib.ofc.anonymouscomment.php:21 
     7#inc/lib.ofc.anonymouscomment.php:35 
    88$GLOBALS['__l10n']['Allow anonnymous comments'] = 'Autoriser les commentaires anonymes'; 
    99 
    10 #inc/lib.ofc.anonymouscomment.php:50 
     10#inc/lib.ofc.anonymouscomment.php:64 
    1111$GLOBALS['__l10n']['Somebody'] = 'Quelqu\'un'; 
    1212 
    13 #inc/lib.ofc.anonymouscomment.php:84 
     13#inc/lib.ofc.anonymouscomment.php:98 
    1414$GLOBALS['__l10n']['Anonymous comment'] = 'Commentaire anonyme'; 
    1515 
    16 #inc/lib.ofc.emailoptionnel.php:12 
     16#inc/lib.ofc.emailoptionnel.php:26 
    1717$GLOBALS['__l10n']['Optional email address'] = 'Adresse Email facultative'; 
    18  
    19 #inc/lib.ofc.twitterlogin.php:32 
    20 $GLOBALS['__l10n']['Failed to register plugin'] = 'Impossible d\'enregistrer le plugin'; 
    21  
    22 #inc/lib.ofc.twitterlogin.php:72 
    23 $GLOBALS['__l10n']['To use this option you must install plugin called "TaC".'] = 'Pour utiliser cette option vous devez installer l\'extnesion nommé "TaC".'; 
    24  
    25 #inc/lib.ofc.twitterlogin.php:76 
    26 $GLOBALS['__l10n']['To use this option you must register it into the plugin "TaC".'] = 'Pour utiliser cette option vous devez enregistrer cette extension dans l\'extension "TaC".'; 
    27  
    28 #inc/lib.ofc.twitterlogin.php:77 
    29 $GLOBALS['__l10n']['Register extension'] = 'Enregistrer l\'extension'; 
    30  
    31 #inc/lib.ofc.twitterlogin.php:81 
    32 $GLOBALS['__l10n']['Extension registered into the plugin "TaC".'] = 'Extension enregistrée dans le plugin "TaC".'; 
    33  
    34 #inc/lib.ofc.twitterlogin.php:84 
    35 $GLOBALS['__l10n']['Enable Twitter login on comments'] = 'Autoriser l\'identification depuis Twitter sur les commentaires'; 
    36  
    37 #inc/lib.ofc.twitterlogin.php:176 
    38 $GLOBALS['__l10n']['Logged in as %s'] = 'Connecté en tant que %s'; 
    39  
    40 #inc/lib.ofc.twitterlogin.php:178 
    41 $GLOBALS['__l10n']['Disconnect'] = 'Se déconnecter'; 
    4218 
    4319#index.php:64 
     
    6036 
    6137#index.php:90 
    62 $GLOBALS['__l10n']['Additionnal style sheet:'] = 'Feuille de style additionnelle'; 
     38$GLOBALS['__l10n']['Additionnal style sheet:'] = 'Feuille de style additionnelle :'; 
    6339 
    6440?> 
  • plugins/optionsForComment/locales/fr/main.po

    r2676 r2914  
    11# Language: Français 
    2 # Module: optionsForComment - 0.1-alpha1 
    3 # Date: 2010-09-25 13:30:19 
     2# Module: optionsForComment - 0.2 
     3# Date: 2011-01-29 23:18:33 
    44# Translated with translater 1.5 
    55 
     
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: optionsForComment 0.1-alpha1\n" 
     9"Project-Id-Version: optionsForComment 0.2\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-09-25T13:30:19+00:00\n" 
     11"PO-Revision-Date: 2011-01-29T23:18:33+00:00\n" 
    1212"Last-Translator: JC Denis\n" 
    1313"Language-Team: \n" 
     
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
    17 #: inc/lib.ofc.anonymouscomment.php:21 
     17#: inc/lib.ofc.anonymouscomment.php:35 
    1818msgid "Allow anonnymous comments" 
    1919msgstr "Autoriser les commentaires anonymes" 
    2020 
    21 #: inc/lib.ofc.anonymouscomment.php:50 
     21#: inc/lib.ofc.anonymouscomment.php:64 
    2222msgid "Somebody" 
    2323msgstr "Quelqu'un" 
    2424 
    25 #: inc/lib.ofc.anonymouscomment.php:84 
     25#: inc/lib.ofc.anonymouscomment.php:98 
    2626msgid "Anonymous comment" 
    2727msgstr "Commentaire anonyme" 
    2828 
    29 #: inc/lib.ofc.emailoptionnel.php:12 
     29#: inc/lib.ofc.emailoptionnel.php:26 
    3030msgid "Optional email address" 
    3131msgstr "Adresse Email facultative" 
    32  
    33 #: inc/lib.ofc.twitterlogin.php:32 
    34 msgid "Failed to register plugin" 
    35 msgstr "Impossible d'enregistrer le plugin" 
    36  
    37 #: inc/lib.ofc.twitterlogin.php:72 
    38 msgid "To use this option you must install plugin called \"TaC\"." 
    39 msgstr "Pour utiliser cette option vous devez installer l'extnesion nommé \"TaC\"." 
    40  
    41 #: inc/lib.ofc.twitterlogin.php:76 
    42 msgid "To use this option you must register it into the plugin \"TaC\"." 
    43 msgstr "Pour utiliser cette option vous devez enregistrer cette extension dans l'extension \"TaC\"." 
    44  
    45 #: inc/lib.ofc.twitterlogin.php:77 
    46 msgid "Register extension" 
    47 msgstr "Enregistrer l'extension" 
    48  
    49 #: inc/lib.ofc.twitterlogin.php:81 
    50 msgid "Extension registered into the plugin \"TaC\"." 
    51 msgstr "Extension enregistrée dans le plugin \"TaC\"." 
    52  
    53 #: inc/lib.ofc.twitterlogin.php:84 
    54 msgid "Enable Twitter login on comments" 
    55 msgstr "Autoriser l'identification depuis Twitter sur les commentaires" 
    56  
    57 #: inc/lib.ofc.twitterlogin.php:176 
    58 msgid "Logged in as %s" 
    59 msgstr "Connecté en tant que %s" 
    60  
    61 #: inc/lib.ofc.twitterlogin.php:178 
    62 msgid "Disconnect" 
    63 msgstr "Se déconnecter" 
    6432 
    6533#: index.php:64 
     
    8957#: index.php:90 
    9058msgid "Additionnal style sheet:" 
    91 msgstr "Feuille de style additionnelle" 
     59msgstr "Feuille de style additionnelle :" 
    9260 
  • plugins/optionsForComment/release.txt

    r2676 r2914  
     10.2 20110130 
     2 * Removed Twitter feature (this this to another plugin to do that) 
     3 * Added behaviors to open plugins (see exemple in plugin dcLibTwitter) 
     4 
    150.1 20100927 
    26 * First lab release 
Note: See TracChangeset for help on using the changeset viewer.

Sites map