Changeset 20090
- Timestamp:
- Jan 12, 2013, 3:13:08 PM (11 years ago)
- Location:
- extensions/UserCollections
- Files:
-
- 24 added
- 34 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserCollections/include/UserCollection.class.php
r17519 r20090 12 12 * @param: array images 13 13 */ 14 function __construct($col_id, $images=array(), $name=null, $active=false, $public=false )14 function __construct($col_id, $images=array(), $name=null, $active=false, $public=false, $user_id=null) 15 15 { 16 16 global $user; 17 18 if (empty($user_id)) { 19 $user_id = $user['id']; 20 } 17 21 18 22 $this->data = array( 19 23 'id' => 0, 20 'user_id' => $user ['id'],24 'user_id' => $user_id, 21 25 'name' => null, 22 26 'date_creation' => '0000-00-00 00:00:00', … … 28 32 $this->images = array(); 29 33 30 // access from public id 34 // access from public id (access permission is checked line 66) 31 35 if ( strlen($col_id) == 10 and strpos($col_id, 'uc') === 0 ) 32 36 { … … 84 88 pwg_query($query); 85 89 90 // select images of the collection 86 91 $query = ' 87 92 SELECT image_id … … 91 96 $this->images = array_from_query($query, 'image_id'); 92 97 93 if ($this->data['nb_images'] != count($this->images)) 94 { 95 $this->updateParam('nb_images', count($this->images)); 96 } 98 $this->updateParam('nb_images', count($this->images)); 97 99 } 98 100 else … … 130 132 $this->data['id'] = pwg_db_insert_id(); 131 133 132 $date = pwg_query('SELECT FROM_UNIXTIME(NOW());');134 $date = pwg_query('SELECT NOW();'); 133 135 list($this->data['date_creation']) = pwg_db_fetch_row($date); 134 136 … … 164 166 function updateParam($name, $value) 165 167 { 166 $this->data[$name] = $value; 167 pwg_query('UPDATE '.COLLECTIONS_TABLE.' SET '.$name.' = "'.$value.'" WHERE id = '.$this->data['id'].';'); 168 if ($value != $this->data[$name]) 169 { 170 $this->data[$name] = $value; 171 pwg_query('UPDATE '.COLLECTIONS_TABLE.' SET '.$name.' = "'.pwg_db_real_escape_string($value).'" WHERE id = '.$this->data['id'].';'); 172 } 168 173 } 169 174 … … 246 251 ); 247 252 253 $query = ' 254 UPDATE '.COLLECTION_IMAGES_TABLE.' 255 SET add_date = NOW() 256 WHERE 257 col_id = '.$this->data['id'].' 258 AND image_id IN ('.implode(',', $image_ids).') 259 AND add_date IS NULL 260 '; 261 pwg_query($query); 262 248 263 $this->updateParam('nb_images', count($this->images)); 249 264 } … … 291 306 'ACTIVE' => (bool)$this->data['active'], 292 307 'PUBLIC' => (bool)$this->data['public'], 293 'DATE_CREATION' => format_date($this->data['date_creation'], true),308 'DATE_CREATION' => $this->data['date_creation'], 294 309 'U_PUBLIC' => USER_COLLEC_PUBLIC . 'view/'.$this->data['public_id'], 295 310 'IS_TEMP' => $this->data['name'] == 'temp', … … 298 313 return $set; 299 314 } 315 316 /** 317 * Send the collection by email 318 * @param: array 319 * - sender_name 320 * - sender_email 321 * - recipient_email 322 * - recipient_name 323 * - nb_images 324 * - message 325 * @return: array errors 326 */ 327 function sendEmail($comm, $key) 328 { 329 global $conf, $page, $template; 330 331 $errors = array(); 332 333 $comm = array_map('stripslashes', $comm); 334 335 $comment_action='validate'; 336 337 // check key 338 if (!verify_ephemeral_key(@$key)) 339 { 340 array_push($errors, l10n('Invalid or expired security key')); 341 $comment_action='reject'; 342 } 343 344 // check author 345 if (empty($comm['sender_name'])) 346 { 347 array_push($errors, l10n('Please enter your name')); 348 $comment_action='reject'; 349 } 350 if (empty($comm['recipient_name'])) 351 { 352 array_push($errors, l10n('Please enter the recipient name')); 353 $comment_action='reject'; 354 } 355 356 // check email 357 if (empty($comm['sender_email'])) 358 { 359 array_push($errors, l10n('Please enter your e-mail')); 360 $comment_action='reject'; 361 } 362 else if ( !empty($comm['sender_email']) and !uc_check_email_validity($comm['sender_email']) ) 363 { 364 array_push($errors, l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)')); 365 $comment_action='reject'; 366 } 367 if (empty($comm['recipient_email'])) 368 { 369 array_push($errors, l10n('Please enter the recipient e-mail')); 370 $comment_action='reject'; 371 } 372 else if ( !empty($comm['recipient_email']) and !uc_check_email_validity($comm['recipient_email']) ) 373 { 374 array_push($errors, l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)')); 375 $comment_action='reject'; 376 } 377 378 // check content 379 if (!empty($comm['message'])) 380 { 381 $comm['message'] = nl2br($comm['message']); 382 } 383 384 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 385 386 if ($comment_action == 'validate') 387 { 388 // format subject 389 $subject = '['.$conf['gallery_title'].'] '.sprintf(l10n('A photo collection by %s'), $comm['sender_name']); 390 $subject = encode_mime_header($subject); 391 392 // format expeditor 393 $args['from'] = format_email($comm['sender_name'], $comm['sender_email']); 394 $args['to'] = format_email($comm['recipient_name'], $comm['recipient_email']); 395 396 // hearders 397 $headers = 'From: '.$args['from']."\n"; 398 $headers.= 'MIME-Version: 1.0'."\n"; 399 $headers.= 'X-Mailer: Piwigo Mailer'."\n"; 400 $headers.= 'Content-Transfer-Encoding: 8bit'."\n"; 401 $headers.= 'Content-Type: text/html; charset="'.get_pwg_charset().'";'."\n"; 402 403 // mail content 404 $content = $this->getMailContent($comm); 405 $content = wordwrap($content, 70, "\n", true); 406 407 // send mail 408 $result = 409 trigger_event('send_mail', 410 false, /* Result */ 411 trigger_event('send_mail_to', $args['to']), 412 trigger_event('send_mail_subject', $subject), 413 trigger_event('send_mail_content', $content), 414 trigger_event('send_mail_headers', $headers), 415 $args 416 ); 417 418 if ($result == false) 419 { 420 $_SESSION['page_errors'][] = l10n('Error while sending e-mail'); 421 } 422 else 423 { 424 $_SESSION['page_infos'][] = l10n('E-mail sent successfully'); 425 } 426 427 redirect(); 428 } 429 430 return $errors; 431 } 432 433 /** 434 * get mail content for sendMail() 435 */ 436 function getMailContent($params) 437 { 438 global $user, $conf, $template; 439 440 // switch to guest user 441 $user_save = $user; 442 $user = build_user($conf['guest_id'], true); 443 444 // get pictures 445 $query = ' 446 SELECT 447 id, 448 file, 449 name, 450 path 451 FROM '.IMAGES_TABLE.' AS i 452 JOIN '.IMAGE_CATEGORY_TABLE.' AS ci ON ci.image_id = i.id 453 WHERE id IN ('.implode(',', $this->images).') 454 '.get_sql_condition_FandF(array( 455 'forbidden_categories' => 'category_id', 456 'forbidden_images' => 'id' 457 ), 458 'AND' 459 ).' 460 GROUP BY i.id 461 ORDER BY '.DB_RANDOM_FUNCTION.'() 462 LIMIT '.$params['nb_images'].' 463 ;'; 464 $pictures = hash_from_query($query, 'id'); 465 466 // switch back to current user 467 $user = $user_save; 468 unset($user_save); 469 470 // picture sinfos 471 set_make_full_url(); 472 $tpl_vars = array(); 473 foreach ($pictures as $row) 474 { 475 $name = render_element_name($row); 476 477 $tpl_vars[] = array( 478 'TN_ALT' => htmlspecialchars(strip_tags($name)), 479 'NAME' => $name, 480 'URL' => make_picture_url(array('image_id' => $row['id'])), 481 'THUMB' => DerivativeImage::url(IMG_SQUARE, $row), 482 ); 483 } 484 485 // template 486 $mail_css = file_get_contents(dirname(__FILE__).'/../template/mail.css'); 487 488 $template->assign(array( 489 'GALLERY_URL' => get_gallery_home_url(), 490 'PHPWG_URL' => PHPWG_URL, 491 'UC_MAIL_CSS' => str_replace("\n", null, $mail_css), 492 'MAIL_TITLE' => $this->getParam('name').' ('.sprintf(l10n('by %s'), $params['sender_name']).')', 493 'COL_URL' => USER_COLLEC_PUBLIC . 'view/'.$this->data['public_id'], 494 'PARAMS' => $params, 495 'derivative_params' => ImageStdParams::get_by_type(IMG_SQUARE), 496 'thumbnails' => $tpl_vars, 497 )); 498 499 $template->set_filename('uc_mail', dirname(__FILE__).'/../template/mail.tpl'); 500 $content = $template->parse('uc_mail', true); 501 502 unset_make_full_url(); 503 504 return $content; 505 } 506 507 /** 508 * generate a listing of the collection 509 */ 510 function serialize($params) 511 { 512 $content = null; 513 514 // get images infos 515 $query = ' 516 SELECT 517 id, 518 file, 519 name, 520 path 521 FROM '.IMAGES_TABLE.' 522 WHERE id IN('.implode(',', $this->images).') 523 ORDER BY id 524 ;'; 525 $pictures = hash_from_query($query, 'id'); 526 527 if (count($pictures)) 528 { 529 // generate csv 530 set_make_full_url(); 531 $root_url = get_root_url(); 532 533 $fp = fopen('php://temp', 'r+'); 534 foreach ($pictures as $row) 535 { 536 $element = array(); 537 foreach ($params as $field) 538 { 539 switch ($field) 540 { 541 case 'id': 542 $element[] = $row['id']; break; 543 case 'file': 544 $element[] = $row['file']; break; 545 case 'name': 546 $element[] = render_element_name($row); break; 547 case 'url': 548 $element[] = make_picture_url(array('image_id'=>$row['id'], 'image_file'=>$row['file'])); break; 549 case 'path': 550 $element[] = $root_url.ltrim($row['path'], './'); break; 551 } 552 } 553 if (!empty($element)) 554 { 555 fputcsv($fp, $element); 556 } 557 } 558 559 rewind($fp); 560 $content = stream_get_contents($fp); 561 fclose($fp); 562 563 unset_make_full_url(); 564 } 565 566 return $content; 567 } 300 568 } 301 569 -
extensions/UserCollections/include/collections.inc.php
r19843 r20090 159 159 $self_url = USER_COLLEC_PUBLIC . 'edit/'.$page['col_id']; 160 160 $template->assign(array( 161 'user_collections' => $conf['user_collections'], 161 162 'USER_COLLEC_PATH' => USER_COLLEC_PATH, 162 163 'F_ACTION' => $self_url, … … 184 185 else 185 186 { 186 $UserCollection->updateParam('name', $_POST['name']); 187 $UserCollection->updateParam('name', stripslashes($_POST['name'])); 188 } 189 if (!$conf['user_collections']['allow_public']) 190 { 191 $_POST['public'] = '0'; 187 192 } 188 193 $UserCollection->updateParam('public', $_POST['public']); 194 } 195 196 // send mail 197 if ( $conf['user_collections']['allow_public'] and $conf['user_collections']['allow_mails'] ) 198 { 199 $contact = array( 200 'sender_name' => $user['username'], 201 'sender_email' => $user['email'], 202 'recipient_name' => null, 203 'recipient_email' => null, 204 'nb_images' => 4, 205 'message' => null, 206 ); 207 208 if ( isset($_POST['send_mail']) and (bool)$UserCollection->getParam('public') ) 209 { 210 $contact = array( 211 'sender_email' => trim($_POST['sender_email']), 212 'sender_name' => trim($_POST['sender_name']), 213 'recipient_email' => trim($_POST['recipient_email']), 214 'recipient_name' => trim($_POST['recipient_name']), 215 'nb_images' => $_POST['nb_images'], 216 'message' => $_POST['message'], 217 ); 218 219 $errors = $UserCollection->sendEmail($contact, @$_POST['key']); 220 if (count($errors)) 221 { 222 $template->assign('uc_mail_errors', $errors); 223 } 224 } 225 226 $contact['KEY'] = get_ephemeral_key(3); 227 $template->assign('contact', $contact); 189 228 } 190 229 … … 202 241 } 203 242 204 // special template 205 add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_in_collection', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 2); // +10 to overload GThumb+ 243 // add links for colorbox 244 add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_in_collection', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 245 246 // add remove item links 206 247 $template->set_prefilter('index_thumbnails', 'user_collections_thumbnails_list_prefilter'); 207 248 208 249 // collection content 209 250 $col = $UserCollection->getCollectionInfo(); 251 $col['DATE_CREATION'] = format_date($col['DATE_CREATION'], true); 210 252 $col['U_CLEAR'] = $self_url.'&action=clear'; 211 253 $col['U_DELETE'] = add_url_params(USER_COLLEC_PUBLIC, array('action'=>'delete','col_id'=>$page['col_id'])); 212 254 $template->assign('collection', $col); 213 214 255 $page['items'] = $UserCollection->getImages(); 215 256 216 // navigation bar 217 $page['start'] = isset($_GET['start']) ? $_GET['start'] : 0; 218 if (count($page['items']) > $page['nb_image_page']) 219 { 220 $page['navigation_bar'] = create_navigation_bar( 221 $self_url, 222 count($page['items']), 223 $page['start'], 224 $page['nb_image_page'], 225 false 226 ); 227 $template->assign('navbar', $page['navigation_bar']); 228 } 229 230 // display 231 include(PHPWG_ROOT_PATH . 'include/category_default.inc.php'); 257 // toolbar buttons 258 $buttons = null; 259 if ($conf['user_collections']['allow_public'] and $conf['user_collections']['allow_mails']) 260 { 261 $buttons.= '<li><a class="mail_colorbox_open" href="#mail_form" title="'.l10n('Send this collection my mail').'" class="pwg-state-default pwg-button" rel="nofollow" '.(!$col['PUBLIC']?'onClick="alert(\''.l10n('The collection must be public in order to send it').'\');return false;"':null).'> 262 <span class="pwg-icon user-collections-delete-icon" style="background:url(\'' . get_root_url().USER_COLLEC_PATH . 'template/resources/mail.png\') center center no-repeat;"> </span><span class="pwg-button-text">'.l10n('Send').'</span> 263 </a></li>'; 264 } 265 $buttons.= ' 266 <li><a href="'. $col['U_CLEAR'] .'" title="'.l10n('Clear this collection').'" class="pwg-state-default pwg-button" rel="nofollow" onClick="return confirm(\''.l10n('Are you sure?').'\');"> 267 <span class="pwg-icon user-collections-delete-icon" style="background:url(\'' . get_root_url().USER_COLLEC_PATH . 'template/resources/bin.png\') center center no-repeat;"> </span><span class="pwg-button-text">'.l10n('Clear').'</span> 268 </a></li> 269 <li><a href="'. $col['U_DELETE'] .'" title="'.l10n('Delete this collection').'" class="pwg-state-default pwg-button" rel="nofollow" onClick="return confirm(\''.l10n('Are you sure?').'\');"> 270 <span class="pwg-icon user-collections-delete-icon" style="background:url(\'' . get_root_url().USER_COLLEC_PATH . 'template/resources/delete.png\') center center no-repeat;"> </span><span class="pwg-button-text">'.l10n('Delete').'</span> 271 </a></li>'; 272 $template->concat('COLLECTION_ACTIONS', $buttons); 273 274 // thumbnails 275 define('USER_COLLEC_REMOVE_GTHUMB', true); 276 include(USER_COLLEC_PATH . '/include/display_thumbnails.inc.php'); 232 277 233 278 $template->concat('TITLE', $conf['level_separator'].$UserCollection->getParam('name')); … … 245 290 { 246 291 // security 247 if ( empty($page['col_id']) or strlen($page['col_id']) != 10 or strpos($page['col_id'], 'uc') === false )292 if ( empty($page['col_id']) or strlen($page['col_id']) != 10 or strpos($page['col_id'], 'uc') === false or !$conf['user_collections']['allow_public'] ) 248 293 { 249 294 $_SESSION['page_errors'][] = l10n('Invalid collection'); … … 257 302 try { 258 303 $UserCollection = new UserCollection($page['col_id']); 259 260 // special template261 add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_in_collection', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 2); // +10 to overload GThumb+262 263 // collection content264 304 $page['items'] = $UserCollection->getImages(); 265 305 266 // navigation bar 267 $page['start'] = isset($_GET['start']) ? $_GET['start'] : 0; 268 if (count($page['items']) > $page['nb_image_page']) 269 { 270 $page['navigation_bar'] = create_navigation_bar( 271 $self_url, 272 count($page['items']), 273 $page['start'], 274 $page['nb_image_page'], 275 false 276 ); 277 $template->assign('navbar', $page['navigation_bar']); 278 } 279 280 // display 281 include(PHPWG_ROOT_PATH . 'include/category_default.inc.php'); 282 306 // thumbnails 307 include(USER_COLLEC_PATH . '/include/display_thumbnails.inc.php'); 308 309 // add username in title 283 310 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 284 311 $template->concat('TITLE', … … 295 322 } 296 323 } 324 297 325 298 326 $template->assign(array( -
extensions/UserCollections/include/events.inc.php
r17657 r20090 3 3 4 4 # this file contains all functions directly called by the triggers # 5 6 /* compatibility fix with Gthumb+ */ 7 function user_collections_save_pagination() 8 { 9 global $user, $page, $uc_nb_image_page_save; 10 11 $uc_nb_image_page_save['user'] = $user['nb_image_page']; 12 $uc_nb_image_page_save['page'] = $page['nb_image_page']; 13 } 5 14 6 15 … … 122 131 {strip}<a class="addCollection" href="{$collection_toggle_url}{$thumbnail.id}" data-id="{$thumbnail.id}" rel="nofollow"> 123 132 {if $COL_ID or $thumbnail.COLLECTION_SELECTED} 124 {\'Remove from collection\'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/ image_delete.png" title="{\'Remove from collection\'|@translate}">133 {\'Remove from collection\'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_delete.png" title="{\'Remove from collection\'|@translate}"> 125 134 {else} 126 {\'Add to collection\'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/ image_add.png" title="{\'Add to collection\'|@translate}">135 {\'Add to collection\'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_add.png" title="{\'Add to collection\'|@translate}"> 127 136 {/if} 128 137 </a>{/strip}'; -
extensions/UserCollections/include/functions.inc.php
r16688 r20090 32 32 } 33 33 34 function uc_check_email_validity($mail_address) 35 { 36 if (function_exists('email_check_format')) 37 { 38 return email_check_format($mail_address); // Piwigo 2.5 39 } 40 else if (version_compare(PHP_VERSION, '5.2.0') >= 0) 41 { 42 return filter_var($mail_address, FILTER_VALIDATE_EMAIL)!==false; 43 } 44 else 45 { 46 $atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; // before arobase 47 $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name 48 $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i'; 49 50 return (bool)preg_match($regex, $mail_address); 51 } 52 } 53 34 54 ?> -
extensions/UserCollections/include/install.inc.php
r17657 r20090 5 5 { 6 6 global $conf, $prefixeTable; 7 8 if (empty($conf['user_collections'])) 9 { 10 $default_config = serialize(array( 11 'allow_mails' => true, 12 'allow_public' => true, 13 )); 14 15 conf_update_param('user_collections', $default_config); 16 $conf['user_collections'] = $default_config; 17 } 7 18 8 19 // create tables … … 26 37 `col_id` mediumint(8) NOT NULL, 27 38 `image_id` mediumint(8) NOT NULL, 39 `add_date` DATETIME NULL, 28 40 UNIQUE KEY `UNIQUE` (`col_id`,`image_id`) 29 41 ) DEFAULT CHARSET=utf8 30 42 ;'; 31 43 pwg_query($query); 44 45 $result = pwg_query('SHOW COLUMNS FROM `'.$prefixeTable.'collection_images` LIKE "add_date";'); 46 if (!pwg_db_num_rows($result)) 47 { 48 pwg_query('ALTER TABLE `'.$prefixeTable.'collection_images` ADD `add_date` DATETIME NULL;'); 49 } 32 50 } 33 51 -
extensions/UserCollections/language/ca_ES/plugin.lang.php
r18857 r20090 29 29 $lang['%d more...'] = '%d més...'; 30 30 $lang['Add to collection'] = 'Afegeix a la col·lecció'; 31 $lang['Clear collection'] = 'Esborra';31 $lang['Clear'] = 'Esborra'; 32 32 $lang['Collection'] = 'Col·lecció'; 33 33 $lang['Collection name:'] = 'Nom de la col·lecció'; -
extensions/UserCollections/language/cs_CZ/plugin.lang.php
r16722 r20090 23 23 $lang['%d more...'] = '%d více...'; 24 24 $lang['Add to collection'] = 'Přidat do sbírky'; 25 $lang['Clear collection'] = 'Vyčistit';25 $lang['Clear'] = 'Vyčistit'; 26 26 $lang['Collection name:'] = 'Jméno sbírky'; 27 27 $lang['Collection'] = 'Sbírka'; -
extensions/UserCollections/language/da_DK/plugin.lang.php
r18091 r20090 30 30 $lang['%d more...'] = '%d mere ...'; 31 31 $lang['Add to collection'] = 'Tilføj til samling'; 32 $lang['Clear collection'] = 'Ryd';32 $lang['Clear'] = 'Ryd'; 33 33 $lang['Collection'] = 'Samling'; 34 34 $lang['Collection name:'] = 'Navn på samling:'; -
extensions/UserCollections/language/de_DE/plugin.lang.php
r16714 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Add to collection'] = 'Sammlung hinzufügen'; 24 $lang['Clear collection'] = 'Löschen';24 $lang['Clear'] = 'Löschen'; 25 25 $lang['Collection name:'] = 'Name der Sammlung:'; 26 26 $lang['Collection'] = 'Sammlung'; -
extensions/UserCollections/language/el_GR/plugin.lang.php
r16742 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Add to collection'] = 'Προσθήκη στη συλλογή'; 24 $lang['Clear collection'] = 'Καθαρίζω';24 $lang['Clear'] = 'Καθαρίζω'; 25 25 $lang['Collection name:'] = 'Όνομα Συλλογής'; 26 26 $lang['Collection'] = 'Συλλογή'; -
extensions/UserCollections/language/en_UK/plugin.lang.php
r16698 r20090 20 20 $lang['Remove from collection'] = 'Remove from collection'; 21 21 $lang['Add to collection'] = 'Add to collection'; 22 $lang['Clear collection'] = 'Clear';22 $lang['Clear'] = 'Clear'; 23 23 $lang['You have %d collection'] = 'You have %d collection'; 24 24 $lang['You have no collection'] = 'You have no collection'; … … 28 28 $lang['%d more...'] = '%d more...'; 29 29 30 $lang['Allow users to set their collections as public'] = 'Allow users to set their collections as public'; 31 $lang['Allow users to send their public collections by mail'] = 'Allow users to send their public collections by mail'; 32 $lang['Fields'] = 'Fields'; 33 $lang['Active'] = 'Active'; 34 $lang['Inactive'] = 'Inactive'; 35 $lang['Generate'] = 'Generate'; 36 $lang['Download CSV file'] = 'Download CSV file'; 37 $lang['Output'] = 'Output'; 38 $lang['Number of images'] = 'Number of images'; 39 $lang['Edit this collection'] = 'Edit this collection'; 40 $lang['Export image list'] = 'Export image list'; 41 $lang['Delete this collection'] = 'Delete this collection'; 42 $lang['Send this collection my mail'] = 'Send this collection my mail'; 43 $lang['Clear this collection'] = 'Clear this collection'; 44 $lang['Please enter your name'] = 'Please enter your name'; 45 $lang['Please enter the recipient name'] = 'Please enter the recipient name'; 46 $lang['Please enter your e-mail'] = 'Please enter your e-mail'; 47 $lang['Please enter the recipient e-mail'] = 'Please enter the recipient e-mail'; 48 $lang['A photo collection by %s'] = 'A photo collection by %s'; 49 $lang['Error while sending e-mail'] = 'Error while sending e-mail'; 50 $lang['E-mail sent successfully'] = 'E-mail sent successfully'; 51 $lang['The collection must be public in order to send it'] = 'The collection must be public in order to send it'; 52 $lang['Your name'] = 'Your name'; 53 $lang['Your e-mail'] = 'Your e-mail'; 54 $lang['Recipient name'] = 'Recipient name'; 55 $lang['Recipient e-mail'] = 'Recipient e-mail'; 56 $lang['Message (optional)'] = 'Message (optional)'; 57 $lang['Hello <b>%s</b>, %s sent you a photos collection from <a href="%s">%s</a>'] = 'Hello <b>%s</b>, %s sent you a photos collection from <a href="%s">%s</a>'; 58 $lang['Click here to view the complete collection'] = 'Click here to view the complete collection'; 59 30 60 ?> -
extensions/UserCollections/language/es_ES/plugin.lang.php
r16758 r20090 23 23 $lang['%d more...'] = '%d más...'; 24 24 $lang['Add to collection'] = 'Añadir a la colección'; 25 $lang['Clear collection'] = 'Limpiar';25 $lang['Clear'] = 'Limpiar'; 26 26 $lang['Collection name:'] = 'Nombre de la colección'; 27 27 $lang['Collection'] = 'Colección'; -
extensions/UserCollections/language/fa_IR/plugin.lang.php
r17696 r20090 23 23 $lang['%d more...'] = '%d بیشتر ...'; 24 24 $lang['Add to collection'] = 'افزودن به مجموعه'; 25 $lang['Clear collection'] = 'پاک کردن';25 $lang['Clear'] = 'پاک کردن'; 26 26 $lang['Collection'] = 'مجموعه'; 27 27 $lang['Collection name:'] = 'نام مجموعه:'; -
extensions/UserCollections/language/fr_FR/plugin.lang.php
r17914 r20090 20 20 $lang['Remove from collection'] = 'Supprimer de la collection'; 21 21 $lang['Add to collection'] = 'Ajouter à la collection'; 22 $lang['Clear collection'] = 'Vider';22 $lang['Clear'] = 'Vider'; 23 23 $lang['You have %d collection'] = 'Vous avez %d collection'; 24 24 $lang['You have no collection'] = 'Vous n\'avez aucune collection'; … … 28 28 $lang['%d more...'] = 'et %d autres...'; 29 29 30 $lang['Allow users to set their collections as public'] = 'Les utilisateurs peuvent rendre leurs collections publiques'; 31 $lang['Allow users to send their public collections by mail'] = 'Les utilisateurs peuvent envoyer leurs collections publiques par mail'; 32 $lang['Fields'] = 'Champs'; 33 $lang['Active'] = 'Actifs'; 34 $lang['Inactive'] = 'Inactifs'; 35 $lang['Generate'] = 'Générer'; 36 $lang['Download CSV file'] = 'Télécharger le fichier CSV'; 37 $lang['Output'] = 'Aperçu'; 38 $lang['Number of images'] = 'Nombre d\'images'; 39 $lang['Edit this collection'] = 'Editer celle collection'; 40 $lang['Export image list'] = 'Exporter la liste d\'images'; 41 $lang['Delete this collection'] = 'Supprimer la collection'; 42 $lang['Send this collection my mail'] = 'Envoyer cette collection par mail'; 43 $lang['Clear this collection'] = 'Vider cette collection'; 44 $lang['Please enter your name'] = 'Veuillez entrer votre nom'; 45 $lang['Please enter the recipient name'] = 'Veuillez entrer le nom du destinataire'; 46 $lang['Please enter your e-mail'] = 'Veuillez entrer votre e-mail'; 47 $lang['Please enter the recipient e-mail'] = 'Veuillez entrer l\'e-mail du destinataire'; 48 $lang['A photo collection by %s'] = 'Une collection photo de %s'; 49 $lang['Error while sending e-mail'] = 'Erreur lors de l\'envoi de l\'e-mail'; 50 $lang['E-mail sent successfully'] = 'E-mail envoyé avec succès'; 51 $lang['The collection must be public in order to send it'] = 'La collection doit être publique pour l\'envoyer'; 52 $lang['Your name'] = 'Votre nom'; 53 $lang['Your e-mail'] = 'Votre e-mail'; 54 $lang['Recipient name'] = 'Nom du destinataire'; 55 $lang['Recipient e-mail'] = 'E-mail du destinataire'; 56 $lang['Message (optional)'] = 'Message (optionel)'; 57 $lang['Hello <b>%s</b>, %s sent you a photos collection from <a href="%s">%s</a>'] = 'Bonjour <b>%s</b>, %s vous a envoyé une collection de photos depuis <a href="%s">%s</a>'; 58 $lang['Click here to view the complete collection'] = 'Cliquez ici pour voir la collection complète'; 59 30 60 ?> -
extensions/UserCollections/language/hu_HU/plugin.lang.php
r17329 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Add to collection'] = 'Gyűjteménybe'; 24 $lang['Clear collection'] = 'Kiürítés';24 $lang['Clear'] = 'Kiürítés'; 25 25 $lang['Collection name:'] = 'Gyűjtemény neve:'; 26 26 $lang['Collection'] = 'Gyűjtemény'; -
extensions/UserCollections/language/it_IT/plugin.lang.php
r16963 r20090 23 23 $lang['%d more...'] = '%d di più...'; 24 24 $lang['Add to collection'] = 'Aggiungi ad una raccolta'; 25 $lang['Clear collection'] = 'Cancella';25 $lang['Clear'] = 'Cancella'; 26 26 $lang['Collection name:'] = 'Nome della collezione:'; 27 27 $lang['Collection'] = 'Collezione'; -
extensions/UserCollections/language/lv_LV/plugin.lang.php
r16783 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Add to collection'] = 'Pievienot kolekcijai'; 24 $lang['Clear collection'] = 'Tīrs';24 $lang['Clear'] = 'Tīrs'; 25 25 $lang['Collection name:'] = 'Kolekcijas nosaukums:'; 26 26 $lang['Collection'] = 'Kolekcija'; -
extensions/UserCollections/language/nl_NL/plugin.lang.php
r16792 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Add to collection'] = 'Aan verzameling toevoegen'; 24 $lang['Clear collection'] = 'Leegmaken';24 $lang['Clear'] = 'Leegmaken'; 25 25 $lang['Collection name:'] = 'Naam van verzameling'; 26 26 $lang['Collection'] = 'Verzameling'; -
extensions/UserCollections/language/pl_PL/plugin.lang.php
r16770 r20090 23 23 $lang['%d more...'] = '%d więcej...'; 24 24 $lang['Add to collection'] = 'Dodaj do kolekcji'; 25 $lang['Clear collection'] = 'Wyczyść';25 $lang['Clear'] = 'Wyczyść'; 26 26 $lang['Collection name:'] = 'Nazwa kolekcji'; 27 27 $lang['Collection'] = 'Kolekcja'; -
extensions/UserCollections/language/pt_BR/plugin.lang.php
r19097 r20090 30 30 mais %d...'; 31 31 $lang['Add to collection'] = 'Adicione a coleção'; 32 $lang['Clear collection'] = 'Limpar';32 $lang['Clear'] = 'Limpar'; 33 33 $lang['Collection'] = 'Coleção'; 34 34 $lang['Collection name:'] = 'Nome da coleção:'; -
extensions/UserCollections/language/pt_PT/plugin.lang.php
r17396 r20090 29 29 $lang['%d more...'] = '%d mais'; 30 30 $lang['Add to collection'] = 'acrescentar à colecção'; 31 $lang['Clear collection'] = 'Limpar';31 $lang['Clear'] = 'Limpar'; 32 32 $lang['Collection'] = 'Colecção'; 33 33 $lang['Collection name:'] = 'Nome da colecção'; -
extensions/UserCollections/language/ru_RU/plugin.lang.php
r16771 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Add to collection'] = 'Добавить в коллекцию'; 24 $lang['Clear collection'] = 'Очистить';24 $lang['Clear'] = 'Очистить'; 25 25 $lang['Collection name:'] = 'Название коллекции:'; 26 26 $lang['Collection'] = 'Коллекция'; -
extensions/UserCollections/language/sk_SK/plugin.lang.php
r16772 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Add to collection'] = 'Pridať do kolekcie'; 24 $lang['Clear collection'] = 'Vyčistiť';24 $lang['Clear'] = 'Vyčistiť'; 25 25 $lang['Collection name:'] = 'Názov kolekcie:'; 26 26 $lang['Collection'] = 'Kolekcia'; -
extensions/UserCollections/language/th_TH/plugin.lang.php
r19246 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['%d more...'] = '%d เพิ่มเติม...'; 24 $lang['Clear collection'] = 'ล้าง';24 $lang['Clear'] = 'ล้าง'; 25 25 $lang['Copied'] = 'คัดลอก'; 26 26 $lang['Public collection'] = 'สาธารณะ'; -
extensions/UserCollections/language/tr_TR/plugin.lang.php
r16701 r20090 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Add to collection'] = 'Koleksiyona ekle'; 24 $lang['Clear collection'] = 'Temizle';24 $lang['Clear'] = 'Temizle'; 25 25 $lang['Collection name:'] = 'Koleksiyon adı:'; 26 26 $lang['Collections'] = 'Koleksiyon'; -
extensions/UserCollections/language/uk_UA/plugin.lang.php
r17934 r20090 30 30 $lang['set active'] = 'встановити активним'; 31 31 $lang['Add to collection'] = 'Додати до колекції'; 32 $lang['Clear collection'] = 'Очистити';32 $lang['Clear'] = 'Очистити'; 33 33 $lang['Collection'] = 'Колекція'; 34 34 $lang['Collection name:'] = 'Ім\'я колекції:'; -
extensions/UserCollections/language/zh_CN/plugin.lang.php
r17664 r20090 44 44 $lang['Collection name:'] = '精选集名称:'; 45 45 $lang['Collection'] = '精选集'; 46 $lang['Clear collection'] = '清除';46 $lang['Clear'] = '清除'; 47 47 $lang['Add to collection'] = '添加到精选集'; 48 48 $lang['%d more...'] = '%d 更多...'; -
extensions/UserCollections/main.inc.php
r19843 r20090 13 13 global $conf, $prefixeTable; 14 14 15 define('USER_COLLEC_PATH', PHPWG_PLUGINS_PATH . 'UserCollections/'); 15 defined('USER_COLLEC_ID') or define('USER_COLLEC_ID', basename(dirname(__FILE__))); 16 define('USER_COLLEC_PATH', PHPWG_PLUGINS_PATH . USER_COLLEC_ID . '/'); 16 17 define('COLLECTIONS_TABLE', $prefixeTable.'collections'); 17 18 define('COLLECTION_IMAGES_TABLE',$prefixeTable.'collection_images'); 18 define('USER_COLLEC_ADMIN', get_root_url() . 'admin.php?page=plugin- UserCollections');19 define('USER_COLLEC_ADMIN', get_root_url() . 'admin.php?page=plugin-' . USER_COLLEC_ID); 19 20 define('USER_COLLEC_PUBLIC', get_absolute_root_url() . make_index_url(array('section' => 'collections')) . '/'); 20 21 define('USER_COLLEC_VERSION', 'auto'); 21 22 22 23 23 add_event_handler('init', 'user_collections_init'); 24 24 25 add_event_handler('loc_end_section_init', 'user_collections_section_init'); 26 add_event_handler('loc_end_index', 'user_collections_page', EVENT_HANDLER_PRIORITY_NEUTRAL-10); 25 add_event_handler('ws_add_methods', 'user_collections_ws_add_methods'); 27 26 28 add_event_handler('loc_end_index', 'user_collections_index_actions'); 29 add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_list', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 27 if (defined('IN_ADMIN')) 28 { 29 add_event_handler('get_admin_plugin_menu_links', 'user_collections_admin_menu'); 30 } 31 else 32 { 33 // collections page 34 add_event_handler('loc_begin_index', 'user_collections_save_pagination', EVENT_HANDLER_PRIORITY_NEUTRAL-10); 35 add_event_handler('loc_end_section_init', 'user_collections_section_init'); 36 add_event_handler('loc_end_index', 'user_collections_page', EVENT_HANDLER_PRIORITY_NEUTRAL-10); 30 37 31 add_event_handler('loc_end_picture', 'user_collections_picture_page'); 38 // thumbnails actions 39 add_event_handler('loc_end_index', 'user_collections_index_actions'); 40 add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_list', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 32 41 33 add_event_handler('blockmanager_register_blocks', 'user_collections_add_menublock'); 34 add_event_handler('blockmanager_apply', 'user_collections_applymenu');42 // picture action 43 add_event_handler('loc_end_picture', 'user_collections_picture_page'); 35 44 45 // menu 46 add_event_handler('blockmanager_register_blocks', 'user_collections_add_menublock'); 47 add_event_handler('blockmanager_apply', 'user_collections_applymenu'); 48 } 49 50 require(USER_COLLEC_PATH . 'include/ws_functions.inc.php'); 36 51 require(USER_COLLEC_PATH . 'include/functions.inc.php'); 37 52 require(USER_COLLEC_PATH . 'include/UserCollection.class.php'); … … 44 59 function user_collections_init() 45 60 { 46 global $pwg_loaded_plugins ;61 global $pwg_loaded_plugins, $conf; 47 62 48 63 if ( 49 64 USER_COLLEC_VERSION == 'auto' or 50 $pwg_loaded_plugins[ 'UserCollections']['version'] == 'auto' or51 version_compare($pwg_loaded_plugins[ 'UserCollections']['version'], USER_COLLEC_VERSION, '<')65 $pwg_loaded_plugins[USER_COLLEC_ID]['version'] == 'auto' or 66 version_compare($pwg_loaded_plugins[USER_COLLEC_ID]['version'], USER_COLLEC_VERSION, '<') 52 67 ) 53 68 { … … 55 70 user_collections_install(); 56 71 57 if ( $pwg_loaded_plugins[ 'UserCollections']['version'] != 'auto' and USER_COLLEC_VERSION != 'auto' )72 if ( $pwg_loaded_plugins[USER_COLLEC_ID]['version'] != 'auto' and USER_COLLEC_VERSION != 'auto' ) 58 73 { 59 74 $query = ' 60 75 UPDATE '. PLUGINS_TABLE .' 61 76 SET version = "'. USER_COLLEC_VERSION .'" 62 WHERE id = " UserCollections"';77 WHERE id = "'. USER_COLLEC_ID .'"'; 63 78 pwg_query($query); 64 79 65 $pwg_loaded_plugins[ 'UserCollections']['version'] = USER_COLLEC_VERSION;80 $pwg_loaded_plugins[USER_COLLEC_ID]['version'] = USER_COLLEC_VERSION; 66 81 67 82 if (defined('IN_ADMIN')) … … 73 88 74 89 load_language('plugin.lang', USER_COLLEC_PATH); 90 91 $conf['user_collections'] = unserialize($conf['user_collections']); 92 } 93 94 /** 95 * admin plugins menu 96 */ 97 function user_collections_admin_menu($menu) 98 { 99 array_push($menu, array( 100 'NAME' => 'User Collections', 101 'URL' => USER_COLLEC_ADMIN, 102 )); 103 return $menu; 75 104 } 76 105 -
extensions/UserCollections/maintain.inc.php
r17657 r20090 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 3 4 include_once(PHPWG_PLUGINS_PATH . 'UserCollections/include/install.inc.php'); 4 defined('USER_COLLEC_ID') or define('USER_COLLEC_ID', basename(dirname(__FILE__))); 5 include_once(PHPWG_PLUGINS_PATH . USER_COLLEC_ID . '/include/install.inc.php'); 5 6 6 7 function plugin_install() -
extensions/UserCollections/template/edit.tpl
r19843 r20090 1 1 {combine_css path=$USER_COLLEC_PATH|@cat:"template/style.css"} 2 {combine_script id='jquery.zclip' path=$USER_COLLEC_PATH|@cat:"template/ jquery.zclip.min.js"}2 {combine_script id='jquery.zclip' path=$USER_COLLEC_PATH|@cat:"template/resources/jquery.zclip.min.js"} 3 3 {combine_script id='jquery.tipTip' path='themes/default/js/plugins/jquery.tipTip.minified.js'} 4 4 5 {combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 6 {combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"} 7 5 8 {footer_script require='jquery'} 6 function bindZclip() {ldelim} 7 jQuery("#publicURL .button").zclip({ldelim} 8 path:'{$ROOT_URL}{$USER_COLLEC_PATH}template/ZeroClipboard.swf', 9 copy:$("#publicURL .url").html(), 10 afterCopy: function() {ldelim} 11 $('.confirm').remove(); 12 $("#publicURL .url").select(); 13 $('<span class="confirm" style="display:none;">{'Copied'|@translate}</span>').appendTo("#publicURL") 14 .fadeIn(400).delay(1000).fadeOut(400, function(){ldelim} $(this).remove(); }); 15 } 9 {if $user_collections.allow_public} 10 function bindZclip() {ldelim} 11 jQuery("#publicURL .button").zclip({ldelim} 12 path:'{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/ZeroClipboard.swf', 13 copy:$("#publicURL .url").html(), 14 afterCopy: function() {ldelim} 15 $('.confirm').remove(); 16 $("#publicURL .url").select(); 17 $('<span class="confirm" style="display:none;">{'Copied'|@translate}</span>').appendTo("#publicURL") 18 .fadeIn(400).delay(1000).fadeOut(400, function(){ldelim} $(this).remove(); }); 19 } 20 }); 21 $("#publicURL .url").click(function() {ldelim} 22 $(this).select(); 23 }); 24 } 25 26 jQuery("input[name='public']").change(function() {ldelim} 27 jQuery("#publicURL").fadeToggle("fast"); 28 bindZclip(); 16 29 }); 17 $("#publicURL .url").click(function() {ldelim} 18 $(this).select(); 30 jQuery("#publicURL .button").tipTip({ldelim} 31 delay: 0, 32 defaultPosition: 'right' 19 33 }); 20 } 34 {if $collection.PUBLIC}bindZclip();{/if} 35 {/if} 21 36 22 jQuery("input[name='public']").change(function() {ldelim} 23 jQuery("#publicURL").fadeToggle("fast"); 24 bindZclip(); 25 }); 26 jQuery("#publicURL .button").tipTip({ldelim} 27 delay: 0, 28 defaultPosition: 'right' 29 }); 30 31 jQuery("#actions input").click(function() {ldelim} 32 if (confirm("{'Are you sure?'|@translate}")) {ldelim} 33 document.location.href = jQuery(this).data("href"); 34 } 35 return false; 36 }); 37 {if $collection.PUBLIC}bindZclip();{/if} 37 {if $collection.PUBLIC && $user_collections.allow_mails} 38 $(window).load(function(){ldelim} 39 $(".mail_colorbox_open").colorbox({ldelim} 40 {if isset($uc_mail_errors)}open: true, transition:"none",{/if} 41 inline:true 42 }); 43 $(".mail_colorbox_close").click(function() {ldelim} 44 $(".mail_colorbox_open").colorbox.close(); 45 return false; 46 }) 47 }); 48 $("#mail_form").css('background-color', $("#the_page #content").css('background-color')); 49 {/if} 38 50 {/footer_script} 39 51 … … 56 68 57 69 {if $collection} 70 {* <!-- edit collection -->*} 58 71 <form action="{$F_ACTION}" method="post"> 59 72 <fieldset id="colProperties"> … … 61 74 62 75 <p class="title"><label for="name">{'Name'|@translate}</label></p> 63 <p><input type="text" name="name" id="name" value="{$collection.NAME}" size="60"></p> 76 <p><input type="text" name="name" id="name" value="{$collection.NAME|escape:html}" size="60"></p> 77 {if $user_collections.allow_public} 64 78 <p class="title">{'Public collection'|@translate}</p> 65 79 <p> … … 68 82 <span id="publicURL" {if not $collection.PUBLIC}style="display:none;"{/if}><span class="button" title="{'Copy to clipboard'|@translate}"> </span><input type="text" class="url" value="{$collection.U_PUBLIC}" size="{$collection.U_PUBLIC|strlen}"></span> 69 83 </p> 84 {/if} 70 85 <p> 71 86 <input type="submit" name="save_col" value="{'Save'|@translate}"> … … 75 90 </form> 76 91 92 {* <!-- send collection by mail -->*} 93 {if $user_collections.allow_public && $user_collections.allow_mails} 94 <div style="display:none;"> 95 <form id="mail_form" action="{$F_ACTION}" method="post"> 96 {if isset($uc_mail_errors)} 97 {assign var=errors value=$uc_mail_errors} 98 {include file='infos_errors.tpl'} 99 {/if} 77 100 78 <form id="actions" style="text-align:center;"> 79 <input type="submit" data-href="{$collection.U_CLEAR}" value="{'Clear collection'|@translate}"> 80 <input type="submit" data-href="{$collection.U_DELETE}" value="{'Delete'|@translate}"> 81 </form> 101 <table> 102 <tr> 103 <td class="title"><label for="sender_name">{'Your name'|@translate}</label></td> 104 <td> 105 <input type="text" name="sender_name" id="sender_name" size="40" value="{$contact.sender_name}"> 106 </td> 107 </tr> 108 <tr> 109 <td class="title"><label for="sender_email">{'Your e-mail'|@translate}</label></td> 110 <td> 111 <input type="text" name="sender_email" id="sender_email" size="40" value="{$contact.sender_email}"> 112 </td> 113 </tr> 114 <tr> 115 <td class="title"><label for="recipient_name">{'Recipient name'|@translate}</label></td> 116 <td> 117 <input type="text" name="recipient_name" id="recipient_name" size="40" value="{$contact.recipient_name}"> 118 </td> 119 </tr> 120 <tr> 121 <td class="title"><label for="recipient_email">{'Recipient e-mail'|@translate}</label></td> 122 <td> 123 <input type="text" name="recipient_email" id="recipient_email" size="40" value="{$contact.recipient_email}"> 124 </td> 125 </tr> 126 <tr> 127 <td class="title"><label for="nb_images">{'Number of images'|@translate}</label></td> 128 <td> 129 <select name="nb_images"> 130 <option value="2" {if $contact.nb_images==2}selected="selected"{/if}>2</option> 131 <option value="4" {if $contact.nb_images==4}selected="selected"{/if}>4</option> 132 <option value="8" {if $contact.nb_images==8}selected="selected"{/if}>8</option> 133 </select> 134 </td> 135 </tr> 136 <tr> 137 <td class="title"><label for="message">{'Message (optional)'|@translate}</label></td> 138 <td><textarea name="message" id="message" rows="6" style="width:350px;">{$contact.message}</textarea></td> 139 </tr> 140 <tr> 141 <td class="title"> </td> 142 <td> 143 <input class="submit" type="submit" name="send_mail" value="{'Send'|@translate}"> 144 <a class="mail_colorbox_close" href="#">{'Cancel'|@translate}</a> 145 <input type="hidden" name="key" value="{$contact.KEY}" /> 146 </td> 147 </tr> 148 </table> 149 </form> 150 </div> 151 {/if} 82 152 83 153 {* <!-- collection content -->*} 84 154 {if $collection.NB_IMAGES > 0} 85 155 <ul class="thumbnails" id="thumbnails"> -
extensions/UserCollections/template/style.css
r17914 r20090 29 29 #publicURL .button { 30 30 display:inline-block; 31 background:#e7e7e7 url(' link.png') center center no-repeat;31 background:#e7e7e7 url('resources/link.png') center center no-repeat; 32 32 width:25px; 33 33 height:20px; … … 73 73 } 74 74 75 /* SEND BY MAIL */ 76 #mail_form { 77 width:540px; 78 padding:10px; 79 } 80 #mail_form table td { 81 padding-bottom:5px; 82 text-align:left; 83 } 84 #mail_form table td.title { 85 font-weight:bold; 86 text-align:right !important; 87 padding-top:3px; 88 vertical-align:top; 89 width:120px; 90 } 91 #mail_form input[type="text"], #mail_form textarea, #mail_form select { 92 border-radius:2px; 93 padding:3px; 94 } 75 95 76 96 /* TipTip CSS - Version 1.2 */ -
extensions/UserCollections/template/themes/default.tpl
r17493 r20090 4 4 5 5 <div class="titrePage"> 6 <ul class="categoryActions"> 7 {if !empty($image_derivatives)} 8 <li>{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> 9 <span class="pwg-icon pwg-icon-sizes"> </span><span class="pwg-button-text">{'Photo sizes'|@translate}</span> 10 </a> 11 <div id="derivativeSwitchBox" class="switchBox"> 12 <div class="switchBoxTitle">{'Photo sizes'|@translate}</div> 13 {foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}<br>{/if} 14 {if $image_derivative.SELECTED} 15 <span>✔ </span>{$image_derivative.DISPLAY} 16 {else} 17 <span style="visibility:hidden">✔ </span><a href="{$image_derivative.URL}" rel="nofollow">{$image_derivative.DISPLAY}</a> 18 {/if} 19 {/foreach} 20 </div> 21 {footer_script require='jquery'}{literal} 22 jQuery("#derivativeSwitchLink").click(function() { 23 var elt = jQuery("#derivativeSwitchBox"); 24 elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5)) 25 .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true)) 26 .toggle(); 27 }); 28 jQuery("#derivativeSwitchBox").on("mouseleave", function() { 29 jQuery(this).hide(); 30 }); 31 {/literal}{/footer_script} 32 {/strip}</li> 33 {/if} 34 6 35 {if !empty($COLLECTION_ACTIONS)} 7 <ul class="categoryActions">8 36 {$COLLECTION_ACTIONS} 37 {/if} 9 38 </ul> 10 {/if}11 39 12 40 <h2>{$TITLE}</h2> -
extensions/UserCollections/template/thumbnails.tpl
r16688 r20090 1 1 {combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 2 2 {combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"} 3 3 4 {footer_script} 4 5 jQuery("a.preview-box").colorbox({ldelim} -
extensions/UserCollections/template/thumbnails_css_js.tpl
r17178 r20090 17 17 }).done(function(msg) {ldelim} 18 18 if (msg == "true") {ldelim} 19 $trigger.html('{'Remove from collection'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/ image_delete.png" title="{'Remove from collection'|@translate}">');19 $trigger.html('{'Remove from collection'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_delete.png" title="{'Remove from collection'|@translate}">'); 20 20 jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) +1); 21 21 } else if (msg == "false") {ldelim} … … 24 24 if (typeof batchdown_count != 'undefined') batchdown_count-=1; 25 25 {else} 26 $trigger.html('{'Add to collection'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/ image_add.png" title="{'Add to collection'|@translate}">');26 $trigger.html('{'Add to collection'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_add.png" title="{'Add to collection'|@translate}">'); 27 27 {/if} 28 28 jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) -1);
Note: See TracChangeset
for help on using the changeset viewer.