WordPress

WordPress용 Flickr Photo Album 플러그-인

WordPress용 Flickr 플러그-인을 찾다가 “Flickr Photo Album for WordPress”을 발견했다.

코드가 잘 만들어져있는지 모르겠으나 Flickr와 연동이 잘 되어보이고 비 공개 사진을 막는 기능은 마음에 들었다.

마음에 들지 않는 것은 사이드 바에 적용한 경우 사진 업데이트가 시간이 걸리는 데 이 업데이트가 완료되기 전까지는 사이드 바 전체가 출력되지 않는다는 것이다.

간단하게 설치할 수 있었고 영어로 나오는 것이 마음에 들지 않아 한글화를 했다.

L10N을 지원하지 않아서 소스를 UTF-8로 변경하고 한국어로 입력해야했다.

그리고 지금 사용하는 테마와 잘 맞지 않는 부분이 있어서 수정했다.

참고

WordPress 2.6 설치

WordPress 2.6을 테스트 환경으로 정하고 설치를 하였다.

1. Apache 설정

# cd config
# vi vhosts.conf
...
<Directory /blog/blog_name/html/blog>
AllowOverride All
Allow from all
</Directory>

2. MySQL 데이터베이스 생성

# mysql -u root -p mysql
mysql> create database blog_db;
mysql> grant all privileges on 'blog_db' to 'blog_user'@'localhost'
    -> identified by 'blog_passwd';
myqsl> flush privileges;
mysql> exit

3. WordPress 설치

# cd html
# wget http://wordpress.org/latest.zip
# unzip lastest.zip
# mv wordpress blog
# cd blog
# touch .htaccess
# chmod 666 .htaccess
# chmod -R 777 wp-content
# mv wp-config-sample.php wp-config.php
# vi wp-config.php
define('DB_NAME', 'blog_db');
define('DB_USER', 'blog_user');
define('DB_PASSWORD', 'blog_passwd');
...
define ('WPLANG', 'ko_KR');

3. WordPress 한글 적용

선택사항으로 한국어 WordPress 에서 한국어 파일만 추출한 것.

# cd wp-content
# unzip wordpress_ko.zip

4. 태그 구름 추가

위젯을 사용하지 않을 때 선택사항으로 사이드 바에 태그 구름을 추가한다.

# cd wp-content/themes/theme-name
# vi sidebar.php
...
<?php if ( function_exists('wp_tag_cloud') ) : ?>
<!--sidebox start -->
<div id="tag" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Tag Cloud'); ?></h3>
<div class="dbx-content">
<?php wp_tag_cloud('smallest=9&largest=14&number=0'); ?>
</div>
</div>
<!--sidebox end -->
<?php endif; ?>

자료