E D R , A S I H C RSS
Show your affection, which will probably meet with pleasant response.

My Web Gallery

Contents

1. Gallery2 수정내용
1.1. geturls에서 lightbox 지원 추가
1.2. Title에 nanbean.net 추가하기
1.3. 전체화면 보기에서 lightbox 사용하기
1.4. Search Box 를 상단으로 변경
2. Gallery2 한글화


1. Gallery2 수정내용 #

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}>



1.4. Search Box 를 상단으로 변경 #


theme.tpl 상단에 Search Box 삽입
{g->block type="search.SearchBlock" showAdvancedLink=false}

javascript 에러가 발생하므로 theme.inc에
$ret = $this->preloadBlock($template, 'search.SearchBlock');
을 return 앞에 모두 삽입


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2024-02-11 16:46:59
Processing time 0.0258 sec