Author Topic: [addon] DREAMBOARD V 2.1  (Read 479080 times)

0 Members and 1 Guest are viewing this topic.

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #315 on: August 04, 2006, 03:14:16 AM »
i've 2 questions :

1) its possible list all posts added by User (xx)

i would appreciate any ideias or help for it :)

well i've solve it :) , but if someone can help at my 1) line woud be great :)
« Last Edit: August 13, 2006, 02:02:40 AM by Stoleti »

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #316 on: August 04, 2006, 08:51:31 AM »
Where du you want to have the link to the list of all posts added by User (xx) ?
In userprofile, memberlist, forum ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #317 on: August 04, 2006, 04:12:35 PM »
Where du you want to have the link to the list of all posts added by User (xx) ?
In userprofile, memberlist, forum ... ?

my ideia is show at userprofile one of two things :

1) Show all posts , posted by him
2) Last Topics by him

:)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #318 on: August 05, 2006, 02:24:17 AM »
well actually i'm just needing the 1) Show all posts , posted by him ...

 :roll:

Offline tdkpaul

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #319 on: August 05, 2006, 09:42:23 PM »
somebody using this dreamboard with 1.7.2 or 1.7.3?

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #320 on: August 07, 2006, 07:09:15 PM »
i've got a ideia but i don't know how do , i've take a look at showcomments under profile and think how modify it to show user posts :

[qcode]//-----------------------------------------------------
//---Show Member Comments-------------------------------
//-----------------------------------------------------

if ($action == "showcomments") {

 if (isset($HTTP_GET_VARS[URL_USER_ID]) || isset($HTTP_POST_VARS[URL_USER_ID])) {
   $user_id = (isset($HTTP_GET_VARS[URL_USER_ID])) ? intval($HTTP_GET_VARS[URL_USER_ID]) : intval($HTTP_POST_VARS[URL_USER_ID]);
   if (!$user_id) {
     $user_id = GUEST;
   }
 }
 else {
   $user_id = GUEST;
 }

   $additional_sql = "";
     $table_fields = $site_db->get_table_fields(USERS_TABLE);
     foreach ($additional_user_fields as $key => $val) {
       if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
         $additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
       }
     }
 $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").$additional_sql."
         FROM ".COMMENTS_TABLE." c
         LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
         WHERE c.user_id = $user_id
         ORDER BY c.comment_date DESC, c.image_id ASC";
 $result = $site_db->query($sql);
 $comment_row = array();
 while ($row = $site_db->fetch_array($result)) {
   $comment_row[] = $row;
 }
 $site_db->free_result($result);
 $num_comments = sizeof($comment_row);
 if (!$num_comments) {
   $comments = "<TABLE width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"bordercolor\"><tr><td class=\"commentrow1\" colspan=\"2\">".$lang['member_no_comments']."</td></tr></table>";
 }
 else {
   $comments = "";
   $bgcounter = 0;
   $comments ="<TABLE width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"bordercolor\">\n<TR>\n<TD>\n<TABLE width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n";
   $current = "";
   for ($i = 0; $i < $num_comments; $i++) {
    $image_id = $comment_row[$i]['image_id'];
     $sql = "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, i.image_allow_comments
           FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
           LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
           WHERE i.image_id = $image_id AND c.cat_id = i.cat_id";
     $image_row = $site_db->query_firstrow($sql);
     $cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
    $image_allow_comments = (check_permission("auth_readcomment", $cat_id)) ? $image_row['image_allow_comments'] : 0;
    if ($image_allow_comments == 1){
    if ($current != $comment_row[$i]['image_id']) {
      $comments .= ($i == 0) ? "" : "</TABLE>\n</TD>\n</TR>\n</TABLE>\n<br>\n<TABLE width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"bordercolor\">\n<TR>\n<TD>\n<TABLE width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n";
      $same = 1;
    }else{
      $same = 0;
    }
     $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

     $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
     $comment_user_info = $lang['userlevel_guest'];

     $comment_user_id = $comment_row[$i]['user_id'];
    $user_row_comment = get_user_info($comment_user_id);
     if (isset($comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
       $comment_user_name = htmlspecialchars($comment_row[$i][$user_table_fields['user_name']]);

       $comment_user_info .= "<br />";
     }

     $comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

     $admin_links = "";
     if ($user_info['user_level'] == ADMIN) {
       $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
       $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['delete']."</a>";
     }
     elseif ($is_image_owner) {
       $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
       $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
     }
    $show_link = (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? 0 : 1;
     $site_template->register_vars(array(
      "comment_image" => ($same) ? get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, 0, 1) : "",
      "comment_image_name" => (!$show_link) ? $image_row['image_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$image_row['image_name']."</a>",
      "comment_cat_name" => (!check_permission("auth_viewcat", $cat_id)) ? $image_row['cat_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\" class=\"smalltext\">".$image_row['cat_name']."</a>",
       "comment_id" => $comment_row[$i]['comment_id'],
       "comment_user_id" => $comment_user_id,
       "comment_user_name" => $comment_user_name,
       "comment_user_info" => $comment_user_info,
       "comment_user_ip" => $comment_user_ip,
       "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
       "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
       "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
       "row_bg_number" => $row_bg_number,
       "admin_links" => $admin_links
     ));
     $comments .= $site_template->parse_template("member_comment_bit");

    $current = $comment_row[$i]['image_id'];
}
   } // end while
 } //end else
 $comments .= "</TABLE>\n</TD>\n</TR>\n</TABLE>\n";
 $content = $comments;
 $txt_clickstream = $lang['member_comments'].(($user_id == GUEST) ? $lang['userlevel_guest'] : $comment_user_name);
}
//---End Member Comments----[/qcode]

make is show all users post's :?:

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #321 on: August 08, 2006, 02:17:56 AM »
For who is looking for "show board names + posts names" at page window , and for post shortcuts heres a answer:

BACKUP YOUR FILES BEFORE YOU TRY IT !!!


show board names + posts names

Showthread/Showboard:

Showboard Find:
Code: [Select]
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
$site_template->register_vars(array(
 "board" => $boardcontent,
 "dreamboard" => $vocimage,
 "redirect"=>$redirectpage,
 "clickstream" => $clickstream
 
));

Replace:


Code: [Select]
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
$site_template->register_vars(array(
 "board" => $boardcontent,
 "title" => $board_name,
 "dreamboard" => $vocimage,
 "redirect"=>$redirectpage,
 "clickstream" => $clickstream
 
));


Showthread Find:

Code: [Select]
//------------------------------------------------------------------
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------

$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
$site_template->register_vars(array(
  "board" => $boardcontent,
  "dreamboard" => $vocimage,
  "msg" => $msg,
  "redirect"=>$redirectpage,
  "clickstream" => $clickstream
));


Replace:

Code: [Select]
//------------------------------------------------------------------
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------

$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
$site_template->register_vars(array(
  "board" => $boardcontent,
  "title" => $thrtopic,
  "dreamboard" => $vocimage,
  "msg" => $msg,
  "redirect"=>$redirectpage,
  "clickstream" => $clickstream
));

at board.html added {title} at your page <title>....</title>

This ill work ;)

post shortcuts :

At showthread find:

Code: [Select]
    $showtopic .="<tr>\n";
    $showtopic .="<td >".$lang['subject']." : $reptopic  </td>\n";
    $showtopic .="</tr>\n";

Added:

Code: [Select]
    $showtopic .="<tr>\n";
    $showtopic .="<td >".$lang['subject']." : $reptopic <br>Forum Post:&nbsp;(<a href=\"#$repid\">#$repid</a>)  </td>\n";
    $showtopic .="</tr>\n";

You can change it if you want ;)




Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #322 on: September 05, 2006, 07:23:26 AM »
I need help for a small modification

