Last change
on this file since 3636 was
3636,
checked in by tiico, 15 years ago
|
Correct name and description of pictures with extendedDescriotion plugin
|
File size:
1.3 KB
|
Rev | Line | |
---|
[3636] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * Plugin Name: CoolIris-Piclens |
---|
| 4 | * Version: 0.3.4 |
---|
| 5 | * Description: Cooliris/Piclens activation |
---|
| 6 | * Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=234 |
---|
| 7 | * Author: Tiico |
---|
| 8 | * Author URI: |
---|
| 9 | * */ |
---|
| 10 | /********* Fichier fonctions.inc.php *********/ |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | function get_html_exts_selection( |
---|
| 14 | $exts, |
---|
| 15 | $fieldname, |
---|
| 16 | $selecteds = array() |
---|
| 17 | ) |
---|
| 18 | { |
---|
| 19 | global $conf; |
---|
| 20 | if (count ($exts) == 0 ) |
---|
| 21 | { |
---|
| 22 | return ''; |
---|
| 23 | } |
---|
| 24 | $output = '<div id="'.$fieldname.'">'; |
---|
| 25 | $id = 1; |
---|
| 26 | foreach ($exts as $ext) |
---|
| 27 | { |
---|
| 28 | $output.= |
---|
| 29 | |
---|
| 30 | '<input type="checkbox" name="'.$fieldname.'[]"' |
---|
| 31 | .' id="ext_'.$id++.'"' |
---|
| 32 | .' value="'.$ext['tn_ext'].'"' |
---|
| 33 | ; |
---|
| 34 | |
---|
| 35 | if (in_array($ext['tn_ext'], $selecteds)) |
---|
| 36 | { |
---|
| 37 | $output.= ' checked="checked"'; |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | $output.= |
---|
| 41 | '><label>' |
---|
| 42 | .' <b>'. $ext['tn_ext'].'</b> ' |
---|
| 43 | .'</label>' |
---|
| 44 | ."\n" |
---|
| 45 | ; |
---|
| 46 | } |
---|
| 47 | $output.= '</div>'; |
---|
| 48 | |
---|
| 49 | return $output; |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | function get_all_exts() |
---|
| 54 | { |
---|
| 55 | $query = ' |
---|
| 56 | SELECT DISTINCT(tn_ext) |
---|
| 57 | FROM '.IMAGES_TABLE.' |
---|
| 58 | ORDER BY tn_ext;'; |
---|
| 59 | |
---|
| 60 | $result = pwg_query($query); |
---|
| 61 | |
---|
| 62 | $ext = array(); |
---|
| 63 | while ($row = mysql_fetch_assoc($result)) |
---|
| 64 | { |
---|
| 65 | if (empty($row['tn_ext'])) |
---|
| 66 | $row['tn_ext']='!NULL!'; |
---|
| 67 | array_push($ext, $row); |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | return $ext; |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.