[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file provides icon definitions through a function. 4 * 5 * Will resolve translations at runtime and consume less memory than a table. 6 */ 7 if( !defined('EVO_CONFIG_LOADED') ) die( 'Please, do not access this page directly.' ); 8 9 10 /** 11 * Get icon according to an item. 12 * 13 * @param string icon name/key 14 * @return array array( 'file', 'alt', 'size', 'class', 'rollover' ) 15 */ 16 function get_icon_info($name) 17 { 18 global $rsc_subdir; 19 20 /* 21 * dh> Idea: 22 * fp> does not make sense to me. Plugins should do their own icons without a bloated event. Also if we allow something to replace existing icons it should be a skin (either front or admin skin) and some overloaded/overloadable get_skin_icon()/get_admin_icon() should be provided there. 23 global $Plugins; 24 if( $r = $Plugins->trigger_event_first_return('GetIconInfo', array('name'=>$name)) ) 25 { 26 return $r['plugin_return']; 27 } 28 */ 29 30 switch($name) 31 { 32 case 'pixel': return array( 33 'file' => $rsc_subdir.'icons/blank.gif', 34 'alt' => '', 35 'size' => array( 1, 1 ), 36 ); 37 38 case 'dropdown': return array( 39 'file' => $rsc_subdir.'icons/dropdown.gif', 40 'alt' => '¤', 41 'size' => array( 11, 8 ), 42 ); 43 case 'switch-to-admin': return array( 44 'file' => $rsc_subdir.'icons/switch-to-admin.gif', 45 'alt' => /* TRANS: short for "Switch to _A_dmin" */ T_('A'), 46 'size' => array( 13, 14 ), 47 ); 48 case 'switch-to-blog': return array( 49 'file' => /* TRANS: short for "Switch to _B_log" */ $rsc_subdir.'icons/switch-to-blog.gif', 50 'alt' => T_('B'), 51 'size' => array( 13, 14 ), 52 ); 53 54 case 'folder': return array( // icon for folders 55 'file' => $rsc_subdir.'icons/fileicons/folder.gif', 56 'alt' => T_('Folder'), 57 'size' => array( 16, 15 ), 58 ); 59 case 'file_unknown': return array( // icon for unknown files 60 'file' => $rsc_subdir.'icons/fileicons/default.png', 61 'alt' => T_('Unknown file'), 62 'size' => array( 16, 16 ), 63 ); 64 case 'file_empty': return array( // empty file 65 'file' => $rsc_subdir.'icons/fileicons/empty.png', 66 'alt' => T_('Empty file'), 67 'size' => array( 16, 16 ), 68 ); 69 case 'folder_parent': return array( // go to parent directory 70 'file' => $rsc_subdir.'icons/up.gif', 71 'alt' => T_('Parent folder'), 72 'size' => array( 16, 15 ), 73 ); 74 case 'folder_home': return array( // home folder 75 'file' => $rsc_subdir.'icons/folder_home2.png', 76 'alt' => T_('Home folder'), 77 'size' => array( 16, 16 ), 78 ); 79 case 'file_edit': return array( // edit a file 80 'file' => $rsc_subdir.'icons/edit.png', 81 'alt' => T_('Edit'), 82 'size' => array( 16, 16 ), 83 ); 84 case 'file_copy': return array( // copy a file/folder 85 'file' => $rsc_subdir.'icons/filecopy.png', 86 'alt' => T_('Copy'), 87 'size' => array( 16, 16 ), 88 ); 89 case 'file_move': return array( // move a file/folder 90 'file' => $rsc_subdir.'icons/filemove.png', 91 'alt' => T_('Move'), 92 'size' => array( 16, 16 ), 93 ); 94 case 'file_rename': return array( // rename a file/folder 95 'file' => $rsc_subdir.'icons/filerename.png', 96 'alt' => T_('Rename'), 97 'size' => array( 16, 16 ), 98 ); 99 case 'file_delete': return array( // delete a file/folder 100 'file' => $rsc_subdir.'icons/filedelete.png', 101 'alt' => T_('Del'), 102 'legend'=>T_('Delete'), 103 'size' => array( 16, 16 ), 104 ); 105 case 'file_perms': return array( // edit permissions of a file 106 'file' => $rsc_subdir.'icons/fileperms.gif', 107 'alt' => T_('Permissions'), 108 'size' => array( 16, 16 ), 109 ); 110 111 112 case 'ascending': return array( // ascending sort order 113 'file' => $rsc_subdir.'icons/ascending.gif', 114 'alt' => /* TRANS: Short (alt tag) for "Ascending" */ T_('A'), 115 'size' => array( 15, 15 ), 116 ); 117 case 'descending': return array( // descending sort order 118 'file' => $rsc_subdir.'icons/descending.gif', 119 'alt' => /* TRANS: Short (alt tag) for "Descending" */ T_('D'), 120 'size' => array( 15, 15 ), 121 ); 122 123 case 'window_new': return array( // open in a new window 124 'file' => $rsc_subdir.'icons/window_new.png', 125 'alt' => T_('New window'), 126 'size' => array( 15, 13 ), 127 ); 128 129 130 case 'file_word': return array( 131 'ext' => '\.(s[txd]w|doc|rtf)', 132 'file' => $rsc_subdir.'icons/fileicons/wordprocessing.png', 133 'alt' => '', 134 'size' => array( 16, 16 ), 135 ); 136 case 'file_image': return array( 137 'ext' => '\.(gif|png|jpe?g)', 138 'file' => $rsc_subdir.'icons/fileicons/image2.png', 139 'alt' => '', 140 'size' => array( 16, 16 ), 141 ); 142 case 'file_www': return array( 143 'ext' => '\.html?', 144 'file' => $rsc_subdir.'icons/fileicons/www.png', 145 'alt' => '', 146 'size' => array( 16, 16 ), 147 ); 148 case 'file_log': return array( 149 'ext' => '\.log', 150 'file' => $rsc_subdir.'icons/fileicons/log.png', 151 'alt' => '', 152 'size' => array( 16, 16 ), 153 ); 154 case 'file_sound': return array( 155 'ext' => '\.(mp3|ogg|wav)', 156 'file' => $rsc_subdir.'icons/fileicons/sound.png', 157 'alt' => '', 158 'size' => array( 16, 16 ), 159 ); 160 case 'file_video': return array( 161 'ext' => '\.(mpe?g|avi)', 162 'file' => $rsc_subdir.'icons/fileicons/video.png', 163 'alt' => '', 164 'size' => array( 16, 16 ), 165 ); 166 case 'file_message': return array( 167 'ext' => '\.msg', 168 'file' => $rsc_subdir.'icons/fileicons/message.png', 169 'alt' => '', 170 'size' => array( 16, 16 ), 171 ); 172 case 'file_document': return array( 173 'ext' => '\.pdf', 174 'file' => $rsc_subdir.'icons/fileicons/pdf-document.png', 175 'alt' => '', 176 'size' => array( 16, 16 ), 177 ); 178 case 'file_php': return array( 179 'ext' => '\.php[34]?', 180 'file' => $rsc_subdir.'icons/fileicons/php.png', 181 'alt' => '', 182 'size' => array( 16, 16 ), 183 ); 184 case 'file_encrypted': return array( 185 'ext' => '\.(pgp|gpg)', 186 'file' => $rsc_subdir.'icons/fileicons/encrypted.png', 187 'alt' => '', 188 'size' => array( 16, 16 ), 189 ); 190 case 'file_tar': return array( 191 'ext' => '\.tar', 192 'file' => $rsc_subdir.'icons/fileicons/tar.png', 193 'alt' => '', 194 'size' => array( 16, 16 ), 195 ); 196 case 'file_tgz': return array( 197 'ext' => '\.tgz', 198 'file' => $rsc_subdir.'icons/fileicons/tgz.png', 199 'alt' => '', 200 'size' => array( 16, 16 ), 201 ); 202 case 'file_document': return array( 203 'ext' => '\.te?xt', 204 'file' => $rsc_subdir.'icons/fileicons/document.png', 205 'alt' => '', 206 'size' => array( 16, 16 ), 207 ); 208 case 'file_pk': return array( 209 'ext' => '\.(zip|rar)', 210 'file' => $rsc_subdir.'icons/fileicons/pk.png', 211 'alt' => '', 212 'size' => array( 16, 16 ), 213 ); 214 215 216 case 'expand': return array( 217 'file' => $rsc_subdir.'icons/expand.gif', 218 'alt' => '+', 219 'legend' => T_('Expand'), 220 'size' => array( 15, 15 ), 221 ); 222 case 'collapse': return array( 223 'file' => $rsc_subdir.'icons/collapse.gif', 224 'alt' => '-', 225 'legend' => T_('Collapse'), 226 'size' => array( 15, 15 ), 227 ); 228 229 case 'refresh': return array( 230 'file' => $rsc_subdir.'icons/refresh.png', 231 'alt' => T_('Refresh'), 232 'size' => array( 16, 16 ), 233 ); 234 case 'reload': return array( 235 'file' => $rsc_subdir.'icons/reload.gif', 236 'alt' => T_('Reload'), 237 'size' => array( 15, 15 ), 238 ); 239 240 case 'download': return array( 241 'file' => $rsc_subdir.'icons/download_manager.png', 242 'alt' => T_('Download'), 243 'size' => array( 16, 16 ), 244 ); 245 246 247 case 'warning': return array( 248 'file' => $rsc_subdir.'icons/warning.png', // TODO: not really transparent at its borders 249 'alt' => T_('Warning'), 250 'size' => array( 16, 16 ), 251 ); 252 253 case 'info': return array( 254 'file' => $rsc_subdir.'icons/info.gif', 255 'alt' => T_('Info'), 256 'size' => array( 16, 16 ), 257 ); 258 case 'email': return array( 259 'file' => $rsc_subdir.'icons/envelope.gif', 260 'alt' => T_('Email'), 261 'size' => array( 13, 10 ), 262 ); 263 case 'www': return array( /* user's web site, plugin's help url */ 264 'file' => $rsc_subdir.'icons/url.gif', 265 'alt' => T_('WWW'), 266 'legend' => T_('Website'), 267 'size' => array( 34, 17 ), 268 ); 269 270 case 'new': return array( 271 'file' => $rsc_subdir.'icons/new.gif', 272 'rollover' => true, 273 'alt' => T_('New'), 274 'size' => array( 16, 15 ), 275 ); 276 case 'copy': return array( 277 'file' => $rsc_subdir.'icons/copy.gif', 278 'alt' => T_('Copy'), 279 'size' => array( 14, 15 ), 280 ); 281 case 'edit': return array( 282 'file' => $rsc_subdir.'icons/edit.gif', 283 'alt' => T_('Edit'), 284 'size' => array( 16, 15 ), 285 ); 286 case 'properties': return array( 287 'file' => $rsc_subdir.'icons/properties.png', 288 'alt' => T_('Properties'), 289 'size' => array( 18, 13 ), 290 ); 291 case 'publish': return array( 292 'file' => $rsc_subdir.'icons/publish.gif', 293 'alt' => T_('Publish'), 294 'size' => array( 12, 15 ), 295 ); 296 case 'deprecate': return array( 297 'file' => $rsc_subdir.'icons/deprecate.gif', 298 'alt' => T_('Deprecate'), 299 'size' => array( 12, 15 ), 300 ); 301 case 'locate': return array( 302 'file' => $rsc_subdir.'icons/target.gif', 303 'alt' => T_('Locate'), 304 'size' => array( 15, 15 ), 305 ); 306 case 'delete': return array( 307 'file' => $rsc_subdir.'icons/delete.gif', 308 'alt' => T_('Del'), 309 'legend' => T_('Delete'), 310 'size' => array( 15, 15 ), 311 ); 312 case 'close': return array( 313 'file' => $rsc_subdir.'icons/close.gif', 314 'rollover' => true, 315 'alt' => T_('Close'), 316 'size' => array( 14, 14 ), 317 ); 318 319 320 case 'increase': return array( 321 'file' => $rsc_subdir.'icons/increase.gif', 322 'rollover' => true, 323 'alt' => T_('+'), 324 'size' => array( 15, 15 ), 325 ); 326 case 'decrease': return array( 327 'file' => $rsc_subdir.'icons/decrease.gif', 328 'rollover' => true, 329 'alt' => T_('-'), 330 'size' => array( 15, 15 ), 331 ); 332 333 case 'bullet_full': return array( 334 'file' => $rsc_subdir.'icons/bullet_full.png', 335 'alt' => '•', 336 'size' => array( 9, 9 ), 337 ); 338 case 'bullet_empty': return array( 339 'file' => $rsc_subdir.'icons/bullet_empty.png', 340 'alt' => ' ', 341 'size' => array( 9, 9 ), 342 ); 343 case 'bullet_red': return array( 344 'file' => $rsc_subdir.'icons/bullet_red.gif', 345 'alt' => ' ', 346 'size' => array( 9, 9 ), 347 ); 348 349 case 'activate': return array( 350 'file' => $rsc_subdir.'icons/bullet_activate.png', 351 'alt' => /* TRANS: Short for "Activate(d)" */ T_('Act.'), 352 'legend' => T_('Activate'), 353 'size' => array( 17, 17 ), 354 ); 355 case 'deactivate': return array( 356 'file' => $rsc_subdir.'icons/bullet_deactivate.png', 357 'alt' => /* TRANS: Short for "Deactivate(d)" */ T_('Deact.'), 358 'legend' => T_('Deactivate'), 359 'size' => array( 17, 17 ), 360 ); 361 case 'enabled': return array( 362 'file' => $rsc_subdir.'icons/bullet_full.png', 363 'alt' => /* TRANS: Short for "Activate(d)" */ T_('Act.'), 364 'legend' => T_('Activated'), 365 'size' => array( 9, 9 ), 366 ); 367 case 'disabled': return array( 368 'file' => $rsc_subdir.'icons/bullet_empty.png', 369 'alt' => /* TRANS: Short for "Deactivate(d)" */ T_('Deact.'), 370 'legend' => T_('Deactivated'), 371 'size' => array( 9, 9 ), 372 ); 373 374 case 'link': return array( 375 'file' => $rsc_subdir.'icons/chain_link.gif', 376 /* TRANS: Link + space => verb (not noun) */ 'alt' => T_('Link '), 377 'size' => array( 14, 14 ), 378 ); 379 case 'unlink': return array( 380 'file' => $rsc_subdir.'icons/chain_unlink.gif', 381 'alt' => T_('Unlink'), 382 'size' => array( 14, 14 ), 383 ); 384 385 case 'calendar': return array( 386 'file' => $rsc_subdir.'icons/calendar.gif', 387 'alt' => T_('Calendar'), 388 'size' => array( 16, 15 ), 389 ); 390 391 case 'parent_childto_arrow': return array( 392 'file' => $rsc_subdir.'icons/parent_childto_arrow.png', 393 'alt' => T_('+'), 394 'size' => array( 14, 17 ), 395 ); 396 397 case 'help': return array( 398 'file' => $rsc_subdir.'icons/help-browser.png', 399 'alt' => T_('Help'), 400 'size' => array( 16, 16 ), 401 ); 402 case 'manual': return array( 403 'file' => $rsc_subdir.'icons/manual.gif', 404 'rollover' => true, 405 'alt' => T_('Help'), 406 'legend' => T_('Online Manual'), 407 'size' => array( 16, 15 ), 408 ); 409 case 'permalink': return array( 410 'file' => $rsc_subdir.'icons/minipost.gif', 411 'alt' => T_('Permalink'), 412 'size' => array( 11, 13 ), 413 ); 414 case 'history': return array( 415 'file' => $rsc_subdir.'icons/clock.png', 416 'alt' => T_('History'), 417 'size' => array( 15, 15 ), 418 ); 419 420 case 'file_allowed': return array( 421 'file' => $rsc_subdir.'icons/unlocked.gif', 422 'alt' => T_( 'Allowed' ), 423 'size' => array( 16, 14 ), 424 ); 425 case 'file_not_allowed': return array( 426 'file' => $rsc_subdir.'icons/locked.gif', 427 'alt' => T_( 'Blocked' ), 428 'size' => array( 16, 14 ), 429 ); 430 431 case 'comments': return array( 432 'file' => $rsc_subdir.'icons/comments.gif', 433 'alt' => T_('Comments'), 434 'size' => array( 15, 16 ), 435 ); 436 case 'nocomment': return array( 437 'file' => $rsc_subdir.'icons/nocomment.gif', 438 'alt' => T_('Comments'), 439 'size' => array( 15, 16 ), 440 ); 441 442 case 'move_up': return array( 443 'file' => $rsc_subdir.'icons/move_up.gif', 444 'rollover' => true, 445 'alt' => T_( 'Up' ), 446 'size' => array( 12, 13 ), 447 ); 448 case 'move_down': return array( 449 'file' => $rsc_subdir.'icons/move_down.gif', 450 'rollover' => true, 451 'alt' => T_( 'Down'), 452 'size' => array( 12, 13 ), 453 ); 454 case 'nomove_up': return array( 455 'file' => $rsc_subdir.'icons/nomove_up.gif', 456 'alt' => T_( 'Sort by order' ), 457 'size' => array( 12, 13 ), 458 ); 459 case 'nomove_down': return array( 460 'file' => $rsc_subdir.'icons/nomove_down.gif', 461 'alt' => T_( 'Sort by order' ), 462 'size' => array( 12, 13 ), 463 ); 464 case 'nomove': return array( 465 'file' => $rsc_subdir.'icons/nomove.gif', 466 'size' => array( 12, 13 ), 467 ); 468 469 case 'assign': return array( 470 'file' => $rsc_subdir.'icons/handpoint13.gif', 471 'alt' => T_('Assigned to'), 472 'size' => array( 27, 13 ), 473 ); 474 case 'check_all': return array( 475 'file' => $rsc_subdir.'icons/check_all.gif', 476 'alt' => T_('Check all'), 477 'size' => array( 17, 17 ), 478 ); 479 case 'uncheck_all': return array( 480 'file' => $rsc_subdir.'icons/uncheck_all.gif', 481 'alt' => T_('Uncheck all'), 482 'size' => array( 17, 17 ), 483 ); 484 485 case 'reset_filters': return array( 486 'file' => $rsc_subdir.'icons/reset_filter.gif', 487 'alt' => T_('Reset all filters'), 488 'size' => array( 16, 16 ), 489 ); 490 491 case 'allowback': return array( 492 'file' => $rsc_subdir.'icons/tick.gif', 493 'alt' => T_('Allow back'), 494 'size' => array( 13, 13 ), 495 ); 496 case 'ban': return array( 497 'file' => $rsc_subdir.'icons/noicon.gif', // TODO: make this transparent 498 'alt' => /* TRANS: Abbrev. */ T_('Ban'), 499 'size' => array( 13, 13 ), 500 ); 501 case 'play': return array( // used to write an e-mail, visit site or contact through IM 502 'file' => $rsc_subdir.'icons/play.png', 503 'alt' => '>', 504 'size' => array( 14, 14 ), 505 ); 506 507 case 'feed': return array( 508 'file' => $rsc_subdir.'icons/feed-icon-16x16.gif', 509 'alt' => T_('XML Feed'), 510 'size' => array( 16, 16 ), 511 ); 512 513 case 'star_on': return array( 514 'file' => $rsc_subdir.'icons/star_small.gif', 515 'alt' => '*', 516 'size' => array( 12, 12 ), 517 ); 518 case 'star_off': return array( 519 'file' => $rsc_subdir.'icons/star_small_gray.gif', 520 'alt' => '-', 521 'size' => array( 12, 12 ), 522 ); 523 } 524 } 525 526 /* 527 * $Log: _icons.php,v $ 528 * Revision 1.62 2007/11/02 01:42:16 fplanque 529 * comment ratings 530 * 531 * Revision 1.61 2007/09/12 21:00:30 fplanque 532 * UI improvements 533 * 534 * Revision 1.60 2007/09/08 23:20:14 fplanque 535 * gettext update 536 * 537 * Revision 1.59 2007/09/08 19:31:28 fplanque 538 * cleanup of XML feeds for comments on individual posts. 539 * 540 * Revision 1.58 2007/05/23 22:45:07 blueyed 541 * TRANS comments 542 * 543 * Revision 1.57 2007/03/24 20:35:57 fplanque 544 * minor 545 * 546 * Revision 1.56 2007/03/04 05:24:52 fplanque 547 * some progress on the toolbar menu 548 * 549 * Revision 1.55 2007/01/29 09:24:41 fplanque 550 * icon stuff 551 * 552 * Revision 1.54 2007/01/23 22:30:14 fplanque 553 * empty icons cleanup 554 * 555 * Revision 1.53 2007/01/07 18:42:35 fplanque 556 * cleaned up reload/refresh icons & links 557 * 558 * Revision 1.52 2006/12/26 00:55:58 fplanque 559 * wording 560 * 561 * Revision 1.51 2006/12/07 20:03:31 fplanque 562 * Woohoo! File editing... means all skin editing. 563 * 564 * Revision 1.50 2006/12/02 22:58:12 fplanque 565 * minor 566 * 567 */ 568 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |