Changeset 16698
- Timestamp:
- Jul 13, 2012, 8:49:13 PM (12 years ago)
- Location:
- extensions/UserCollections
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserCollections/include/events.inc.php
r16688 r16698 89 89 90 90 // get existing collections 91 if (empty($UserCollection) and ($col_id = get_current_collection_id(false)) !== false) 91 $col_id = get_current_collection_id(false); 92 if (empty($UserCollection) and $col_id !== false) 92 93 { 93 94 $UserCollection = new UserCollection($col_id); … … 101 102 { 102 103 $collection = array(); 104 } 105 106 // if the collection is created we don't use AJAX to force menu refresh 107 if ($col_id === false) 108 { 109 $template->assign('NO_AJAX', true); 103 110 } 104 111 … … 196 203 if (is_a_guest()) return; 197 204 198 global $user;199 200 205 $menu = &$menu_ref_arr[0]; 201 206 if ($menu->get_id() != 'menubar') return; 202 203 $query = ' 204 SELECT id 205 FROM '.COLLECTIONS_TABLE.' 206 WHERE user_id = '.$user['id'].' 207 LIMIT 1 208 ;'; 209 $result = pwg_query($query); 210 211 if (!pwg_db_num_rows($result)) return; 212 207 213 208 $menu->register_block(new RegisteredBlock('mbUserCollection', l10n('Collections'), 'UserCollection')); 214 209 } -
extensions/UserCollections/language/en_UK/plugin.lang.php
r16688 r16698 4 4 $lang['Public collection'] = 'Public'; 5 5 $lang['Copy to clipboard'] = 'Copy to clipboard'; 6 $lang['Return to collections list'] = 'Return to collectionslist';6 $lang['Return to collections list'] = 'Return to list'; 7 7 $lang['This collection is empty'] = 'This collection is empty'; 8 8 $lang['Collection name:'] = 'Collection name:'; … … 21 21 $lang['Add to collection'] = 'Add to collection'; 22 22 $lang['Clear collection'] = 'Clear'; 23 $lang['You have %d collection'] = 'You have %d collection'; 24 $lang['You have no collection'] = 'You have no collection'; 23 25 $lang['You have %d collections'] = 'You have %d collections'; 24 26 $lang['active'] = 'active'; -
extensions/UserCollections/language/fr_FR/plugin.lang.php
r16688 r16698 21 21 $lang['Add to collection'] = 'Ajouter à la collection'; 22 22 $lang['Clear collection'] = 'Vider'; 23 $lang['You have %d collection'] = 'Vous avez %d collection'; 24 $lang['You have no collection'] = 'Vous n\'avez aucune collection'; 23 25 $lang['You have %d collections'] = 'Vous avez %d collections'; 24 26 $lang['active'] = 'active'; -
extensions/UserCollections/template/edit.tpl
r16688 r16698 77 77 78 78 79 <form id="actions" style="text-align:center;"> 80 <input type="submit" data-href="{$collection.U_CLEAR}" value="{'Clear collection'|@translate}"> 81 <input type="submit" data-href="{$collection.U_DELETE}" value="{'Delete'|@translate}"> 82 </form> 83 84 79 85 {if $collection.NB_IMAGES > 0} 80 86 <ul class="thumbnails" id="thumbnails"> … … 86 92 87 93 {if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} 88 89 90 <form id="actions" style="text-align:center;">91 <input type="submit" data-href="{$collection.U_CLEAR}" value="{'Clear collection'|@translate}">92 <input type="submit" data-href="{$collection.U_DELETE}" value="{'Delete'|@translate}">93 </form>94 94 {/if} 95 95 -
extensions/UserCollections/template/menublock_user_collec.tpl
r16688 r16698 1 1 <dt>{$block->get_title()}</dt> 2 2 <dd> 3 <p><a href="{$block->data.U_LIST}">{'You have %d collections'|@translate|sprintf:$block->data.NB_COL}</a></p> 3 <p> 4 {if $block->data.NB_COL == 0} 5 {'You have no collection'|@translate|sprintf:$block->data.NB_COL} 6 {else} 7 <a href="{$block->data.U_LIST}">{$pwg->l10n_dec('You have %d collection', 'You have %d collections', $block->data.NB_COL)}</a> 8 {/if}</p> 4 9 {if $block->data.collections} 5 10 <ul>{strip} -
extensions/UserCollections/template/thumbnails_css_js.tpl
r16688 r16698 5 5 {/html_style} 6 6 7 {if not $NO_AJAX} 7 8 {footer_script require='jquery'} 8 9 jQuery(".addCollection").click(function() {ldelim} … … 21 22 {if $COL_ID} 22 23 $trigger.parent(".wrap1").hide("fast", function() {ldelim} $trigger.remove() }); 24 if (typeof batchdown_count != 'undefined') batchdown_count-=1; 23 25 {else} 24 26 $trigger.html('{'Add to collection'|@translate} <img src="{$USER_COLLEC_PATH}template/image_add.png" title="{'Add to collection'|@translate}">'); … … 33 35 }); 34 36 {/footer_script} 37 {/if}
Note: See TracChangeset
for help on using the changeset viewer.