Author Topic: [addon] DREAMBOARD V 2.1  (Read 519923 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 #180 on: January 19, 2006, 06:15:33 PM »
You made a mistake during the implementation process. Restore your backup and try again.

Offline Flatermann

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #181 on: January 20, 2006, 02:34:21 PM »
Wenn i install this mode i get an error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/web7/html/4images/includes/db_mysql.php on line 92



I found the problem...

Code: [Select]
$dboard_cat_row = $site_db->fetch_array($boardgories);
should be :

Code: [Select]
$dboard_cat_row = $site_db->fetch_array($result);

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #182 on: January 20, 2006, 02:41:38 PM »
@ Flatermann ... in which file ... ?
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 TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #183 on: January 20, 2006, 03:39:40 PM »
Wenn i install this mode i get an error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/web7/html/4images/includes/db_mysql.php on line 92



I found the problem...

Code: [Select]
$dboard_cat_row = $site_db->fetch_array($boardgories);
should be :

Code: [Select]
$dboard_cat_row = $site_db->fetch_array($result);


It could be my search software but ... I do not see anything that starts with : $dboard_cat_row string ...  8O

Offline Egly

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #184 on: January 20, 2006, 05:37:56 PM »
Hi Guys!

Big BIG Problem!!

I really like this board, but now i have a big Problem myself...

Sometimes if users post threads or write replys and i want to watch them it shows me this error:

"This topic does not exist"

It is not saved in my database too...

Hey guys!

A few days ago i had this error above.

I think it is the best thing if i describe it in an example.

I´m writing a thread whos id is 105. Then i write one more topic and its id is 106.
Now i delete the last topic (id 106) and post a new one.
Its id normally is 107.
If i want to open it the link from the board points to the thread with the id 106 although it should point to 107  and it gives me the error "Topic does not exist."

Does anybody know where the topics are counted or how i can fix this??

I fixed it with adding some "blind threads" that the counts are allright, but if someone deletes one topic it doesnt work any more...

plz help!!!

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #185 on: January 20, 2006, 06:19:34 PM »
From which PHP file (and query) exacly does this happend actually ?

Offline Flatermann

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #186 on: January 21, 2006, 11:51:44 AM »
IN member.php


$boardgories = "

SELECT catid, catname
FROM ".BOARD_CAT_TABLE."

";

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

$dboard_cat_row = $site_db->fetch_array($result);   your Origi. was $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']."\">";

Offline Egly

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #187 on: January 21, 2006, 12:28:47 PM »
Hi,

i think its no a thread problem. It only happens in replys.
I think it must be in this code section (I modified it..):

Code: [Select]
}elseif ($action == "qu") {
        $thread = mysql_query ("SELECT thrtopic,thrid,thrtext,thrstarter FROM ".BOARD_TCONT_TABLE." WHERE thrid='$threadid' AND thrforid='$bid'");
        while ($row = mysql_fetch_array($thread)) {
            $thrid = $row['thrid'];
$thrtopic = $row['thrtopic'];
$thrtext = format_boardtext($row['thrtext'], $boardconfig['html_board'], $boardconfig['wordwrap_board'], $boardconfig['bb_board'], $boardconfig['bb_image_board'],1);
$thrstarter = $row['thrstarter'];       
 $subject_form = "RE :".$thrtopic.""; 
 $reply = "";
 
  $hans = mysql_query ("SELECT repuser,reptext FROM egly_boardtrep WHERE repthrid='$thrid'");
while ($row = mysql_fetch_array($hans)) {
$replier = $row['repuser'];
$replytext = format_boardtext($row['reptext'], $boardconfig['html_board'], $boardconfig['wordwrap_board'], $boardconfig['bb_board'], $boardconfig['bb_image_board'],1);
 $replyspicker .="<table width=\"700\" border=\"0\" align=\"center\" cellpadding=\"4\" cellspacing=\"0\" class=\"threadspicker\">\n";
 $replyspicker .="<tr>\n";
 $replyspicker .="<td width=\"150\" valign=\"top\"><b>$replier</b> schrieb: </td>\n";
 $replyspicker .="<td>\n";
 $replyspicker .="<p>$replytext</p></td>\n";
 $replyspicker .="</tr>\n";
 $replyspicker .="</table>\n";
 $replyspicker .="<br>\n";
  };





  }

  }
     $forums = mysql_query ("SELECT board_id,board_catid,board_name,board_moderator_id,auth_reply FROM ".BOARD_TABLE." WHERE board_id ='$bid' ");
     while ($row = mysql_fetch_array($forums)) {
         $board_id = $row['board_id'];
         $board_catid = $row['board_catid'];
         $board_name = $row['board_name'];
$board_moderator_id = $row['board_moderator_id'];
$auth_reply = $row['auth_reply'];
     }
   if ( (empty($threadid) || $threadid < 0  ||   $bid < 0  )) {
   $error_board = $lang['board_badrequest'];
    }
  if ($error_board) {
  $main_template = "board";
  include(ROOT_PATH.'includes/page_header.php');
  show_error_board($error_board);

                  }
       $subject_form .= $headline ;
       $categories = mysql_query ("SELECT catid,catname FROM ".BOARD_CAT_TABLE." WHERE catid ='$board_catid'");
       while ($row = mysql_fetch_array($categories)) {
         $catid = $row['catid'];
         $catname = $row['catname'];
                                                    }
  $txt_clickstream = "<a href=\"board.php\">".$boardconfig['board_name']."</a>".$config['category_separator']."<a href=\"showboard.php?bid=$board_id\">$board_name</a>".$config['category_separator']."<a href=\"showthread.php?bid=$board_id&threadid=$threadid\"> $subject_form</a>".$config['category_separator']."".$lang['new_reply']."";

  if ( $user_info['user_level'] < $auth_reply   ){

    $iconmsg="<img src=\"".TEMPLATE_PATH."/board_images/danger.gif\"  border=\"0\"> ";
    $msg = $lang['board_register'];
$txt_clickstream = "".$lang['board_badrequest']."";
    $content ="";
    $redirectpage="<meta http-equiv=refresh content=\"11; url=board.php \">"; }
 else {
if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
   $sender_name = "<input name=\"username_form\" maxlength=\"15\" type=\"text\" class=\"inputarea\" id=\"username_form\"  size=\"50\">";
   $sender_id = GUEST ;
       }else {
   $sender_name = ($user_info['user_level'] != GUEST) ? $user_info['user_name'] : "";
   $sender_id = ($user_info['user_id'] != GUEST) ? $user_info['user_id'] : "";
   $sender_email = ($user_info['user_level'] != GUEST) ? $user_info['user_email'] : "";
   $sender_name_hidden = "<input type=\"hidden\" name=\"username_form\" value=\"$sender_name\">";
    }
 if ($boardconfig['bb_board'] == 1 ) {
    $site_template->register_vars(array(
  "smiles" => $smiles,
      "lang_bbcode" => $lang['bbcode'],
      "lang_tag_prompt" => $lang['tag_prompt'],
      "lang_link_text_prompt" => $lang['link_text_prompt'],
      "lang_link_url_prompt" => $lang['link_url_prompt'],
      "lang_link_email_prompt" => $lang['link_email_prompt'],
      "lang_list_type_prompt" => $lang['list_type_prompt'],
      "lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    $bbcode = $site_template->parse_template("bbcodeboard");
  }

 
$site_template->register_vars(array(
  "sender_name_hidden" =>$sender_name_hidden,
  "lang_name" => $lang['name'],
  "lang_subject" => $lang['subject'],
  "lang_massage" => $lang['massage'],
  "lang_post_reply" => $lang['post_reply'],
  "threadid" =>$threadid,
  "board_id" => $board_id,
  "showtopic" => $showtopic,
  "replyquote" =>$editpost,
  "subject" =>$subject_form,
  "reply" =>$reply,
  "sender_id" => $sender_id,
  "bbcode" => $bbcode,
  "sender_name" => $sender_name,
  "thrtext" => $thrtext,
  "thrstarter" => $thrstarter,
  "replyspicker" => $replyspicker,
  "replier" => $replier,
  "replytext" => $replytext
 
));
$content = $site_template->parse_template("boardform_reply");


$error = 0;
if ($action == "post_reply") {

  $reply= (isset($HTTP_POST_VARS['message_form'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['message_form'])) : "";
$user_name_field = get_user_table_field("", "user_name");
    if (!empty($user_name_field)) {
      if ($site_db->not_empty("SELECT $user_name_field FROM ".USERS_TABLE." WHERE $user_name_field = '".strtolower($username_form)."' AND ".get_user_table_field("", "user_id")." <> '".$user_info['user_id']."'")) {
        $msg .= (($msg != "") ? "<br />" : "").$lang['username_exists'];
        $error = 1;
      }
    }
      if ($username_form == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
      $error = 1;
    }
      if ($subject_form == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['subject_required'];
      $error = 1;
    }
      if ($message_form == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['massage_required'];
      $error = 1;
    }
          if ($error)  {
  $iconmsg="<img src=\"".TEMPLATE_PATH."/board_images/danger.gif\"  border=\"0\"> ";
      $txt_clickstream = "<a href=\"board.php\">".$boardconfig['board_name']."</a>".$config['category_separator']."".$lang['error_proses']."";
    }
     if (!$error)  { 

           $dbdate = time();   
        mysql_query ("UPDATE ".BOARD_TABLE." SET board_posts=board_posts+1, board_lastpost_id='$threadid', board_lastpost_user='$username_form', board_lastpost_date='$dbdate' WHERE board_id = '$bid'");
        mysql_query ("UPDATE ".BOARD_TINDEX_TABLE." SET thrreplies=thrreplies+1, thrlastpost_id='$userid', thrlastpost_user='$username_form', thrlastpost_date='$dbdate' WHERE thrid = '$threadid'");
        mysql_query ("INSERT INTO ".BOARD_TREP_TABLE." (repthrid,repforid,reptopic,repuser,repuser_id,reptext,repdate,repposterip) VALUES ('$threadid','$bid','$subject_form','$username_form','$sender_id','$message_form','$dbdate','$REMOTE_ADDR')");
        mysql_query ("UPDATE ".USERS_TABLE." SET user_posts=user_posts+1 WHERE user_name = '$username_form'");
        mysql_query ("UPDATE ".BOARD_STAT_TABLE." SET totalposts=totalposts+1");
       
$reply_page = $boardconfig['posts_perpage'];
             $thread_rep = mysql_query ("SELECT * FROM ".BOARD_TREP_TABLE." WHERE repthrid ='$threadid'");
             $total_reply = mysql_numrows ($thread_rep);
$getlastpage = ceil($total_reply / $reply_page);

mysql_query ("UPDATE ".BOARD_TABLE." SET board_lastpost_page='$getlastpage' WHERE board_id = '$bid'");
mysql_query ("UPDATE ".BOARD_TINDEX_TABLE."  SET thrlastpost_page='$getlastpage' WHERE thrid = '$threadid'");


$sql = "SELECT board_name, board_moderator, board_moderator_email, board_mod_emailpost FROM ".BOARD_TABLE."  WHERE board_id = '$bid'";
        $result = $site_db->query($sql);
        $num_rows = $site_db->get_numrows($result);
        $row = array();
        while ($row = $site_db->fetch_array($result)) {
$board_id = $row['board_id'];
        $board_name = $row['board_name'];
    $board_moderator = $row['board_moderator'];
$board_moderator_email = $row['board_moderator_email'];
$board_mod_emailpost  = $row['board_mod_emailpost'];
        }
   $site_db->free_result($result);
   
 //////////////////////////////////////////
 ////////////Eglys Email@reply/////////////
 //////////////////////////////////////////
$sql = "SELECT user_email FROM ".BOARD_TREP_TABLE.", ".USERS_TABLE." WHERE "
.USERS_TABLE.".user_id = ".BOARD_TREP_TABLE.".repuser_id AND
repthrid = '$threadid' group by user_email";

        $result = $site_db->query($sql);
        $row = array();
        while ($row = $site_db->fetch_array($result)) {
$repuser = $row['repuser_id'];
$repmailto = $row['user_email'];
  $from = "Antwort@Fotostube.net";            //insert your email adress here
  $post_url=$script_url."/showthread.php?bid=$bid&threadid=$threadid&page=$getlastpage";
        include_once(ROOT_PATH.'includes/email.php');
        $site_email = new Email();
        $site_email->set_from($from);
        $site_email->set_to($repmailto);
        $site_email->set_subject($subject_form);
        $site_email->register_vars(array(
          "recipient_name" => $board_moderator,
          "forum_name" => $board_name,
          "sender_name" => $username_form,
  "topics_url" => $post_url,
  "topics_content" => $message_form,
  "about" => $lang['new_reply'],
  "board_name" => $boardconfig['board_name']
 
        ));
                $site_email->set_body("board_mailtopics", $config['language_dir']);
                $site_email->send_email();
}
   
$sql= "SELECT user_email FROM ".BOARD_TCONT_TABLE.", ".USERS_TABLE." WHERE "
.USERS_TABLE.".user_id = ".BOARD_TCONT_TABLE.".thrstarter_id AND
thrid = '$threadid' ";

        $result = $site_db->query($sql);
        $row = array();
        while ($row = $site_db->fetch_array($result)) {
$repuser = $row['repuser_id'];
$repmailto = $row['user_email'];
$thrstarter2 =$row['thrstarter_id'];
  if ($thrstarter2 <> $repuser) {

$from = "Antwort@Fotostube.net";            // insert your email adress here
  $post_url=$script_url."/showthread.php?bid=$bid&threadid=$threadid&page=$getlastpage";
        include_once(ROOT_PATH.'includes/email.php');
        $site_email = new Email();
        $site_email->set_from($from);
        $site_email->set_to($repmailto);
        $site_email->set_subject($subject_form);
        $site_email->register_vars(array(
          "recipient_name" => $board_moderator,
          "forum_name" => $board_name,
          "sender_name" => $username_form,
  "topics_url" => $post_url,
  "topics_content" => $message_form,
  "about" => $lang['new_reply'],
  "board_name" => $boardconfig['board_name']
 
        ));
                $site_email->set_body("board_mailtopics", $config['language_dir']);
                $site_email->send_email();
}else {}}

 //////////////////////////////////////////
 //////////End Eglys Email@reply///////////
 ////////////////////////////////////////// 
       
 if ($board_mod_emailpost == 1) {
        // send email to moderator of this forum
$post_url=$script_url."/showthread.php?bid=$bid&threadid=$threadid&page=$getlastpage";
$site_email = new Email();
        $site_email->set_from($sender_email, $username_form);
        $site_email->set_to($board_moderator_email);
        $site_email->set_subject($subject_form);
        $site_email->register_vars(array(
          "recipient_name" => $board_moderator,
          "forum_name" => $board_name,
          "sender_name" => $username_form,
  "topics_url" => $post_url,
  "topics_content" => $message_form,
  "about" => $lang['new_reply'],
  "board_name" => $boardconfig['board_name']
 
        ));
                $site_email->set_body("board_mailtopics", $config['language_dir']);
                $site_email->send_email();
   
} else { // email not send

}
$txt_clickstream = "<a href=\"board.php\">".$boardconfig['board_name']."</a>".$config['category_separator']."".$lang['redirect_msg']."";
        $redirectpage = "<meta http-equiv=refresh content=\"3; url=showthread.php?bid=$bid&threadid=$threadid&page=$getlastpage#last \">";
             $content ="";
$msg= "<br><center>".$lang['redirect_msg']." <br> <a href=\"showthread.php?bid=$bid&threadid=$threadid&page=$getlastpage#last\">".$lang['redirect_msglink']." </a></center><br>";
                         }
}
}
}; // end if
$site_template->register_vars(array(
  "content" => $content,
  "reply" => htmlspecialchars(stripslashes($reply)),
  "threadid" =>$threadid,
  "board_id" => $board_id,
  "msg" => $msg,
  "iconmsg" => $iconmsg,
  "lang_info" => $lang['board_langinfo'],
  "clickstream" => $clickstream
 
));
$boardcontent = $site_template->parse_template("boardcontent");


It only happens sometimes...

Offline Flatermann

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #188 on: January 21, 2006, 01:08:27 PM »
Ifound a nother problem and would like to know if otheres have the same.

It seem then in thread the registerd since: date  is for all user that posted in thread the same as the on that opened the thread.

If others have the same problem please tell me so i can see if it was a mastake from me, otherweis i will post the sulotion how to fix that !!!!!

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #189 on: January 21, 2006, 04:33:18 PM »
<< Quote removed on request. >>

@Egly :

From these codings, I can see lots of corrections to be made. ;)

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #190 on: January 21, 2006, 04:45:46 PM »
@TheOracle
... why you quote the whole code of Egly for such a statement ... ? ... nobody need that ... ! ...  :?
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 TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #191 on: January 21, 2006, 04:58:45 PM »
@mawenzi:

