Changeset 3598 for extensions
- Timestamp:
- Jul 16, 2009, 12:37:15 AM (15 years ago)
- Location:
- extensions/piclens
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/piclens/admin/piclens_admin.php
r3410 r3598 40 40 l10n('piclens_3dwallconfig_tab'), 41 41 $my_base_url.'&tab=piclenswallconfig'); 42 $tabsheet->add('piclenswallconfig2', 43 // 'Configugation PiclensWall', 44 l10n('piclens_3dwallconfig2_tab'), 45 $my_base_url.'&tab=piclenswallconfig2'); 42 46 $tabsheet->select($page['tab']); 43 47 $tabsheet->assign(); -
extensions/piclens/admin/piclenswallconfig.php
r3536 r3598 17 17 $me = get_plugin_data($plugin_id); 18 18 19 $template->set_filenames( array('plugin_admin_content' => PICLENS_ROOT.'/admin/piclenswallconfig.tpl') ); 19 $template->set_filenames( 20 array('plugin_admin_content' => PICLENS_ROOT.'/admin/piclenswallconfig.tpl' 21 ) ); 20 22 23 21 24 22 25 if (isset($_POST['submit'])) { 23 26 $me->my_config['piclens_wall'] = isset($_POST['piclens_wall']); 24 27 $me->my_config['piclens_wall_title'] = $_POST['piclens_wall_title']; 25 $me->my_config['piclens_wall_color'] = $_POST['background_color'];26 28 $me->my_config['piclens_wall_height'] = $_POST['piclens_wall_height']; 27 29 $me->my_config['piclens_wall_categories'] = isset($_POST['categories']) ? 28 30 array_map("mysql_escape_string", $_POST['categories']) : 29 31 array(); 32 30 33 $me->my_config['piclens_wall_nav'] = isset($_POST['piclens_wall_nav']); 31 34 $me->my_config['piclens_wall_cat_nav_replace'] = isset($_POST['categories_nav']) ? … … 35 38 $me->my_config['piclens_wall_ontop'] = isset($_POST['piclens_wall_ontop']); 36 39 $me->my_config['piclens_wall_oncat'] = isset($_POST['piclens_wall_oncat']); 37 $me->my_config['piclens_wall_showembed'] = isset($_POST['piclens_wall_embed']);38 $me->my_config['piclens_wall_showfullscreen'] = isset($_POST['piclens_wall_fullscreen']);39 $me->my_config['piclens_wall_showsearch'] = isset($_POST['piclens_wall_search']);40 $me->my_config['piclens_wall_showsearch'] = isset($_POST['piclens_wall_search']);41 $me->my_config['piclens_wall_transparent'] = isset($_POST['piclens_wall_transparent']);42 40 43 41 $me->my_config['piclens_wall_spec'] = isset($_POST['piclens_wall_spec']); … … 49 47 50 48 $me->my_config['piclens_wall_swflocal'] = isset($_POST['piclens_wall_swflocal']); 51 $me->my_config['piclens_wall_nb_ligne'] = $_POST['piclens_wall_nb_ligne'];52 49 53 50 if ($pwgstuff_ok && $me->my_config['piclens_wall']) … … 71 68 } 72 69 73 //$template->assign('PICLENS_COPY_CROSSDOMAIN', file_exists($filename) ? l10n('piclens_label_crossdomain1') : '<input type="checkbox" name="crossdomain_copy" /> '.l10n('piclens_label_crossdomain2'));74 75 //$template->assign('PICLENS_COPY_CROSSDOMAIN', file_exists($filename));76 77 //$template->assign('PICLENS_PWGSTUFF', $pwgstuff_ok ? 'disabled="disabled"' : '');78 //$template->assign('PICLENS_PWGSTUFF1', $pwgstuff_ok ? l10n('piclens_label_pwgstuff1'): l10n('piclens_label_pwgstuff2'));79 80 //$template->assign('PICLENS_WALL_ACTIVATED', $me->my_config['piclens_wall'] ? 'checked="checked"' : '' );81 82 //$template->assign(array($me->my_config['piclens_wall_color'].'_CHECKED' => 'checked="checked"'));83 //$template->assign(array($me->my_config['piclens_wall_specif'].'_CHECKED' => 'checked="checked"'));84 //$template->assign(array('PICLENS_WALL_HEIGHT' => $me->my_config['piclens_wall_height']));85 86 //$template->assign('CROSSDOMAIN_LNK', PICLENS_PATH.'crossdomain.xml');87 88 70 $query = ' 89 71 SELECT id,name,uppercats,global_rank … … 100 82 true); 101 83 102 //$template->assign('PICLENS_WALL_ONTOP', $me->my_config['piclens_wall_ontop'] ? 'checked="checked"' : '' );103 //$template->assign('PICLENS_WALL_ONCAT', $me->my_config['piclens_wall_oncat'] ? 'checked="checked"' : '' );104 84 105 //$template->assign('PICLENS_WALL_EMBED', $me->my_config['piclens_wall_showembed'] ? 'checked="checked"' : '' );106 //$template->assign('PICLENS_WALL_FULLSCREEN', $me->my_config['piclens_wall_showfullscreen'] ? 'checked="checked"' : '' );107 //$template->assign('PICLENS_WALL_SEARCH', $me->my_config['piclens_wall_showsearch'] ? 'checked="checked"' : '' );108 85 109 //$template->assign('PICLENS_WALL_NAV', $me->my_config['piclens_wall_nav'] ? 'checked="checked"' : '' );110 //$template->assign('PICLENS_WALL_TITLE', $me->my_config['piclens_wall_title']);111 112 //$template->assign('PICLENS_WALL_SPEC', $me->my_config['piclens_wall_spec'] ? 'checked="checked"' : '' );113 114 //$template->assign('PICLENS_WALL_SPEC', $me->my_config['piclens_wall_spec'] ? 'checked="checked"' : '' );115 //$template->assign('PICLENS_WALL_SPEC_RECENTPICS', $me->my_config['piclens_wall_spec_recentpics'] ? 'checked="checked"' : '' );116 //$template->assign('PICLENS_WALL_SPEC_RECENTCATS', $me->my_config['piclens_wall_spec_recentcats'] ? 'checked="checked"' : '' );117 //$template->assign('PICLENS_WALL_SPEC_MOSTVISITED', $me->my_config['piclens_wall_spec_mostvisited'] ? 'checked="checked"' : '' );118 //$template->assign('PICLENS_WALL_SPEC_BESTRATED', $me->my_config['piclens_wall_spec_bestrated'] ? 'checked="checked"' : '' );119 //$template->assign('PICLENS_WALL_SPEC_FAVORITES', $me->my_config['piclens_wall_spec_favorites'] ? 'checked="checked"' : '' );120 86 121 87 $template->assign(array( … … 124 90 'PICLENS_PWGSTUFF1' => ($pwgstuff_ok ? l10n('piclens_label_pwgstuff1'): l10n('piclens_label_pwgstuff2')), 125 91 'PICLENS_WALL_ACTIVATED' => ($me->my_config['piclens_wall'] ? 'checked="checked"' : '' ), 126 $me->my_config['piclens_wall_color'].'_CHECKED' => 'checked="checked"',127 92 $me->my_config['piclens_wall_specif'].'_CHECKED' => 'checked="checked"', 128 93 'PICLENS_WALL_HEIGHT' => $me->my_config['piclens_wall_height'], … … 130 95 'PICLENS_WALL_ONTOP' => ($me->my_config['piclens_wall_ontop'] ? 'checked="checked"' : '' ), 131 96 'PICLENS_WALL_ONCAT' => ($me->my_config['piclens_wall_oncat'] ? 'checked="checked"' : '' ), 132 'PICLENS_WALL_EMBED' => ($me->my_config['piclens_wall_showembed'] ? 'checked="checked"' : '' ),133 'PICLENS_WALL_FULLSCREEN' => ($me->my_config['piclens_wall_showfullscreen'] ? 'checked="checked"' : '' ),134 'PICLENS_WALL_SEARCH' => ($me->my_config['piclens_wall_showsearch'] ? 'checked="checked"' : '' ),135 'PICLENS_WALL_TRANSPARENT' => ($me->my_config['piclens_wall_transparent'] ? 'checked="checked"' : '' ),136 97 'PICLENS_WALL_NAV' => ($me->my_config['piclens_wall_nav'] ? 'checked="checked"' : '' ), 137 98 'PICLENS_WALL_TITLE' => $me->my_config['piclens_wall_title'], … … 143 104 'PICLENS_WALL_SPEC_BESTRATED' => ($me->my_config['piclens_wall_spec_bestrated'] ? 'checked="checked"' : '' ), 144 105 'PICLENS_WALL_SPEC_FAVORITES' => ($me->my_config['piclens_wall_spec_favorites'] ? 'checked="checked"' : '' ), 145 'PICLENS_WALL_SWFLOCAL' => ($me->my_config['piclens_wall_swflocal'] ? 'checked="checked"' : '' ), 146 'PICLENS_WALL_NB_LIGNE' => $me->my_config['piclens_wall_nb_ligne'] 106 'PICLENS_WALL_SWFLOCAL' => ($me->my_config['piclens_wall_swflocal'] ? 'checked="checked"' : '' ) 147 107 )); 148 149 108 150 109 $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); -
extensions/piclens/admin/piclenswallconfig.tpl
r3536 r3598 79 79 80 80 <tr> 81 <td align="right">{'piclens_wallcfg_color'|@translate} </td>82 <td><input type="radio" name="background_color" value="dark" {$dark_CHECKED}> {'piclens_wallcfg_colorB'|@translate}</td>83 </tr>84 <tr>85 <td align="right"></td>86 <td><input type="radio" name="background_color" value="white" {$white_CHECKED}> {'piclens_wallcfg_colorW'|@translate}</td>87 </tr>88 <tr>89 81 <td align="right">{'piclens_wallcfg_heigh'|@translate} </td> 90 82 <td><input type="text" size="3" maxlength="3" value="{$PICLENS_WALL_HEIGHT}" name="piclens_wall_height"> px</td> 91 </tr>92 <br>93 <tr>94 <td align="right"> {'piclens_wallcfg_option'|@translate} </td>95 <td>96 <input type="checkbox" name="piclens_wall_embed" {$PICLENS_WALL_EMBED}/> {'piclens_wallcfg_option-opt1'|@translate}97 <br>98 <input type="checkbox" name="piclens_wall_fullscreen" {$PICLENS_WALL_FULLSCREEN}/> {'piclens_wallcfg_option-opt2'|@translate}99 <br>100 <input type="checkbox" name="piclens_wall_search" {$PICLENS_WALL_SEARCH}/> {'piclens_wallcfg_option-opt3'|@translate}101 <br>102 <input type="checkbox" name="piclens_wall_transparent" {$PICLENS_WALL_TRANSPARENT}/> {'piclens_wallcfg_transparent'|@translate}103 <br/>104 {'piclens_wallcfg_nbligne'|@translate} <input type="text" size="2" maxlength="2" value="{$PICLENS_WALL_NB_LIGNE}" name="piclens_wall_nb_ligne"> 105 <br/>106 </td>107 83 </tr> 108 84 <br> … … 126 102 </td> 127 103 </tr> 104 128 105 </TABLE> 129 106 </fieldset> -
extensions/piclens/admin/rssfeed.php
r3536 r3598 20 20 21 21 //$order_list = array('Defaut Piwigo', 'Date de Creation', 'Date d\'ajout', 'Note Moyenne', 'Plus vues', 'Nom du fichier', 'Id', 'Aléatoire', 'Catégories'); 22 $order_list = array(l10n('piclens_label_orderPiwigo'), l10n('piclens_label_orderCreDate'), l10n('piclens_label_orderAddDate'), l10n('piclens_label_order Average'), l10n('piclens_label_orderBest'), l10n('piclens_label_orderName'), l10n('piclens_label_orderID'), l10n('piclens_label_orderRand'), l10n('piclens_label_orderCat'), l10n('piclens_label_orderRank'));22 $order_list = array(l10n('piclens_label_orderPiwigo'), l10n('piclens_label_orderCreDate'), l10n('piclens_label_orderAddDate'), l10n('piclens_label_orderRank'), l10n('piclens_label_orderBest'), l10n('piclens_label_orderName'), l10n('piclens_label_orderID'), l10n('piclens_label_orderRand'), l10n('piclens_label_orderCat')); 23 23 //$sort_list = array('Defaut Piwigo', 'Croissant', 'Decroissant'); 24 24 $sort_list = array(l10n('piclens_label_sortPiwigo'), l10n('piclens_label_sortUp'), l10n('piclens_label_sortDown')); … … 29 29 $normal_list = array(l10n('piclens_label_TypeTN'), l10n('piclens_label_TypeNorm'), l10n('piclens_label_TypeHigh')); 30 30 //$nameformat_list = array('Nom vignette : taille', 'Nom vignette', 'Nom de l\'image'); 31 $nameformat_list = array(l10n('piclens_label_Name1'), l10n('piclens_label_Name2'), l10n('piclens_label_Name3') , l10n('piclens_label_Name4'));31 $nameformat_list = array(l10n('piclens_label_Name1'), l10n('piclens_label_Name2'), l10n('piclens_label_Name3')); 32 32 //$descformat_list = array('Rien', 'Nom de l\'image', 'Description de l\'image'); 33 33 $descformat_list = array(l10n('piclens_label_Desc1'), l10n('piclens_label_Desc2'), l10n('piclens_label_Desc3')); -
extensions/piclens/generate_rss.php
r3536 r3598 42 42 $thumb_secure = array('', '&thumb=1', ''); // correspondant a 1-->'miniature' et 2-->'normal' 43 43 $normal_secure = array('', '&thumb=1', '', '&highdef=1'); // correspondant a 1-->'miniature' et 2-->'normal' et 3 --> High 44 $order_list = array('', $conf['order_by_inside_category'], 'ORDER BY date_creation', 'ORDER BY date_available', 'ORDER BY average_rate', 'ORDER BY hit', 'ORDER BY file', 'ORDER BY id', 'ORDER BY RAND()', 'ORDER BY category_id' , 'ORDER BY category_id, rank ');44 $order_list = array('', $conf['order_by_inside_category'], 'ORDER BY date_creation', 'ORDER BY date_available', 'ORDER BY average_rate', 'ORDER BY hit', 'ORDER BY file', 'ORDER BY id', 'ORDER BY RAND()', 'ORDER BY category_id'); 45 45 $order_sort = array('', '', ' ASC', ' DESC'); 46 46 … … 508 508 . $row['file'] . "]]></title>\n"; 509 509 break; 510 case 4 :511 // Rien512 echo "<title></title>\n";513 break;514 515 510 default : 516 511 // format nom fichier : taille -
extensions/piclens/include/default_values.inc.php
r3536 r3598 62 62 63 63 $piclens_default_values['piclens_wall_swflocal'] = false; // Flash swf local utilise pour le mur 3D (pas besoin du fichier crossdomain.xml mais pas de MAJ automatique du flash) 64 64 65 $piclens_default_values['piclens_wall_nb_ligne'] = "3"; 66 $piclens_default_values['piclens_wall_showChrome'] = true; 67 $piclens_default_values['piclens_wall_showDescription'] = true; 68 $piclens_default_values['piclens_wall_showReflections'] = true; 69 $piclens_default_values['piclens_wall_showTutorial'] = true; 70 $piclens_default_values['piclens_wall_showNavArrows'] = true; 71 $piclens_default_values['piclens_wall_backgroundAlpha'] = "0.0"; 65 72 66 73 ?> -
extensions/piclens/language/fr_FR/plugin.lang.php
r3536 r3598 84 84 $lang['piclens_rsscfg_video'] = 'Activation des vidéos dans l\'interface Piclens/Cooliris'; 85 85 86 $lang['piclens_label_orderPiwigo'] = 'D efaut Piwigo';87 $lang['piclens_label_orderCreDate'] = 'Date de Cr eation';86 $lang['piclens_label_orderPiwigo'] = 'Défaut Piwigo'; 87 $lang['piclens_label_orderCreDate'] = 'Date de Création'; 88 88 $lang['piclens_label_orderAddDate'] = 'Date d\'ajout'; 89 89 $lang['piclens_label_orderAverage'] = 'Note Moyenne'; … … 98 98 $lang['piclens_label_sortCat'] = 'Piclens sur Catégories'; 99 99 100 $lang['piclens_label_sortPiwigo'] = 'Defaut Piwigo';100 $lang['piclens_label_sortPiwigo'] = $lang['piclens_label_orderPiwigo']; 101 101 $lang['piclens_label_sortUp'] = 'Croissant'; 102 102 $lang['piclens_label_sortDown'] = 'Decroissant'; … … 104 104 $lang['piclens_label_TypeTN'] = 'Miniature'; 105 105 $lang['piclens_label_TypeNorm'] = 'Normal'; 106 $lang['piclens_label_TypeHigh'] = 'H igh';106 $lang['piclens_label_TypeHigh'] = 'Haute Définition'; 107 107 108 108 $lang['piclens_label_Name1'] = 'Nom vignette : taille'; … … 111 111 $lang['piclens_label_Name4'] = 'Rien'; 112 112 113 $lang['piclens_label_Desc1'] = 'Rien';114 $lang['piclens_label_Desc2'] = 'Nom de l\'image';113 $lang['piclens_label_Desc1'] = $lang['piclens_label_Name4']; 114 $lang['piclens_label_Desc2'] = $lang['piclens_label_Name3']; 115 115 $lang['piclens_label_Desc3'] = 'Description de l\'image'; 116 116 … … 120 120 $lang['piclens_wallcfg_actived'] = 'Activation du mur 3D Cooliris '; 121 121 $lang['piclens_wallcfg_name'] = 'Titre du mur 3D Cooliris :'; 122 $lang['piclens_wallcfg_info'] = '<b>Important pour que le mur 3D fonctionne :</b> Il est n ecessaire de copier le fichier';122 $lang['piclens_wallcfg_info'] = '<b>Important pour que le mur 3D fonctionne :</b> Il est nécessaire de copier le fichier'; 123 123 $lang['piclens_wallcfg_info_suite'] = 'à la racine du site (ou modifier le fichier existant)'; 124 124 $lang['piclens_wallcfg_color'] = 'Couleur du fond pour le mur 3D Cooliris :'; -
extensions/piclens/main.inc.php
r3536 r3598 2 2 /* 3 3 * Plugin Name: CoolIris-Piclens 4 * Version: 0.3. 54 * Version: 0.3.6 5 5 * Description: Cooliris/Piclens activation 6 6 * Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=234 … … 67 67 /* Correction dans la traduction chinoise simplifiée */ 68 68 /* Correction page admin : titre mur 3D non sauvegarde*/ 69 /* Ajout parametre nombre lignes pour le mur 3D embeded*/ 70 /* Ajout possibilité de ne pas afficher de titre sous les images*/ 71 /* Ajout/correction tri par rang de l'image*/ 72 69 /* 0.3.6 --> Test integration double select */ 73 70 74 71 75 72 /********* TODO *********/ 76 //- Ajouter un onglet en page d'admin pour tous les parametres du mur embeded (http://developer.cooliris.com/?p=embed/flash)77 //- Tri par rang78 73 //- possibilite d'afficher les derniers commentaires des images dans piclens 74 //- intégrer la selection double des categories 79 75 80 76 -
extensions/piclens/piclenswall.php
r3536 r3598 44 44 $template->set_filenames(array('piclenswall' => PICLENS_ROOT . '/piclenswall.tpl')); 45 45 46 // $template->assign('piclenswalltitle', $this->my_config['piclens_wall_title']);47 // $template->assign('rssfeed', $rssfeed);48 // $template->assign('color', $this->my_config['piclens_wall_color']);49 // $template->assign('height', $this->my_config['piclens_wall_height']);50 // $template->assign('showfullscreen', ($this->my_config['piclens_wall_showfullscreen'] ? "true" : "false"));51 // $template->assign('showembed', ($this->my_config['piclens_wall_showembed'] ? "true" : "false"));52 // $template->assign('showsearch', ($this->my_config['piclens_wall_showsearch'] ? "true" : "false"));53 46 54 47 $template->assign(array( … … 62 55 'transparent' => $this->my_config['piclens_wall_transparent'], 63 56 'swf_link' => ($this->my_config['piclens_wall_swflocal'] ? $this->root_site_piclens.PICLENS_PATH.'swf/cooliris.swf' : 'http://apps.cooliris.com/embed/cooliris.swf'), 64 'nbligne' => $this->my_config['piclens_wall_nb_ligne'] 57 'nbligne' => (isset($this->my_config['piclens_wall_nb_ligne']) ? $this->my_config['piclens_wall_nb_ligne'] : "3"), 58 59 'showChrome' => ($this->my_config['piclens_wall_showChrome'] ? "true" : "false"), 60 'showDescription' => ($this->my_config['piclens_wall_showDescription'] ? "true" : "false"), 61 'showReflections' => ($this->my_config['piclens_wall_showReflections'] ? "true" : "false"), 62 'showTutorial' => ($this->my_config['piclens_wall_showTutorial'] ? "true" : "false"), 63 'showNavArrows' => ($this->my_config['piclens_wall_showNavArrows'] ? "true" : "false"), 64 'backgroundAlpha' => isset($this->my_config['piclens_wall_backgroundAlpha']) ? $this->my_config['piclens_wall_backgroundAlpha'] : "0.0", 65 66 65 67 )); 66 68 -
extensions/piclens/piclenswall.tpl
r3536 r3598 9 9 <object id="o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 10 10 width="100%" height="{$height}" > 11 <param name="movie" value="{$swf_link}?feed={$rssfeed}&style={$color}& numRows={$nbligne}&showEmbed={$showembed}&showFullScreen={$showfullscreen}&showSearch={$showsearch}" />11 <param name="movie" value="{$swf_link}?feed={$rssfeed}&style={$color}&showEmbed={$showembed}&showFullScreen={$showfullscreen}&showSearch={$showsearch}&numRows={$nbligne}&showChrome={$showChrome}&showDescription={$showDescription}&showReflections={$showReflections}&showTutorial={$showTutorial}&showNavArrows={$showNavArrows}&backgroundAlpha={$backgroundAlpha}" /> 12 12 <param name="allowFullScreen" value="{$showfullscreen}" /> 13 13 <param name="showEmbed" value="{$showembed}" /> 14 14 <param name="showSearch" value="{$showsearch}" /> 15 15 <param name="allowScriptAccess" value="always" /> 16 <param name="flashvars" value="feed=api://www.flickr.com/&style={$color}&numRows={$nbligne}" /> 16 <param name="flashvars" value="feed={$rssfeed}&style={$color}&showEmbed={$showembed}&showFullScreen={$showfullscreen}&showSearch={$showsearch}&numRows={$nbligne}&showChrome={$showChrome}&showDescription={$showDescription}&showReflections={$showReflections}&showTutorial={$showTutorial}&showNavArrows={$showNavArrows}&backgroundAlpha={$backgroundAlpha}" /> 17 17 18 18 19 {if $transparent} 19 20 <param name="wmode" value="transparent" /> 20 21 {/if} 21 <embed {if $transparent}WMODE="transparent" {/if} type="application/x-shockwave-flash" src="{$swf_link}?feed={$rssfeed}&style={$color}& numRows={$nbligne}&showEmbed={$showembed}&showFullScreen={$showfullscreen}&showSearch={$showsearch}" width="100%" height="{$height}" showEmbed="{$showembed}" showSearch="{$showsearch}" allowFullScreen="{$showfullscreen}" allowScriptAccess="always" style="{$color}" numRows="{$nbligne}"/>22 <embed {if $transparent}WMODE="transparent" {/if} type="application/x-shockwave-flash" src="{$swf_link}?feed={$rssfeed}&style={$color}&showEmbed={$showembed}&showFullScreen={$showfullscreen}&showSearch={$showsearch}&numRows={$nbligne}&showChrome={$showChrome}&showDescription={$showDescription}&showReflections={$showReflections}&showTutorial={$showTutorial}&showNavArrows={$showNavArrows}&backgroundAlpha={$backgroundAlpha}" width="100%" height="{$height}" showEmbed="{$showembed}" showSearch="{$showsearch}" allowFullScreen="{$showfullscreen}" allowScriptAccess="always" style="{$color}" numRows="{$nbligne}" showChrome="{$showChrome}" showDescription="{$showDescription}" showReflections="{$showReflections}" showTutorial="{$showTutorial}" showNavArrows="{$showNavArrows}" backgroundAlpha="{$backgroundAlpha}"/> 22 23 </object> 23 24 </center> 24 25 25 26 26 </div> 27 27 {/if}
Note: See TracChangeset
for help on using the changeset viewer.