안녕하세요.
우선 php 든 jsp 든 전혀 모릅니다. -_-;
목적 : 카테고리를 드랍다운 메뉴로 만들기
해본 것?
1. 스킨 들여다보기 (사용중인 스킨 : http://fotowall.net/14)
2. 스킨 내 드랍다운 메뉴용 jsp 들여다보기
==> [##_category_##] 나 [##_category_list_##] 의 경우 단 하나의 치환자에 모든 내용이 가공되어 나오기 때문에 jsp 만으로 정보를 받아 가공하기 어렵다.
3. 도아님의 수평 카테고리 플러그인 들여다보기 (http://offree.net/467)
4. 태터툴스 1.1.0.2 내 카테고리 관련 함수 들여다보기 (getCategoriesView)
==> 1,2번 문제 때문인지 도아님도 직접 mysql 에 접속하는 방식을 택한 듯 하다.
결론 : 머리아프다. @.@
우선 php 나 jsp 에 대한 지식이 없어서 그런지 전혀 감이 안오네요.
그런다할지라도 기본적으로 sql 에서 정보를 받아 가공하는 부분이 있을 것이고, 그 부분(아마도 getCategoriesView)을 jsp 를 이용해 가로채거나 재현해서 제가 원하는 형태로 가공을 할 수도 있을 듯 한데.. (그도 안되면 무식하지만 [##_category_list_##] 값을 그대로 받아 html 소스를 날리고 재가공하는 방법도 있을 듯.. 쿨럭 ;;)
하고는 싶은데 이것때문에 php 나 jsp 를 배우자니 절대 안될 것 같고.. ㅡ.ㅡ;
그래서 여쭤봅니다. 가능은 한건지.. 영 불가한건지..
우선 스킨에서 사용하는 소스는 다음과 같습니다. (아카이브의 경우)
skin.html
<div class="archive_window" id="archive_window">
<script>
<s_archive_rep>
write_convertArchive("[##_archive_rep_link_##]","[##_archive_rep_date_##]","[##_archive_rep_count_##]");
</s_archive_rep>
</script>
</div>
<div class="archive" id="archive">
<div class="archive_button"><img src="./images/archive_button.gif" border="0"></div>
<div class="clear: both;"></div>
</div>
<script type="text/javascript">
at_attach("archive", "archive_window", "click", "y", "pointer");
</script>
fotowall.js
function write_convertArchive(link,date,cnt)
{
var aa = date.split("/");
var hdate = aa[0] + "년 " + aa[1] + "월";
document.write( "<div class='archive_window_data'><a href='"+link+"'>"+ hdate +" ("+ cnt + ")</a></div>" );
}
dropdown.js
function at_attach(parent, child, showtype, position, cursor)
{
p = document.getElementById(parent);
c = document.getElementById(child);
p["at_parent"] = p.id;
c["at_parent"] = p.id;
p["at_child"] = c.id;
c["at_child"] = c.id;
p["at_position"] = position;
c["at_position"] = position;
c.style.position = "absolute";
c.style.visibility = "hidden";
if (cursor != undefined) p.style.cursor = cursor;
switch (showtype)
{
case "click":
p.onclick = at_click;
p.onmouseout = at_hide;
c.onmouseover = at_show;
c.onmouseout = at_hide;
break;
case "hover":
p.onmouseover = at_show;
p.onmouseout = at_hide;
c.onmouseover = at_show;
c.onmouseout = at_hide;
break;
}
}