Because I never thought it would of disturbed anyone ... if so, I apologize as it has now been removed  :oops: ...

In the mean time, here's my correction :

Code: [Select]

<?php

}elseif ($action == "qu") {

$sql "

SELECT thrtopic, thrid, thrtext, thrstarter
FROM "
.BOARD_TCONT_TABLE."
WHERE thrid = "
.$thread_id." AND thrforid = ".$bid;

$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)) {

$thrid $row['thrid'];
$thrtopic $row['thrtopic'];
$thrtext format_boardtext($row['thrtext'], $boardconfig['html_board'], $boardconfig['wordwrap_board'], $boardconfig['bb_board'], $boardconfig['bb_image_board'],1);
$thrstarter $row['thrstarter'];
$subject_form "RE :".$thrtopic."";
$reply "";

$sql "

SELECT repuser, reptext
FROM egly_boardtrep
WHERE repthrid = "
.$thrid;

$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)) {

$replier $row['repuser'];
$replytext format_boardtext($row['reptext'], $boardconfig['html_board'], $boardconfig['wordwrap_board'], $boardconfig['bb_board'], $boardconfig['bb_image_board'],1);
$replyspicker .="<table width=\"700\" border=\"0\" align=\"center\" cellpadding=\"4\" cellspacing=\"0\" class=\"threadspicker\">\n";
$replyspicker .="<tr>\n";
$replyspicker .="<td width=\"150\" valign=\"top\"><b>".$replier."</b> schrieb: </td>\n";
$replyspicker .="<td>\n";
$replyspicker .="<p>".$replytext."</p></td>\n";
$replyspicker .="</tr>\n";
$replyspicker .="</table>\n";
$replyspicker .="<br>\n";
};

}
}

