Last change
on this file since 29019 was
27486,
checked in by ddtddt, 11 years ago
|
[extensions] - see_my_photos - change permission - link
|
File size:
1.0 KB
|
Line | |
---|
1 | <?php |
---|
2 | load_language('plugin.lang', SMP_PATH); |
---|
3 | |
---|
4 | global $page, $conf, $user; |
---|
5 | $forbidden = get_sql_condition_FandF( |
---|
6 | array( 'visible_images' => 'id' ), |
---|
7 | 'AND' |
---|
8 | ); |
---|
9 | $page['section'] = 'see_my_photos'; |
---|
10 | $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator']. '<a href="'.get_absolute_root_url().'index.php?/see_my_photos">'.l10n('My photos').'</a>'; |
---|
11 | |
---|
12 | $query = ' |
---|
13 | SELECT DISTINCT(id) |
---|
14 | FROM '.IMAGES_TABLE.' |
---|
15 | INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id |
---|
16 | '.get_sql_condition_FandF |
---|
17 | ( |
---|
18 | array |
---|
19 | ( |
---|
20 | 'forbidden_categories' => 'category_id', |
---|
21 | 'visible_categories' => 'category_id', |
---|
22 | 'visible_images' => 'id' |
---|
23 | ), |
---|
24 | 'WHERE' |
---|
25 | ).' |
---|
26 | AND added_by = \''.$user['id'].'\' |
---|
27 | '.$conf['order_by'].' |
---|
28 | ;'; |
---|
29 | $page = array_merge |
---|
30 | ( |
---|
31 | $page, |
---|
32 | array |
---|
33 | ( |
---|
34 | 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'.l10n('See photos by author').'</a>', |
---|
35 | 'items' => array_from_query($query, 'id'), |
---|
36 | ) |
---|
37 | ); |
---|
38 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.