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

0 Members and 1 Guest are viewing this topic.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #150 on: January 13, 2006, 05:14:33 PM »
it should be better ...
Code: [Select]
$boardgories = "
SELECT catid, catname
FROM ".BOARD_CAT_TABLE."
";

Thanks. Forgot to remove one ";". Post corrected. ;)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #151 on: January 13, 2006, 06:12:34 PM »
so this show on user profile , the last post by user ? i'm correct ?

 :mrgreen:

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #152 on: January 13, 2006, 06:14:22 PM »
I believe this might be possible to do. This is simply SQL ordering during the row selection that could be added in member.php file.

However, since I have not installed this MOD, you'd need to give me the coded URL (from the PHP files) on where the topics are actually pointed. This way, I could customize it. ;)

what you mean ? you need my php files ?  :?:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #153 on: January 13, 2006, 06:18:25 PM »
Quote

so this show on user profile , the last post by user ? i'm correct ?


This is what I'm asking you to test on.  :lol:

Quote

what you mean ? you need my php files ?


No longer necessary. I found the query myself in the package and has been included in my instructions above.

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #154 on: January 13, 2006, 06:29:11 PM »
this don't give any error, but bad new its this isn't showing nothing about posts on profile  :| , only "lang" work !!!

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #155 on: January 13, 2006, 06:46:43 PM »
I see. Then, if you

replace this line :

Quote

"dboard_lastpost_topic" => "<a href=\"".$site_sess->url(ROOT_PATH."showthread.php?bid=".$board_id."&threadid=".$board_lastpost_id."&page=".$board_lastpost_page)."\">".$newlastpost."</a>",


with :

Code: [Select]

