안녕하세요~
먼저 애써서 만들어 주신 최근 게시물 출력 위젯 잘 쓰고 있습니다.
아직 준비중이라 여러모로 부족한게 참 많습니다..
최근 글 위젯에서, 해당 게시판의 권한을 읽어서 게시물의 링크 여부를 적용 후
최근 게시물로 출력 했으면 합니다.
사실, 그렇게 꼭 필요 한 기능은 아니지만,
게시물의 링크가 걸려 있을 때, 그 게시물을 클릭 했는데 페이지 이동 후 만나게 되는 메시지가
권한이 없습니다. 라는 문구 일 경우 기분이 그렇게 좋을 것 같지는 않을 것 같아서,
그러한 일을 사전에 방지 하고자 권한이 없을 경우, 리스트만 출력 하여 보여 주고,
해당 글에 대한 링크는 없애고자 합니다.
제로보드 홈페이지에 글을 올렸는데 답변 해 주시는 분도 없으시고
이곳까지 왔습니다.
도와주세요..
링크 걸어둔곳은 제로보드에 올린 글의 주소입니다.
읽어 주셔서 감사합니다.
진우님 안녕하세요.
님의 글을 읽고 제가 테스트해본 결과를 말씀드리겠습니다.
먼저 아래와 같이 소스를 수정하면
<span class="title">
<!--@if($logged_info)-->
<a href="{$oDocument->getPermanentUrl()}#{$oDocument->getCommentCount()}">{$oDocument->getTitle($widget_info->subject_cut_size)}</a>
<!--@else-->
{$oDocument->getTitle($widget_info->subject_cut_size)}
<!--@end-->
로그인하면 하이퍼링크가 나오고 로그아웃하면 링크 나타나지 않습니다.
그리고 권한별로 설정을 해 볼려니 권한에 관계된 함수를 제가 잘 모르겠네요.
일단 관리자만 보게 할려면
<span class="title">
<!--@if($logged_info->is_admin=="Y")-->
<a href="{$oDocument->getPermanentUrl()}#{$oDocument->getCommentCount()}">{$oDocument->getTitle($widget_info->subject_cut_size)}</a>
<!--@else-->
{$oDocument->getTitle($widget_info->subject_cut_size)}
<!--@end-->
여기서 is_admin=="Y"이부분에 권한별 함수를 넣어주면 될 것 같네요.
함수 알아네시면 저에게도 좀 알려주세요.