Changeset 9766 for extensions
- Timestamp:
- Mar 19, 2011, 10:39:36 AM (13 years ago)
- Location:
- extensions/Comments_on_Albums
- Files:
-
- 4 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Comments_on_Albums/admin/config.php
r9641 r9766 6 6 // +-----------------------------------------------------------------------+ 7 7 if (isset($_POST['config_submit'])) { 8 $ user_config= array(8 $conf['comments_on_albums'] = array( 9 9 'icon_color' => $_POST['icon_color'], 10 10 'icon_color_over' => $_POST['icon_color_over'], 11 11 ); 12 12 13 pwg_query("UPDATE " . CONFIG_TABLE . " SET `value` = '" . serialize($ user_config) . "' WHERE `param` = 'comments_on_albums';");14 redirect(COA_ADMIN . '-config&msg=saved');13 pwg_query("UPDATE " . CONFIG_TABLE . " SET `value` = '" . serialize($conf['comments_on_albums']) . "' WHERE `param` = 'comments_on_albums';"); 14 array_push($page['infos'], l10n('Information data registered in database')); 15 15 } 16 16 17 17 18 // +-----------------------------------------------------------------------+ 18 19 // Template 19 20 // +-----------------------------------------------------------------------+ 20 if (isset($_GET['msg']) AND $_GET['msg'] == 'saved') {21 array_push($page['infos'], l10n('Information data registered in database'));22 }23 21 24 22 // available icons 25 23 $dh = opendir(COA_PATH . 'template/s26'); 26 24 while (($file = readdir($dh)) !== false ) { 27 if ($file !== '.' && $file !== '..') {28 $color = preg_replace('#^outline\_([a-f0-9]{6})\.png$#', '$1', $file);29 $template->append('COLORS', $ color);25 if ($file !== '.' AND $file !== '..' 26 AND in_array(strtolower(end(explode('.', $file))), array('jpg', 'png', 'gif'))) { 27 $template->append('COLORS', $file); 30 28 } 31 29 } 32 30 closedir($dh); 33 31 34 35 32 $template->assign(array( 36 33 'ICON_COLOR' => $conf['comments_on_albums']['icon_color'], … … 38 35 )); 39 36 40 41 37 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/config.tpl')); 42 38 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 39 43 40 ?> -
extensions/Comments_on_Albums/admin/template/config.tpl
r9641 r9766 1 {combine_script id='jquery' path='themes/default/js/jquery.min.js'} 2 {combine_script id='jquery.cluetip' path='themes/default/js/plugins/jquery.cluetip.js'} 1 {combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'} 3 2 {combine_css path=$COA_PATH|@cat:'admin/template/style.css'} 4 3 5 {footer_script }4 {footer_script require='jquery'} 6 5 {literal} 7 6 jQuery().ready(function(){ … … 13 12 {/literal} 14 13 jQuery('select').change(function() {ldelim} 15 jQuery('#' + jQuery(this).attr('name') + '_live').attr('src', '{$COA_PATH}template/s26/ outline_' + jQuery(this).val() + '.png');14 jQuery('#' + jQuery(this).attr('name') + '_live').attr('src', '{$COA_PATH}template/s26/' + jQuery(this).val()); 16 15 }); 17 16 }); 18 19 17 {/footer_script} 20 18 … … 42 40 <select name="icon_color"> 43 41 {foreach from=$COLORS item=COLOR} 44 <option value="{$COLOR}" style="color:#{$COLOR};"{if $COLOR == $ICON_COLOR}selected="selected"{/if}>{$COLOR}</option>42 <option value="{$COLOR}" {if $COLOR == $ICON_COLOR}selected="selected"{/if}>{$COLOR}</option> 45 43 {/foreach} 46 44 </select> 47 45 48 <img id="icon_color_live" class="pwg-icon" src="{$COA_PATH}template/s26/ outline_{$ICON_COLOR}.png"/>46 <img id="icon_color_live" class="pwg-icon" src="{$COA_PATH}template/s26/{$ICON_COLOR}"/> 49 47 </td> 50 48 </tr> … … 58 56 </select> 59 57 60 <img id="icon_color_over_live" class="pwg-icon" src="{$COA_PATH}template/s26/ outline_{$ICON_COLOR_OVER}.png"/>58 <img id="icon_color_over_live" class="pwg-icon" src="{$COA_PATH}template/s26/{$ICON_COLOR_OVER}"/> 61 59 </td> 62 60 </tr> -
extensions/Comments_on_Albums/changelog.txt
r9641 r9766 1 1.0 2 - first public version 3 - compatible with BBCode Bar and/or Smilies Support 4 - better css integration 5 1 6 0.3 2 7 - stable version -
extensions/Comments_on_Albums/include/coa_admin_comments.php
r9641 r9766 92 92 93 93 $query = 'SELECT 94 c .id,95 c .category_id,96 c .date,97 c .author,94 com.id, 95 com.category_id, 96 com.date, 97 com.author, 98 98 '.$conf['user_fields']['username'].' AS username, 99 c .content,100 i.name101 FROM '.COA_TABLE.' AS c 102 INNER JOIN '.CATEGORIES_TABLE.' AS i103 ON i.id = c.category_id99 com.content, 100 cat.name 101 FROM '.COA_TABLE.' AS com 102 INNER JOIN '.CATEGORIES_TABLE.' AS cat 103 ON cat.id = com.category_id 104 104 LEFT JOIN '.USERS_TABLE.' AS u 105 ON u.'.$conf['user_fields']['id'].' = c .author_id105 ON u.'.$conf['user_fields']['id'].' = com.author_id 106 106 WHERE validated = \'false\' 107 ORDER BY c .date DESC107 ORDER BY com.date DESC 108 108 ;'; 109 109 $result = pwg_query($query); 110 110 111 111 while ($row = pwg_db_fetch_assoc($result)) { 112 // author 112 113 if (empty($row['author_id'])) { 113 114 $author_name = $row['author']; … … 116 117 } 117 118 119 // comment content 118 120 $template->append('comments', array( 119 121 'CAT_URL' => PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id='.$row['category_id'], -
extensions/Comments_on_Albums/include/coa_albums.php
r9641 r9766 154 154 $query = 'SELECT 155 155 com.id, 156 author,157 author_id,156 com.author, 157 com.author_id, 158 158 '.$conf['user_fields']['username'].' AS username, 159 date,160 c ategory_id,161 co ntent,162 validated159 com.date, 160 com.category_id, 161 com.content, 162 com.validated 163 163 FROM '.COA_TABLE.' AS com 164 164 LEFT JOIN '.USERS_TABLE.' AS u -
extensions/Comments_on_Albums/include/coa_comments_page.php
r9641 r9766 27 27 <style type="text/css"> 28 28 .pwg-icon-comments-albums {ldelim} 29 background-image: url({$COA_PATH}template/s26/ outline_{$ICON_COLOR}.png);29 background-image: url({$COA_PATH}template/s26/{$ICON_COLOR}); 30 30 background-position: -26px 0; 31 31 } 32 32 a:hover .pwg-icon-comments-albums {ldelim} 33 background-image: url({$COA_PATH}template/s26/ outline_{$ICON_COLOR_OVER}.png);33 background-image: url({$COA_PATH}template/s26/{$ICON_COLOR_OVER}); 34 34 background-position: -26px 0; 35 35 } … … 148 148 com.author, 149 149 com.author_id, 150 '.$conf['user_fields']['username'].' AS username, 150 151 com.date, 151 152 com.content, … … 198 199 199 200 foreach ($comments as $comment) { 200 // c omment content201 // category 201 202 $name = $categories[$comment['comment_id']]['name']; 202 203 $url = duplicate_index_url(array( … … 207 208 ),array('start') 208 209 )); 210 211 // comment content 209 212 $tpl_comment = array( 210 213 'CAT_URL' => $url, -
extensions/Comments_on_Albums/language/en_UK/plugin.lang.php
r9641 r9766 10 10 $lang['COA_icon_over'] = 'Over state'; 11 11 12 $lang['COA_help_icon_pack'] = "Select which icons must be used on the main Comments page. ";/*<br>12 $lang['COA_help_icon_pack'] = "Select which icons must be used on the main Comments page.<br> 13 13 <br> 14 You can add your owns in the folder <i>plugins/comments_on_pictures/template/s26</i>.<br> 15 Please respect the name scheme !";*/ 14 You can add your owns in the folder <i>plugins/comments_on_pictures/template/s26</i>."; 16 15 17 16 ?> -
extensions/Comments_on_Albums/language/fr_FR/plugin.lang.php
r9641 r9766 10 10 $lang['COA_icon_over'] = 'Etat haut'; 11 11 12 $lang['COA_help_icon_pack'] = "Selectionnez les icônes à utiliser sur la page principale des commentaires ";/*<br>12 $lang['COA_help_icon_pack'] = "Selectionnez les icônes à utiliser sur la page principale des commentaires<br> 13 13 <br> 14 Vous pouvez ajouter les votres dans le dossier <i>plugins/comments_on_pictures/template/s26</i>.<br> 15 Attention à respecter le même nommage !";*/ 14 Vous pouvez ajouter les votres dans le dossier <i>plugins/comments_on_pictures/template/s26</i>."; 16 15 17 16 ?> -
extensions/Comments_on_Albums/language/hu_HU/plugin.lang.php
r9656 r9766 10 10 $lang['COA_icon_over'] = 'Bővített állapot'; 11 11 12 $lang['COA_help_icon_pack'] = "Ki kell választani a Hozzászólások fő oldalon megjelenítendő ikonokat. ";/*<br>12 $lang['COA_help_icon_pack'] = "Ki kell választani a Hozzászólások fő oldalon megjelenítendő ikonokat.<br> 13 13 <br> 14 Hozzáadhatsz saját mappát a <i>plugins/comments_on_pictures/template/s26</i> könyvtárhoz.<br> 15 Légy tekintettel az azonos név sémára !";*/ 14 Hozzáadhatsz saját mappát a <i>plugins/comments_on_pictures/template/s26</i> könyvtárhoz."; 16 15 17 16 ?> -
extensions/Comments_on_Albums/main.inc.php
r9641 r9766 2 2 /* 3 3 Plugin Name: Comments on Albums 4 Version: 0.34 Version: 1.0 5 5 Description: Activate comments on albums pages 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=512 … … 17 17 // +-----------------------------------------------------------------------+ 18 18 define('COA_NAME' , 'Comments on Albums'); 19 define('COA_VERSION', ' 0.3');19 define('COA_VERSION', '1.0'); 20 20 define('COA_DIR' , basename(dirname(__FILE__))); 21 21 define('COA_PATH' , PHPWG_PLUGINS_PATH . COA_DIR . '/'); … … 38 38 39 39 function COA_index() { 40 global $template, $page, $conf ;40 global $template, $page, $conf, $pwg_loaded_plugins; 41 41 42 42 if ($page['section'] == 'categories' AND isset($page['category'])) { 43 if (isset($pwg_loaded_plugins['bbcode_bar'])) set_bbcode_bar(); 44 else if (isset($pwg_loaded_plugins['SmiliesSupport']))set_smiliessupport_page(); 45 43 46 include(COA_PATH . 'include/coa_albums.php'); 44 47 } -
extensions/Comments_on_Albums/maintain.inc.php
r9641 r9766 4 4 // Default configuration 5 5 define('default_config', serialize(array( 6 'icon_color' => ' ff3363',7 'icon_color_over' => ' ff7700',6 'icon_color' => 'outline_ff3363.png', 7 'icon_color_over' => 'outline_ff7700.png', 8 8 ))); 9 9 -
extensions/Comments_on_Albums/template/coa_albums.tpl
r9641 r9766 3 3 {combine_script id="jquery"} 4 4 {combine_css path=$COA_PATH|@cat:'template/style_albums.css'} 5 6 {footer_script require="jquery"}{literal} 7 // cancel all color changements and set default color to comments 8 jQuery('.thumbnailCategory').css('color', jQuery('body').css('color')); 9 {/literal}{/footer_script} 5 {if $themeconf.name == 'Sylvia'}{combine_css path=$COA_PATH|@cat:'template/style_albums_sylvia.css'}{/if} 10 6 11 7 <a name="comments"></a> -
extensions/Comments_on_Albums/template/coa_comments_page.tpl
r9641 r9766 6 6 <style type="text/css"> 7 7 .pwg-icon-comments-images {ldelim} 8 background-image: url({$COA_PATH}template/s26/ outline_{$ICON_COLOR}.png);8 background-image: url({$COA_PATH}template/s26/{$ICON_COLOR}); 9 9 background-position: 0 0; 10 10 } 11 11 a:hover .pwg-icon-comments-images {ldelim} 12 background-image: url({$COA_PATH}template/s26/ outline_{$ICON_COLOR_OVER}.png);12 background-image: url({$COA_PATH}template/s26/{$ICON_COLOR_OVER}); 13 13 background-position: 0 0; 14 14 } -
extensions/Comments_on_Albums/template/style_albums.css
r9634 r9766 7 7 } 8 8 9 #comments .thumbnailCategory {10 padding:0px 2px 0px 12px !important;11 border:1px solid grey;12 }13 9 #comments .thumbnailCategories { 14 10 margin-left:5px; 15 11 } 12 #comments .thumbnailCategory { 13 margin:2px 0; 14 } 16 15 17 #comments .thumbnailCategories li:hover,18 #comments .thumbnailCategory:hover,19 #comments .thumbnailCategory:hover A {20 background:none;21 }22 23 16 #comments .thumbnailCategory .date, #comments .thumbnailCategory .author { 24 17 font-weight:bold; -
extensions/Comments_on_Albums/template/style_comments.css
r9641 r9766 1 1 .thumbnailCategory .category-title { 2 position:absolute; 3 margin-top:-5px; 4 font-size:1.2em; 2 font-size:1.1em; 5 3 font-weight:bold; 6 4 }
Note: See TracChangeset
for help on using the changeset viewer.