Quote
//---------------------------
//------DREAMBOARD-------------
//----------------------------
if ($boardconfig['board_disable']){
$board .=format_boardtext($boardconfig['status_desc'], 0, 0, 0, 0, 1);
$iconmsg="<img src=\"".TEMPLATE_PATH."/board_images/danger.gif\"  border=\"0\"> ";

}else {
$board .="</br><table  width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ><tr><td class=\"boxline\"><table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"2\" ></table>";
$boardgories = mysql_query ("SELECT catid,catname FROM ".BOARD_CAT_TABLE ."");
  while ($row = mysql_fetch_array($boardgories)) {
    $catid = $row['catid'];
    $catname = $row['catname'];

    $board .="<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"2\" ><tr><td><br><b>$catname</b><br></td></tr></table>\n";


    $forums = mysql_query ("SELECT board_id,board_catid,board_name,board_desc,board_posts,board_topics,board_lastpost_id,board_lastpost_user,board_lastpost_date,board_lastpost_page,board_moderator,board_moderator_id FROM ".BOARD_TABLE."  WHERE board_catid='$catid'");
    while ($row = mysql_fetch_array($forums)) {
        $board_id = $row['board_id'];
        $board_catid = $row['board_catid'];
        $board_name = $row['board_name'];
        $board_lastpost_id = $row['board_lastpost_id'];
        $board_lastpost_user = $row['board_lastpost_user'];
        $board_lastpost_date = $row['board_lastpost_date'];
$board_lastpost_page = $row['board_lastpost_page'];
  $threadtitle = mysql_query ("SELECT thrtopic FROM ".BOARD_TCONT_TABLE."  WHERE thrid ='$board_lastpost_id' ");
         while ($rowtopic = mysql_fetch_array($threadtitle )) {
$topic = $rowtopic['thrtopic'];
             }
$sql = "SELECT thrlastpost_id FROM ".BOARD_TINDEX_TABLE."
            WHERE  thrlastpost_user ='$board_lastpost_user'
";
     $luid_row = $site_db->query_firstrow($sql);
     $lastpost = $luid_row['thrlastpost_id'];


$result = mysql_query ("SELECT user_id,user_lastvisit FROM ".USERS_TABLE."  WHERE user_name ='$board_lastpost_user' ");
         while ($user = mysql_fetch_array($result )) {
$lastvisit = $user['user_lastvisit'];
             }

   if ($lastpost == GUEST) {
         $lastuser = $board_lastpost_user;
             $idlast_post = "";
} else {
             $idlast_post = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$lastpost)."\">";
$lastuser = $board_lastpost_user ;
                     }
   if ($board_lastpost_date >= $user_info['user_lastvisit']) {
            $newtopic = "<img src=\"".TEMPLATE_PATH."/board_images/folder.gif\" alt=\"".$lang['new_post']."\" >";
$newlastpost ="<img src=\"".TEMPLATE_PATH."/board_images/new_last_post.gif\" border=\"0\" alt=\"".$lang['button_lastpost']."\">";

             } else {
            $newlastpost ="<img src=\"".TEMPLATE_PATH."/board_images/last_post.gif\" border=\"0\" alt=\"".$lang['button_lastpost']."\">";
    $newtopic = "<img src=\"".TEMPLATE_PATH."/board_images/forum_no_new.gif\" alt=\"".$lang['no_newpost']."\">";
                     }
        if ($board_lastpost_date == "0" ) {
        $board .="";
            } else {
    $lastpostdate = format_date($boardconfig['date_format']." ".$boardconfig['time_format'], $board_lastpost_date);
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
        $board .=" <table width=\"100%\"  border-width=\"1\" cellpadding=\"5\" cellspacing=\"1\" class=\"imagerow$row_bg_number\"><tr><td>$newtopic</td><td> <a href=\"showthread.php?bid=$board_id&threadid=$board_lastpost_id&page=$board_lastpost_page \"><b>$topic</b> </a><span class=\"smalltext\">$lastpostdate</span> &nbsp;".$lang['by']." $idlast_post $lastuser</a> <a href=\"showthread.php?bid=$board_id&threadid=$board_lastpost_id&page=$board_lastpost_page \">$newlastpost</a></td></tr></table>\n";
         }
   }
}
$board .=" </td></tr></table></br>";
}
$site_template->register_vars("board", $board);

