My Web Gallery
- current version : 2.2 RC 2
- theme : nanbean theme(moniwiki의 coldgray를 컨버팅함) 사용.
- visit http://gallery.menalto.com
1.1. geturls에서 lightbox 지원 추가 #
templates/GetUrls.tpl
114 line 변경.geshi php <input name="forum" type="text" readonly="true" size="{$width}" value="<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true}"><img src="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.resizeId`" forceFullUrl=true}" /></a>"> <a onclick="javascript:clipboardData.setData('Text','<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true htmlEntities=false}"><img src="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.resizeId`" forceFullUrl=true}" /></a>');window.status = '[R2F]{$GetUrlsData.resizeId}[/R2F] copied to your clipboard for forum posting!';" href>[R2F]</a>-->
geshi php <input name="forum" type="text" readonly="true" size="{$width}" value="<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true}" rel=lightbox ><img src="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.resizeId`" forceFullUrl=true}" /></a>"> <a onclick="javascript:clipboardData.setData('Text','<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true htmlEntities=false}" rel=lightbox ><img src="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.resizeId`" forceFullUrl=true}" /></a>');window.status = '[R2F]{$GetUrlsData.resizeId}[/R2F] copied to your clipboard for forum posting!';" href>[R2F]</a>
1.2. Title에 nanbean.net 추가하기 #
theme.inc에 다음 추가하여 사이트명 입력 가능하도록 수정
$settings[] = array('key' => 'siteName', 'name' => $this->translate(' Site Name '), 'type' => 'text-field', 'value' => $params['siteName']);
theme.tpl에 다음을 수정하여 입력한 사이트명 출력하도록 수정
{* If Gallery doesn't provide a header, we use the album/photo title (or filename) *} {if empty($head.title)} <title>{if ($theme.params.siteName)}{$theme.params.siteName} : {/if} {$theme.item.title|default:$theme.item.pathComponent|markup:strip}</title> {/if}
1.3. 전체화면 보기에서 lightbox 사용하기 #
theme.inc에 다음 추가하여 LightBox 사용여부 선택가능하도록 수정
$settings[] = array('key' => 'useLightBox', 'name' => $this->translate('Use lighbox script when viewing full size picture'), 'type' => 'checkbox', 'value' => $params['useLightBox']);
theme.tpl에 다음을 추가하여 lightbox.js 불러오기
{if ($theme.params.useLightBox)} <script type="text/javascript" src="{g->theme url="lightbox.js"}"></script> {/if}
photo.tpl에 다음을 추가하여 lightbox 설정
<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`" arg3="imageViewsIndex=`$nextIndex`"}" {if ($theme.params.useLightBox)}rel="lightbox" {/if}>