1

주제: Random Photo Viewer가 안되네요

TC 1.6.1로 업데이트를 한 후 Random photo viewer 3를 새로 업로드 하고 활성화를 시켰더니
아래 RPV3 코드에서 $id 가 NULL값이어서 아래 if 문 안으로 들어가지 못해
No image만을 출력합니다.

혹시 비슷한 문제를 보신 적이 있으시거나
해결책 있으신 분들 도와주세요...^^


for($cc=1; $cc<=$i; $cc++){
        $arr_rand = array_rand($tmpfile);

        // 해당 이미지를 참고하는 게시물 카테고리 검색
        $result=mysql_query("select id, category, title from {$database['prefix']}Entries where owner = {$owner} and content like '%{$tmpfile[$arr_rand]}%'");
        list($id, $category, $title) = mysql_fetch_array($result);

        //DB에 포함되어 있는 이미지파일만 처리
        if($id != NULL){

2

답글: Random Photo Viewer가 안되네요

ovaLife 작성:

TC 1.6.1로 업데이트를 한 후 Random photo viewer 3를 새로 업로드 하고 활성화를 시켰더니
아래 RPV3 코드에서 $id 가 NULL값이어서 아래 if 문 안으로 들어가지 못해
No image만을 출력합니다.

혹시 비슷한 문제를 보신 적이 있으시거나
해결책 있으신 분들 도와주세요...^^


for($cc=1; $cc<=$i; $cc++){
        $arr_rand = array_rand($tmpfile);

        // 해당 이미지를 참고하는 게시물 카테고리 검색
        $result=mysql_query("select id, category, title from {$database['prefix']}Entries where owner = {$owner} and content like '%{$tmpfile[$arr_rand]}%'");
        list($id, $category, $title) = mysql_fetch_array($result);

        //DB에 포함되어 있는 이미지파일만 처리
        if($id != NULL){

1.6 이상에서는 owner 필드가 없어서 그렇습니다. 위의 경우에는

for($cc=1; $cc<=$i; $cc++){
        $arr_rand = array_rand($tmpfile);

        // 해당 이미지를 참고하는 게시물 카테고리 검색
        $result=mysql_query("select id, category, title from {$database['prefix']}Entries where blogid = ".getBlogId()." and content like '%{$tmpfile[$arr_rand]}%'");
        list($id, $category, $title) = mysql_fetch_array($result);

        //DB에 포함되어 있는 이미지파일만 처리
        if($id != NULL

이렇게 수정해 주셔야 될 것 같습니다.^^

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'