$sql "

SELECT board_id, board_catid, board_name, board_moderator_id, auth_reply
FROM "
.BOARD_TABLE."
WHERE board_id = "
.$bid;

$result $site_db->query($sql);

while (
$row $site_db->fetch_array($sql)) {

$board_id $row['board_id'];
$board_catid $row['board_catid'];
$board_name $row['board_name'];
$board_moderator_id $row['board_moderator_id'];
$auth_reply $row['auth_reply'];

}

if ((empty(
$threadid) || $threadid || $bid 0)) {
$error_board $lang['board_badrequest'];
}

if (
$error_board) {
$main_template "board";
include(
ROOT_PATH.'includes/page_header.php');
show_error_board($error_board);
}

$subject_form .= $headline ;

$sql "

SELECT catid, catname
FROM "
.BOARD_CAT_TABLE."
WHERE catid = "
.$board_catid;

$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)) {

$catid $row['catid'];
$catname $row['catname'];
                                                    }
$txt_clickstream "<a href=\"".$site_sess->url(ROOT_PATH."board.php")."\">".$boardconfig['board_name']."</a>".$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."showboard.php?bid=".$board_id)."\">".$board_name."</a>".$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."showthread.php?bid=".$board_id."&threadid=".$threadid)."\"> ".$subject_form."</a>".$config['category_separator']. $lang['new_reply']."";