I need make it show the the last 5 last posts only from board - 22 , how can i do it ???

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [addon] DREAMBOARD V 2.1
« Reply #323 on: September 05, 2006, 08:15:29 AM »
maybe change
Code: [Select]
$boardgories = mysql_query ("SELECT catid,catname FROM ".BOARD_CAT_TABLE ."");to this:
Code: [Select]
$boardgories = mysql_query ("SELECT catid,catname FROM ".BOARD_CAT_TABLE ." WHERE catid = 22");
 
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #324 on: September 05, 2006, 05:34:57 PM »
maybe change
Code: [Select]
$boardgories = mysql_query ("SELECT catid,catname FROM ".BOARD_CAT_TABLE ."");to this:
Code: [Select]
$boardgories = mysql_query ("SELECT catid,catname FROM ".BOARD_CAT_TABLE ." WHERE catid = 22");
 


well that work , but ideia its get last 10 topics from:

cat_id = 6 , board_id = 22 :P

Offline JinYoshi

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #325 on: September 16, 2006, 06:23:52 PM »
somebody using this dreamboard with 1.7.2 or 1.7.3?

Compatible with 1.7.3 ?
Anyone ?
Well, then i'll try it...

No No No... the link is broken, so i cant see the step of this board installation..
« Last Edit: September 16, 2006, 07:09:52 PM by JinYoshi »

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #326 on: September 24, 2006, 10:40:36 PM »
I need help , i'm trying show the text and the number of replies at this way :

text - The original post (1º)
replies - Total of replies of that topic

Topic Name ..

text text text

total replies( total replies )

How do it , i really need it  :|

Note: using the code above , showing the last topics at (index.php, etc ) !!

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #327 on: October 07, 2006, 07:52:16 PM »
i've got a ideia but i don't know how do , i've take a look at showcomments under profile and think how modify it to show user posts :

[qcode]//-----------------------------------------------------
//---Show Member Comments-------------------------------
//-----------------------------------------------------

