Changeset 2194
- Timestamp:
- 04/15/10 23:52:50 (13 years ago)
- Location:
- plugins/atReply
- Files:
-
- 2 added
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
plugins/atReply/_admin.php
r1607 r2194 3 3 # 4 4 # This file is part of @ Reply, a plugin for Dotclear 2 5 # Copyright 2008,2009 Moe (http://gniark.net/) and buns5 # Copyright 2008,2009,2010 Moe (http://gniark.net/) and buns 6 6 # 7 7 # @ Reply is free software; you can redistribute it and/or modify -
plugins/atReply/_define.php
r1494 r2194 3 3 # 4 4 # This file is part of @ Reply, a plugin for Dotclear 2 5 # Copyright 2008,2009 Moe (http://gniark.net/) and buns5 # Copyright 2008,2009,2010 Moe (http://gniark.net/) and buns 6 6 # 7 7 # @ Reply is free software; you can redistribute it and/or modify … … 30 30 /* Description*/ 'Easily reply to comments', 31 31 /* Author */ 'Moe (http://gniark.net/) append extension by buns.fr', 32 /* Version */ '1.4 ',32 /* Version */ '1.4.1-alpha1', 33 33 /* Permissions */ 'admin' 34 34 ); -
plugins/atReply/_public.php
r1542 r2194 3 3 # 4 4 # This file is part of @ Reply, a plugin for Dotclear 2 5 # Copyright 2008,2009 Moe (http://gniark.net/) and buns5 # Copyright 2008,2009,2010 Moe (http://gniark.net/) and buns 6 6 # 7 7 # @ Reply is free software; you can redistribute it and/or modify … … 37 37 class AtReplyTpl 38 38 { 39 public static function templateBeforeValue( &$core,$v,$attr)39 public static function templateBeforeValue($core,$v,$attr) 40 40 { 41 41 if ($v == 'CommentAuthorLink') … … 47 47 } 48 48 49 public static function templateAfterValue( &$core,$v,$attr)49 public static function templateAfterValue($core,$v,$attr) 50 50 { 51 51 if ($v == 'CommentAuthorLink') … … 55 55 } 56 56 57 public static function publicHeadContent( &$core)57 public static function publicHeadContent($core) 58 58 { 59 $set tings= $core->blog->settings;59 $set = $core->blog->settings; 60 60 61 # default image 62 $image_url = $core->blog->getQmarkURL().'pf=atReply/img/reply.png'; 63 61 $QmarkURL = $core->blog->getQmarkURL(); 62 64 63 # personalized image 65 if (strlen($settings->atreply_color) > 1) 64 if ((strlen($set->atreply_color) > 1) 65 && (file_exists($core->blog->public_path.'/atReply/reply.png'))) 66 66 { 67 $ personalized_image = $settings->public_url.68 '/atReply/reply.png';69 if (file_exists($core->blog->public_path.'/atReply/reply.png'));70 71 $image_url = $personalized_image;72 }67 $image_url = $set->public_url.'/atReply/reply.png'; 68 } 69 else 70 { 71 # default image 72 $image_url = $QmarkURL.'pf=atReply/img/reply.png'; 73 73 } 74 74 75 $title = (($set tings->atreply_display_title) ? 'true' : 'false');75 $title = (($set->atreply_display_title) ? 'true' : 'false'); 76 76 77 # Javascript variables77 # Javascript 78 78 echo( 79 79 '<script type="text/javascript">'."\n". … … 89 89 '\'<span class="at_reply_title" style="display:none;">\'+'. 90 90 'atReplyTitle+\'</span></a>\';'."\n". 91 'var atreply_append = '.($ core->blog->settings->atreply_append ? '1' : '0').';'."\n".92 'var atreply_show_switch = '.($ core->blog->settings->atreply_show_switch ? '1' : '0').';'."\n".91 'var atreply_append = '.($set->atreply_append ? '1' : '0').';'."\n". 92 'var atreply_show_switch = '.($set->atreply_show_switch ? '1' : '0').';'."\n". 93 93 '//]]>'."\n". 94 '</script>'."\n". 95 '<script type="text/javascript" src="'.$core->blog->getQmarkURL(). 96 'pf=atReply/atReply.js'.'"></script>'."\n"); 94 '</script>'."\n" 95 ); 97 96 98 if ($ core->blog->settings->atreply_append)97 if ($set->atreply_append) 99 98 { 100 99 echo ( 101 '<script type="text/javascript" src="'.$ core->blog->getQmarkURL().102 'pf=atReply/ atReplyThread.js'.'"></script>'."\n".100 '<script type="text/javascript" src="'.$QmarkURL. 101 'pf=atReply/js/atReplyThread.js'.'"></script>'."\n". 103 102 '<style type="text/css"> 104 103 <!-- … … 117 116 } 118 117 --> 119 </style>'. 120 "\n");118 </style>'."\n" 119 ); 121 120 } 121 122 echo('<script type="text/javascript" src="'.$QmarkURL. 123 'pf=atReply/js/atReply.js'.'"></script>'."\n"); 122 124 } 123 125 124 public static function publicCommentBeforeContent( &$core, &$ctx)126 public static function publicCommentBeforeContent($core,$ctx) 125 127 { 126 echo '<span id="atReplyComment'.$ctx->comments->f('comment_id'). '" style="display:none;"></span>';127 128 echo '<span id="atReplyComment'.$ctx->comments->f('comment_id'). 129 '" style="display:none;"></span>'; 128 130 } 129 131 } -
plugins/atReply/index.php
r1608 r2194 3 3 # 4 4 # This file is part of @ Reply, a plugin for Dotclear 2 5 # Copyright 2008,2009 Moe (http://gniark.net/) and buns5 # Copyright 2008,2009,2010 Moe (http://gniark.net/) and buns 6 6 # 7 7 # @ Reply is free software; you can redistribute it and/or modify … … 44 44 'string','@ Reply arrow\'s color'); 45 45 $settings->put('atreply_append',!empty($_POST['atreply_append']), 46 ' string','Append replies to appropriate comments');46 'boolean','Append replies to appropriate comments'); 47 47 $settings->put('atreply_show_switch',!empty($_POST['atreply_show_switch']), 48 ' string','Display a switch to toggle threading');48 'boolean','Display a switch to toggle threading'); 49 49 50 50 # inspired by lightbox/admin.php … … 152 152 # public_path is located at the root of the website 153 153 $image_url = $core->blog->host.'/'.$personalized_image; 154 } 155 elseif (substr($settings->public_url,0,4) == 'http') 156 { 157 $image_url = $personalized_image; 154 158 } else { 155 159 $image_url = $core->blog->url.$personalized_image; … … 207 211 </label> 208 212 </p> 213 <p class="form-note"> 214 <?php printf(__('Requires %s.'), 215 __('Append replies to appropriate comments')); ?> 216 </p> 209 217 210 218 <p> … … 216 224 </p> 217 225 <p class="form-note"> 218 <?php echo(__('Leave empty to cancelthis feature.').' '.226 <?php echo(__('Leave blank to disable this feature.').' '. 219 227 __('The default image will be used.')); ?> 220 228 </p> -
plugins/atReply/js/atReplyThread.js
r1542 r2194 7 7 8 8 $(document).ready(function () { 9 if (atreply_show_switch) setSwitchTag();9 if (atreply_show_switch) {setSwitchTag();} 10 10 getCommentsChildren(); 11 if (atreply_append) appendReplies(atreply_append);11 if (atreply_append) {appendReplies(atreply_append);} 12 12 }); 13 13 … … 147 147 } 148 148 } 149 atReplySimple();149 //atReplySimple(); 150 150 } 151 151 -
plugins/atReply/locales/fr/main.po
r1611 r2194 85 85 msgstr "Enregistrer la configuration" 86 86 87 #~ msgid "Enable %s"88 #~ msgstr "Activer %s"87 msgid "Requires %s." 88 msgstr "Nécessite %s." 89 89
Note: See TracChangeset
for help on using the changeset viewer.