if (
$user_info['user_level'] < $auth_reply) {

$iconmsg "<img src=\"".TEMPLATE_PATH."/board_images/danger.gif\"  border=\"0\"> ";
$msg $lang['board_register'];
$txt_clickstream $lang['board_badrequest'];
$content "";
$redirectpage "<meta http-equiv=refresh content=\"11; url=".$site_sess->url(ROOT_PATH."board.php")."\">";

} else {
if (
$user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
   
$sender_name "<input name=\"username_form\" maxlength=\"15\" type=\"text\" class=\"inputarea\" id=\"username_form\"  size=\"50\">";
   
$sender_id GUEST ;
       }else {
   
$sender_name = ($user_info['user_level'] != GUEST) ? $user_info['user_name'] : "";
   
$sender_id = ($user_info['user_id'] != GUEST) ? $user_info['user_id'] : "";
   
$sender_email = ($user_info['user_level'] != GUEST) ? $user_info['user_email'] : "";
   
$sender_name_hidden "<input type=\"hidden\" name=\"username_form\" value=\"".$sender_name."\">";
    }
if (
$boardconfig['bb_board'] == ) {
    
$site_template->register_vars(array(
  
"smiles" => $smiles,
      
"lang_bbcode" => $lang['bbcode'],
      
"lang_tag_prompt" => $lang['tag_prompt'],
      
"lang_link_text_prompt" => $lang['link_text_prompt'],
      
"lang_link_url_prompt" => $lang['link_url_prompt'],
      
"lang_link_email_prompt" => $lang['link_email_prompt'],
      
"lang_list_type_prompt" => $lang['list_type_prompt'],
      
"lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    
$bbcode $site_template->parse_template("bbcodeboard");
  }

$site_template->register_vars(array(
  
"sender_name_hidden" =>$sender_name_hidden,
  
"lang_name" => $lang['name'],
  
"lang_subject" => $lang['subject'],
  
"lang_massage" => $lang['massage'],
  
"lang_post_reply" => $lang['post_reply'],
  
"threadid" =>$threadid,
  
"board_id" => $board_id,
  
"showtopic" => $showtopic,
  
"replyquote" =>$editpost,
  
"subject" =>$subject_form,
  
"reply" =>$reply,
  
"sender_id" => $sender_id,
  
"bbcode" => $bbcode,
  
"sender_name" => $sender_name,
  
"thrtext" => $thrtext,
  
"thrstarter" => $thrstarter,
  
"replyspicker" => $replyspicker,
  
"replier" => $replier,
  
"replytext" => $replytext

));
$content $site_template->parse_template("boardform_reply");

$error 0;
if (
$action == "post_reply") {

  
$reply= (isset($HTTP_POST_VARS['message_form'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['message_form'])) : "";
$user_name_field get_user_table_field("""user_name");
    if (!empty(
$user_name_field)) {
      if (
$site_db->not_empty("SELECT ".$user_name_field." FROM ".USERS_TABLE." WHERE ".$user_name_field." = '".strtolower($username_form)."' AND ".get_user_table_field("""user_id")." <> '".$user_info['user_id']."'")) {
        
$msg .= (($msg != "") ? "<br />" "").$lang['username_exists'];
        
$error 1;
      }
    }
      if (
$username_form == "")  {
      
$msg .= (($msg != "") ? "<br />" "").$lang['name_required'];
      
$error 1;
    }
      if (
$subject_form == "")  {
      
$msg .= (($msg != "") ? "<br />" "").$lang['subject_required'];
      
$error 1;
    }
      if (
$message_form == "")  {
      
$msg .= (($msg != "") ? "<br />" "").$lang['massage_required'];
      
$error 1;
    }
          if (
$error)  {
  
$iconmsg="<img src=\"".TEMPLATE_PATH."/board_images/danger.gif\"  border=\"0\"> ";
      
$txt_clickstream "<a href=\"".$site_sess->url(ROOT_PATH."board.php")."\">".$boardconfig['board_name']."</a>".$config['category_separator']."".$lang['error_proses']."";
    }
     if (!
$error)  {

           
$dbdate time();
        
$site_db->query("UPDATE ".BOARD_TABLE." SET board_posts=board_posts+1, board_lastpost_id='".$threadid."', board_lastpost_user='".$username_form."', board_lastpost_date='".$dbdate."' WHERE board_id = '".$bid."'");
        
$site_db->query("UPDATE ".BOARD_TINDEX_TABLE." SET thrreplies=thrreplies+1, thrlastpost_id='".$userid."', thrlastpost_user='".$username_form."', thrlastpost_date='".$dbdate."' WHERE thrid = '".$threadid."'");
        
$site_db->query("INSERT INTO ".BOARD_TREP_TABLE." (repthrid,repforid,reptopic,repuser,repuser_id,reptext,repdate,repposterip) VALUES ('$threadid','$bid','$subject_form','$username_form','$sender_id','$message_form','$dbdate','$REMOTE_ADDR')");
        
$site_db->query("UPDATE ".USERS_TABLE." SET user_posts=user_posts+1 WHERE user_name = '".$username_form."'");
       
$site_db->query("UPDATE ".BOARD_STAT_TABLE." SET totalposts=totalposts+1");

$reply_page $boardconfig['posts_perpage'];
             
$thread_rep $site_db->query("SELECT * FROM ".BOARD_TREP_TABLE." WHERE repthrid ='".$threadid."'");
             
$total_reply $site_db->get_numrows($thread_rep);
$getlastpage ceil($total_reply $reply_page);

$site_db->query("UPDATE ".BOARD_TABLE." SET board_lastpost_page='".$getlastpage."' WHERE board_id = '".$bid."'");
$site_db->query("UPDATE ".BOARD_TINDEX_TABLE."  SET thrlastpost_page='".$getlastpage."' WHERE thrid = '".$threadid."'");

$sql "

SELECT board_name, board_moderator, board_moderator_email, board_mod_emailpost
FROM "
.BOARD_TABLE."
WHERE board_id = "
.$bid;

$result $site_db->query($sql);

$num_rows $site_db->get_numrows($result);
$row = array();

while (
$row $site_db->fetch_array($result)) {

$board_id $row['board_id'];
$board_name $row['board_name'];
$board_moderator $row['board_moderator'];
$board_moderator_email $row['board_moderator_email'];
$board_mod_emailpost  $row['board_mod_emailpost'];

}

$site_db->free_result($result);

//////////////////////////////////////////
////////////Eglys Email@reply/////////////
//////////////////////////////////////////

$sql "

SELECT user_email
FROM "
.BOARD_TREP_TABLE.", ".USERS_TABLE."
WHERE "
.USERS_TABLE.".user_id = ".BOARD_TREP_TABLE.".repuser_id AND repthrid = ".$threadid." group by user_email";

$result $site_db->query($sql);
$row = array();

while (
$row $site_db->fetch_array($result)) {

$repuser $row['repuser_id'];
$repmailto $row['user_email'];
$from "Antwort@Fotostube.net"//insert your email adress here
$post_url$script_url."/showthread.php?bid=".$bid."&threadid=".$threadid."&page=".$getlastpage;

include_once(
ROOT_PATH.'includes/email.php');
$site_email = new Email();
$site_email->set_from($from);
$site_email->set_to($repmailto);
$site_email->set_subject($subject_form);
$site_email->register_vars(array(
"recipient_name" => $board_moderator,
"forum_name" => $board_name,
"sender_name" => $username_form,
"topics_url" => $post_url,
"topics_content" => $message_form,
"about" => $lang['new_reply'],
"board_name" => $boardconfig['board_name']
));

$site_email->set_body("board_mailtopics"$config['language_dir']);
$site_email->send_email();
}

$sql"SELECT user_email
FROM "
.BOARD_TCONT_TABLE.", ".USERS_TABLE."
WHERE "
.USERS_TABLE.".user_id = ".BOARD_TCONT_TABLE.".thrstarter_id AND thrid = ".$threadid;

$result $site_db->query($sql);

$row = array();

while (
$row $site_db->fetch_array($result)) {

$repuser $row['repuser_id'];
$repmailto $row['user_email'];
$thrstarter2 =$row['thrstarter_id'];

if (
$thrstarter2 <> $repuser) {

$from "Antwort@Fotostube.net"// insert your email adress here
$post_url $script_url."/showthread.php?bid=".$bid."&threadid=".$threadid."&page=".$getlastpage;

include_once(
ROOT_PATH.'includes/email.php');
$site_email = new Email();
$site_email->set_from($from);
$site_email->set_to($repmailto);
$site_email->set_subject($subject_form);
$site_email->register_vars(array(
"recipient_name" => $board_moderator,
"forum_name" => $board_name,
"sender_name" => $username_form,
"topics_url" => $post_url,
"topics_content" => $message_form,
"about" => $lang['new_reply'],
"board_name" => $boardconfig['board_name']
));
$site_email->set_body("board_mailtopics"$config['language_dir']);
$site_email->send_email();

} else {

}
}

//////////////////////////////////////////
//////////End Eglys Email@reply///////////
//////////////////////////////////////////

if ($board_mod_emailpost == 1) {

// send email to moderator of this forum
$post_url$script_url."/showthread.php?bid=".$bid."&threadid=".$threadid."&page=".$getlastpage;
$site_email = new Email();
$site_email->set_from($sender_email$username_form);
$site_email->set_to($board_moderator_email);
$site_email->set_subject($subject_form);
$site_email->register_vars(array(
"recipient_name" => $board_moderator,
"forum_name" => $board_name,
"sender_name" => $username_form,
"topics_url" => $post_url,
"topics_content" => $message_form,
"about" => $lang['new_reply'],
"board_name" => $boardconfig['board_name']
));

$site_email->set_body("board_mailtopics"$config['language_dir']);
$site_email->send_email();

} else { 
// email not send

}

$txt_clickstream "<a href=\"".$site_sess->url(ROOT_PATH."board.php")."\">".$boardconfig['board_name']."</a>".$config['category_separator']. $lang['redirect_msg']."";
$redirectpage "<meta http-equiv=refresh content=\"3; url=".$site_sess->url(ROOT_PATH."showthread.php?bid=".$bid."&threadid=".$threadid."&page=".$getlastpage."#last")."\">";
$content "";
$msg "<br><center>".$lang['redirect_msg']." <br> <a href=\"".$site_sess->url(ROOT_PATH."showthread.php?bid=".$bid."&threadid=".$threadid."&page=".$getlastpage."#last")."\">".$lang['redirect_msglink']." </a></center><br>";
                         }
}
}
}; 
// end if

$site_template->register_vars(array(
"content" => $content,
"reply" => htmlspecialchars(stripslashes($reply)),
"threadid" =>$threadid,
"board_id" => $board_id,
"msg" => $msg,
"iconmsg" => $iconmsg,
"lang_info" => $lang['board_langinfo'],
"clickstream" => $clickstream
));

$boardcontent $site_template->parse_template("boardcontent");
?>



;)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #192 on: January 21, 2006, 05:06:09 PM »
Update: Codings has been re-modified above due to slight changes I forgot to do. ;)

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #193 on: January 24, 2006, 03:47:06 PM »
@sigma and Olphi,
... I found another solution to fix the massage problem by editing user profil (Signature) ...
... related to this : http://www.4homepages.de/forum/index.php?topic=9598.msg57679#msg57679
... comment in these code lines ... !
... find in /includes/db_field_definitions.php :
Code: [Select]
$additional_user_fields['user_signature'] = array($lang['user_signature'], "text", 1);
... and replace with :
Quote
$additional_user_fields['user_signature'] = array($lang['user_signature'], "text", 0);
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 TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [addon] DREAMBOARD V 2.1
« Reply #194 on: January 24, 2006, 03:49:43 PM »
Quote

settig : 1 - is required
settig : 0 - is not required


Quote

it is the better solution ...


1. This should be added in the FAQs.
2. "settig" = "setting" (typed too fast may be ? :P) Besides, the whole line represents a setting, shouldn't you say : a required field ? :P
3. "better" = "best":)