if ($action == "showcomments") {

 if (isset($HTTP_GET_VARS[URL_USER_ID]) || isset($HTTP_POST_VARS[URL_USER_ID])) {
   $user_id = (isset($HTTP_GET_VARS[URL_USER_ID])) ? intval($HTTP_GET_VARS[URL_USER_ID]) : intval($HTTP_POST_VARS[URL_USER_ID]);
   if (!$user_id) {
     $user_id = GUEST;
   }
 }
 else {
   $user_id = GUEST;
 }

   $additional_sql = "";
     $table_fields = $site_db->get_table_fields(USERS_TABLE);
     foreach ($additional_user_fields as $key => $val) {
       if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
         $additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
       }
     }
 $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").$additional_sql."
         FROM ".COMMENTS_TABLE." c
         LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
         WHERE c.user_id = $user_id
         ORDER BY c.comment_date DESC, c.image_id ASC";
 $result = $site_db->query($sql);
 $comment_row = array();
 while ($row = $site_db->fetch_array($result)) {
   $comment_row[] = $row;
 }
 $site_db->free_result($result);
 $num_comments = sizeof($comment_row);
 if (!$num_comments) {
   $comments = "<TABLE width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"bordercolor\"><tr><td class=\"commentrow1\" colspan=\"2\">".$lang['member_no_comments']."</td></tr></table>";
 }
 else {
   $comments = "";
   $bgcounter = 0;
   $comments ="<TABLE width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"bordercolor\">\n<TR>\n<TD>\n<TABLE width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n";
   $current = "";
   for ($i = 0; $i < $num_comments; $i++) {
    $image_id = $comment_row[$i]['image_id'];
     $sql = "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, i.image_allow_comments
           FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
           LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
           WHERE i.image_id = $image_id AND c.cat_id = i.cat_id";
     $image_row = $site_db->query_firstrow($sql);
     $cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
    $image_allow_comments = (check_permission("auth_readcomment", $cat_id)) ? $image_row['image_allow_comments'] : 0;
    if ($image_allow_comments == 1){
    if ($current != $comment_row[$i]['image_id']) {
      $comments .= ($i == 0) ? "" : "</TABLE>\n</TD>\n</TR>\n</TABLE>\n<br>\n<TABLE width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"bordercolor\">\n<TR>\n<TD>\n<TABLE width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n";
      $same = 1;
    }else{
      $same = 0;
    }
     $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

     $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
     $comment_user_info = $lang['userlevel_guest'];

     $comment_user_id = $comment_row[$i]['user_id'];
    $user_row_comment = get_user_info($comment_user_id);
     if (isset($comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
       $comment_user_name = htmlspecialchars($comment_row[$i][$user_table_fields['user_name']]);

       $comment_user_info .= "<br />";
     }

     $comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

     $admin_links = "";
     if ($user_info['user_level'] == ADMIN) {
       $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
       $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['delete']."</a>";
     }
     elseif ($is_image_owner) {
       $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
       $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
     }
    $show_link = (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? 0 : 1;
     $site_template->register_vars(array(
      "comment_image" => ($same) ? get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, 0, 1) : "",
      "comment_image_name" => (!$show_link) ? $image_row['image_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$image_row['image_name']."</a>",
      "comment_cat_name" => (!check_permission("auth_viewcat", $cat_id)) ? $image_row['cat_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\" class=\"smalltext\">".$image_row['cat_name']."</a>",
       "comment_id" => $comment_row[$i]['comment_id'],
       "comment_user_id" => $comment_user_id,
       "comment_user_name" => $comment_user_name,
       "comment_user_info" => $comment_user_info,
       "comment_user_ip" => $comment_user_ip,
       "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
       "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
       "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
       "row_bg_number" => $row_bg_number,
       "admin_links" => $admin_links
     ));
     $comments .= $site_template->parse_template("member_comment_bit");

    $current = $comment_row[$i]['image_id'];
}
   } // end while
 } //end else
 $comments .= "</TABLE>\n</TD>\n</TR>\n</TABLE>\n";
 $content = $comments;
 $txt_clickstream = $lang['member_comments'].(($user_id == GUEST) ? $lang['userlevel_guest'] : $comment_user_name);
}
//---End Member Comments----[/qcode]

make is show all users post's :?:

Nobody ??????????????  :cry:

Offline keemo

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://www.zaffix.com
Re: [addon] DREAMBOARD V 2.1
« Reply #328 on: October 17, 2006, 06:58:35 AM »
Has anyone figured out how to add a search to the forums or have the existing search include the forums?

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #329 on: October 17, 2006, 07:39:30 PM »
Has anyone figured out how to add a search to the forums or have the existing search include the forums?

The search only works at users/images  :|