Changeset 15995
- Timestamp:
- Jun 24, 2012, 1:49:50 PM (12 years ago)
- Location:
- extensions/Comments_on_Albums
- Files:
-
- 7 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Comments_on_Albums/include/functions_comment.inc.php
r15640 r15995 104 104 $_POST['cr'][] = 'key'; 105 105 } 106 107 // anonymous id = ip address 108 $ip_components = explode('.', $comm['ip']); 109 if (count($ip_components) > 3) 110 { 111 array_pop($ip_components); 112 } 113 $comm['anonymous_id'] = implode('.', $ip_components); 106 114 107 115 if ($comment_action!='reject' and $conf['anti-flood_time']>0 and !is_admin()) … … 113 121 WHERE date > '.$reference_date.' 114 122 AND author_id = '.$comm['author_id']; 123 if (!is_classic_user()) 124 { 125 $query.= ' 126 AND anonymous_id = "'.$comm['anonymous_id'].'"'; 127 } 128 $query.= ' 129 ;'; 130 115 131 list($counter) = pwg_db_fetch_row(pwg_query($query)); 116 132 if ( $counter > 0 ) -
extensions/Comments_on_Albums/main.inc.php
r15640 r15995 8 8 Author URI: http://www.strangeplanet.fr 9 9 */ 10 11 ## TODO ##12 // compatibility with Simple when updated to 2.413 // compatibility with Gally when updated to 2.414 10 15 11 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); -
extensions/Comments_on_Albums/maintain.inc.php
r14528 r15995 13 13 `author` varchar(255) DEFAULT NULL, 14 14 `author_id` smallint(5) DEFAULT NULL, 15 `anonymous_id` varchar(45) NOT NULL, 15 16 `content` longtext, 16 17 `validated` enum('true','false') NOT NULL DEFAULT 'false', … … 23 24 function plugin_activate() 24 25 { 25 global $conf ;26 global $conf, $prefixeTable; 26 27 27 28 if (isset($conf['comments_on_albums'])) 28 29 { 29 30 pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param="comments_on_albums" LIMIT 1;'); 31 } 32 33 $query = 'SHOW COLUMNS FROM `' . $prefixeTable . 'comments_categories`;'; 34 $columns = hash_from_query($query, 'Field'); 35 if (!isset($columns['anonymous_id'])) 36 { 37 pwg_query('ALTER TABLE `' . $prefixeTable . 'comments_categories` ADD `anonymous_id` VARCHAR( 45 ) DEFAULT NULL;'); 30 38 } 31 39 } -
extensions/Comments_on_Albums/template/admin_comments.tpl
r14528 r15995 16 16 17 17 jQuery(".checkComment").click(function(event) { 18 var checkbox = jQuery(this).children("input[type=checkbox]"); 18 19 if (event.target.type !== 'checkbox') { 19 var checkbox = jQuery(this).children("input[type=checkbox]");20 20 jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked')); 21 highlighComments();22 21 } 22 highlighComments(); 23 23 }); 24 24 … … 83 83 84 84 </form> 85 {else} 86 {'No pending comment'|@translate} 85 87 {/if}
Note: See TracChangeset
for help on using the changeset viewer.