"dboard_lastpost_topic" => (isset($dboard_row['board_posts'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."showthread.php?bid=".$board_id."&threadid=".$board_lastpost_id."&page=".$board_lastpost_page)."\">".$newlastpost."</a>" : REPLACE_EMPTY,


will it still only show the lang message ?

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #156 on: January 13, 2006, 07:07:46 PM »
now this give me :

Quote
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blacktra/public_html/includes/db_mysql.php on line 92

 8O

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #157 on: January 13, 2006, 07:26:11 PM »
Ok, then - replace this part :

Quote

(isset($dboard_row['board_posts'])) ?


simply into this (updated) :

Code: [Select]

"dboard_lastpost_topic" => ($dboard_row['board_posts']) ?


Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #158 on: January 13, 2006, 08:34:51 PM »
still giving the same msg :

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blacktra/public_html/includes/db_mysql.php on line 92

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #159 on: January 13, 2006, 08:37:14 PM »
Please post the line you have replaced. I will take a look at it.

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #160 on: January 13, 2006, 08:41:40 PM »
My code "show profile" from member.php


Code: [Select]
//-----------------------------------------------------
//--- Show Profile ------------------------------------
//-----------------------------------------------------
if ($action == "showprofile") {
  $txt_clickstream = $lang['profile'];
  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;
  }

  if ($user_row = get_user_info($user_id)) {
  /*
  MOD MULTI-LIGHTBOXES
  START INSERT
*/
    $user_lightbox = "";
    $limit = ($user_row['user_lightbox_count'] == -1 || !$config['lightbox_count'] || $user_row['user_level'] == ADMIN) ? -1 : (($user_row['user_lightbox_count']) ? $user_row['user_lightbox_count'] : $config['lightbox_count']);
    if ((($user_row['user_lightbox_private'] || $user_row['user_level'] == ADMIN) && $config['lightbox_share'] && $user_info['user_level'] >= $config['lightbox']) || $user_info['user_level'] == ADMIN)
    {
      $condition = "";
      if ($limit != -1)
      {
        $condition = " LIMIT ".$limit;
      }
      $condition;
      $sql = "SELECT lightbox_id, lightbox_name, lightbox_private, lightbox_image_ids
              FROM ".LIGHTBOXES_TABLE."
              WHERE user_id = ".$user_row['user_id'].$condition;
      $result = $site_db->query($sql);
      if ($result)
      {
        while ($row = $site_db->fetch_array($result))
        {
          if (!$row['lightbox_private'] || $user_info['user_level'] == ADMIN)
          {
            $user_lightbox .= (($user_lightbox) ? "<br />" : "").(($user_info['user_level'] == ADMIN) ? ((!$row['lightbox_private']) ? "+ " : "- ") : "")."<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php?lightbox_id=".$row['lightbox_id'])."\">".$row['lightbox_name']." (".((trim($row['lightbox_image_ids'])) ? count(explode(" ", trim($row['lightbox_image_ids']))) : 0).")</a>\n";
          }
        }
      }
    }
    $site_template->register_vars(array(
      "user_lightbox" => $user_lightbox,
      "lang_user_lightbox" => $lang['user_lightbox'],
    ));
/*
  MOD MULTI-LIGHTBOXES
  END INSERT
*/
    $user_homepage = (isset($user_row['user_homepage'])) ? format_url($user_row['user_homepage']) : REPLACE_EMPTY;
    if (!empty($user_homepage) && $user_homepage != REPLACE_EMPTY) {
      $user_homepage_button = "<a href=\"".$user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$user_homepage."\" /></a>";
    }
    else {
      $user_homepage_button = REPLACE_EMPTY;
    }

    $user_icq = (isset($user_row['user_icq'])) ? $user_row['user_icq'] : REPLACE_EMPTY;
    if (!empty($user_icq) && $user_icq != REPLACE_EMPTY) {
      $user_icq_button = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=".$user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$user_icq."\" /></a>";
    }
    else {
      $user_icq_button = REPLACE_EMPTY;
    }
    $boardgories = "

SELECT catid, catname
FROM ".BOARD_CAT_TABLE."

";

$result = $site_db->query($boardgories);

$dboard_cat_row = $site_db->fetch_array($boardgories);

$board_catid = $dboard_cat_row['catid'];

$dreamboard_selection = "

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, auth_view
FROM ".BOARD_TABLE."
WHERE board_catid = '".$board_catid."'
LIMIT 1

";

$result = $site_db->query($dreamboard_selection);

$dboard_row = $site_db->fetch_array($result);

$board_id = $dboard_row['board_id'];
$board_catid = $dboard_row['board_catid'];
$board_name = $dboard_row['board_name'];
$board_desc = $dboard_row['board_desc'];
$board_topics = $dboard_row['board_topics'];
$board_posts = $dboard_row['board_posts'];
$board_lastpost_id = $dboard_row['board_lastpost_id'];
$board_lastpost_user = $dboard_row['board_lastpost_user'];
$board_lastpost_date = $dboard_row['board_lastpost_date'];
$board_lastpost_page = $dboard_row['board_lastpost_page'];
$board_moderator = $dboard_row['board_moderator'];
$board_moderator_id = $dboard_row['board_moderator_id'];
$auth_view = $dboard_row['auth_view'];
$newlastpost = "<img src=\"".TEMPLATE_PATH."/board_images/new_last_post.gif\" border=\"0\" alt=\"".$lang['button_lastpost']."\">";

    if (!empty($user_row['user_email']) && (!isset($user_row['user_showemail']) || (isset($user_row['user_showemail']) && $user_row['user_showemail'] == 1))) {
      $user_email = $user_row['user_email'];
      $user_email_save = str_replace("@", " at ", $user_row['user_email']);
      if (!empty($url_mailform)) {
        $user_mailform_link = $site_sess->url(preg_replace("/{user_id}/", $user_row['user_id'], $url_mailform));
      }
      else {
        $user_mailform_link = $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$user_row['user_id']);
      }
      $user_email_button = "<a href=\"".$user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$user_email_save."\" /></a>";
    }
    else {
      $user_email = REPLACE_EMPTY;
      $user_email_save = REPLACE_EMPTY;
      $user_mailform_link = REPLACE_EMPTY;
      $user_email_button = REPLACE_EMPTY;
    }
    $site_template->register_vars(array(
"lang_show_user_comments" => $lang['show_user_comments'],
     "url_show_user_comments" => $site_sess->url(ROOT_PATH."member.php?action=showcomments&user_id=".$user_row['user_id']),
     "user_id" => $user_row['user_id'],
     "user_name" => (isset($user_row['user_name'])) ? htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,
       "lang_pm" => ($user_info['user_id'] != $user_row['user_id']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=reply&user_id=".$user_row['user_id'])."\" alt=\"".$lang['pms_user_pm_alt']."\">".$lang['pms_user_pm']."</a>" : "",
      "user_email" => $user_email,
      "user_email_save" => $user_email_save,
      "user_mailform_link" => $user_mailform_link,
      "user_email_button" => $user_email_button,
      "user_join_date" => (isset($user_row['user_joindate'])) ? format_date($config['date_format'], $user_row['user_joindate']) : REPLACE_EMPTY,
      "user_last_action" => (isset($user_row['user_lastaction'])) ? format_date($config['date_format']." ".$config['time_format'], $user_row['user_lastaction']) : REPLACE_EMPTY,
      "user_homepage" => $user_homepage,
      "user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
      //User Pic
      "userpic_img" => ($config['userpic'] && $user_row['userpic']) ? ROOT_PATH."data/userpic/".$user_row['userpic'] : "",
//End User Pic
      "user_homepage_button" => $user_homepage_button,
      "user_icq" => $user_icq,
      "user_icq_button" => $user_icq_button,
      "user_icq_status" => (isset($user_row['user_icq'])) ? get_icq_status($user_row['user_icq']) : REPLACE_EMPTY,
      "dboard_lastpost_topic" => (!empty($dboard_row['board_posts'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."showthread.php?bid=".$board_id."&threadid=".$board_lastpost_id."&page=".$board_lastpost_page)."\">".$newlastpost."</a>" : REPLACE_EMPTY,
      "user_comments" => (isset($user_row['user_comments'])) ? $user_row['user_comments'] : REPLACE_EMPTY,
      "comment_user_status_img" => ($user_row['user_lastaction'] >= (time() - 300) && ((isset($user_row['user_invisible']) && $user_row['user_invisible'] == 0) || $user_info['user_level'] == ADMIN)) ? "<img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" <font color=\"#0c0c0c\" size=-2></font>" : "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" <font color=\"#0c0c0c\" size=-2></font>",
      "lang_profile_of" => $lang['profile_of'],
      "lang_show_user_images" => preg_replace("/".$site_template->start."user_name".$site_template->end."/siU", $user_row['user_name'], $lang['show_user_images']),
      "url_show_user_images" => $site_sess->url(ROOT_PATH."search.php?search_user=".urlencode($user_row['user_name'])),
      "lang_join_date" => $lang['join_date'],
      "lang_last_action" => $lang['last_action'],
         //--- User Age Mod ------------------------------------
  "lang_user_age" => $lang['user_age'],
  "lang_user_birthday" => $lang['user_birthday'],
  //--- End of User Age Mod -----------------------------
      "lang_comments" => $lang['comments'],
      "lang_email" => $lang['email'],
      "lang_homepage" => $lang['homepage'],
      "lang_icq" => $lang['icq'],
      "lang_user_posts" => $lang['user_posts_status'],
      "user_posts" => (isset($user_row['user_posts'])) ? $user_row['user_posts'] : REPLACE_EMPTY,
      "lang_download_lastaction" => $lang['download_lastaction'], // Mod: Track User Downloads
      "lang_user_downloads" => $lang['downloaded_images'], // Mod: Track User Downloads
      "url_user_downloads" => ($user_info['user_level'] == ADMIN) ? $site_sess->url(ROOT_PATH."search.php?user_downloads=".$user_row['user_id']) : "" // Mod: Track User Downloads
    ));

    if (!empty($additional_user_fields)) {
      $additional_field_array = array();
      foreach ($additional_user_fields as $key => $val) {
        $additional_field_array[$key] = (!empty($user_row[$key])) ? format_text($user_row[$key], 1) : REPLACE_EMPTY;
        $additional_field_array['lang_'.$key] = $val[0];
      }
      if (!empty($additional_field_array)) {
        $site_template->register_vars($additional_field_array);
//--- User Age Mod ------------------------------------
$birthday_array = array();

$birthday_array = get_birthday($additional_field_array['user_age_birthday']);
$birthday_array[3] = get_age($birthday_array[0], $birthday_array[1], $birthday_array[2]);

if($birthday_array[0] == "0000")
{
$site_template->register_vars(array(
"user_age_missing" => $lang['user_age_missing']
));
}
else
{
if($birthday_array[0] != "0000" && $birthday_array[1] != "00" && $birthday_array[2] != "00")
{
$birthday_timestamp = format_date($config['date_format'], strtotime($birthday_array[0] . "-" . $birthday_array[1] . "-" . $birthday_array[2]));
}
else
{
$birthday_timestamp = (($birthday_array[1] != "00") ? $lang['months'][$birthday_array[1]] . " " : "") . $birthday_array[0];
}

$site_template->register_vars(array(
"user_birthday" => $birthday_timestamp,
"user_age" => "" . $birthday_array[3] . ""
));
}
//--- End of User Age Mod -----------------------------
      }
    }
    $content = $site_template->parse_template("member_profile");
  }
  else {
    $content = $lang['invalid_user_id'];
  }
}


 :?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #161 on: January 13, 2006, 08:53:16 PM »
Very well. I have updated my last replacement above.

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #162 on: January 13, 2006, 09:46:32 PM »
stills the same , this is my code line now with last code :

Quote
"dboard_lastpost_topic" => ($dboard_row['board_posts']) ? "<a href=\"".$site_sess->url(ROOT_PATH."showthread.php?bid=".$board_id."&threadid=".$board_lastpost_id."&page=".$board_lastpost_page)."\">".$newlastpost."</a>" : REPLACE_EMPTY,

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #163 on: January 14, 2006, 01:01:08 AM »
I don't see how this can affect. Uncomment this line to see if the error is gone.

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #164 on: January 14, 2006, 01:13:18 AM »
i think the error its on this code
Quote
$boardgories = "

SELECT catid, catname
FROM ".BOARD_CAT_TABLE."

";

$result = $site_db->query($boardgories);

$dboard_cat_row = $site_db->fetch_array($boardgories);

$board_catid = $dboard_cat_row['catid'];

$dreamboard_selection = "

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, auth_view
FROM ".BOARD_TABLE."
WHERE board_catid = '".$board_catid."'
LIMIT 1

";

$result = $site_db->query($dreamboard_selection);

$dboard_row = $site_db->fetch_array($result);

$board_id = $dboard_row['board_id'];
$board_catid = $dboard_row['board_catid'];
$board_name = $dboard_row['board_name'];
$board_desc = $dboard_row['board_desc'];
$board_topics = $dboard_row['board_topics'];
$board_posts = $dboard_row['board_posts'];
$board_lastpost_id = $dboard_row['board_lastpost_id'];
$board_lastpost_user = $dboard_row['board_lastpost_user'];
$board_lastpost_date = $dboard_row['board_lastpost_date'];
$board_lastpost_page = $dboard_row['board_lastpost_page'];
$board_moderator = $dboard_row['board_moderator'];
$board_moderator_id = $dboard_row['board_moderator_id'];
$auth_view = $dboard_row['auth_view'];
$newlastpost = "<img src=\"".TEMPLATE_PATH."/board_images/new_last_post.gif\" border=\"0\" alt=\"".$lang['button_lastpost']."\">";


the other line of code isn't giving error  :roll: