private message on reply

hi there,

i want the follow:

when a user writes a message and i reply, the message from the user is not in the textfield.

thats too bad, because i do not know, what he was writing...

i found then the file COMPOSE.PHP - there is a place near row 223 called:

<textarea class="blogText" id="blogText" name="text"></textarea>

so i want to display the text from the original message unde my reply. i tried :

<textarea class="blogText" id="blogText" name="text"><? echo $sMessage_text; ?></textarea>

but it did not work

does anybody have a glue how i can do this ?

thanx

Quote · 2 Aug 2008

anybody ????

ist it SO hard ???

i just can't imagine, that it is such a big problem when you can a bit php....

i am not a programmer, but when you reply - the subject is also shown.

how can i modify it, that you can read the message inside the textarea when you reply

best regard

Quote · 14 Aug 2008

Some you can play with...added code is bold.

compose.php Dol.v.6.2 (only some part of the file)

 

 

function PageCompPageMainCode()
{
 global $site;

 $ret = '';
 $en_inbox_notify   = getParam("enable_inbox_notify");
 $en_dest_choice   = getParam("enable_msg_dest_choice");
 $free_mode     = getParam( "free_mode" );

 $member['ID']    = (int)$_COOKIE['memberID'];
 $member['Password']  = $_COOKIE['memberPassword'];
 $recipientID    = getID( $_REQUEST['ID'], 0 );

 

 $messageID = (int)$_GET[messageID];

 

 $recipient = getProfileInfo( $recipientID );
 
 $contact_allowed   = contact_allowed($member['ID'], $recipientID);

 // Check if member can send messages
 $check_res = checkAction( $member['ID'], ACTION_ID_SEND_MESSAGE );
 if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED
  && !$contact_allowed )
 {
  $ret = '
   <table width="100%" cellpadding="4" cellspacing="4" border="0">
    <tr>
     <td align="center">' . $check_res[CHECK_ACTION_MESSAGE] . '</td>
    </tr>
   </table>';
  return $ret;
 }

 //ob_start();

 $ret = '';

 if ( $_POST['action'] == "send" && strlen($_POST['text']) )
 {
  $action_result = "";

  // Check if recipient found
  if( !$recipient )
  {
   $ret = "
    <table width=\"100%\" cellpadding=\"4\" cellspacing=\"4\" align=\"center\">
     <tr>
      <td align=center>". _t("_COMPOSE_REJECT_MEMBER_NOT_FOUND") ."</td>
     </tr>
    </table>\n";
   return $ret;
  }

  // Perform sending
  $send_result = MemberSendMessage( $member, $recipient );
  
  switch ( $send_result )
  {
   case 1:
    $action_result .= _t_err( "_FAILED_TO_SEND_MESSAGE" );
    $hide_form = '0';
    break;
   case 3:
    $action_result .= _t_err( "_You have to wait for PERIOD minutes before you can write another message!", 1 );
    $hide_form = '1';
    break;
   case 5:
    $action_result .= _t_err( "_FAILED_TO_SEND_MESSAGE_BLOCK" );
    $hide_form = '0';
    break;
   case 10:
    $action_result .= _t_err( "_FAILED_TO_SEND_MESSAGE_NOT_ACTIVE" );
    $hide_form = '0';
    break;
   default:
    $action_result .= _t_action( "_MESSAGE_SENT" );
    $hide_form = '1';
    break;
  }
    }
 $ret .= '<div class="com_box"">';           
 if ( strlen($action_result) )
 {
  $ret .= $action_result;
 }


 if ( $recipient &&  $hide_form != '1' )
 {
  $ret .= '<div class="clear_both"></div>';

 

$message_sql= "SELECT `Text`, `Subject`, `Date` FROM `Messages` WHERE `ID` = '$messageID'";

 $message_arr= db_arr($message_sql);

 $ret = '';

 $ret .= '<div class="m_block">';
  $ret .= '<div class="m_subject_date">';
   $ret .= '<div class="name">';
    $ret .= _t('_Date').':';
   $ret .= '</div>';

   $ret .= '<div class="value">';
    $ret .= $message_arr['Date'];
   $ret .= '</div>';

   $ret .= '<div class="name">';
    $ret .= _t('_Subject').':';
   $ret .= '</div>';

   $ret .= '<div class="value">';
   $ret .= process_smiles( process_line_output($message_arr['Subject']) );
   $ret .= '</div>';

  $ret .= '</div>';


  $ret .= '<div class="m_text">';
   $ret .= process_html_output($message_arr['Text'], 150);
  $ret .= '</div>';
  $ret .= '<div class="clear_both"></div>';
 $ret .= '</div>';
$ret .= '<br /><br />';

 

$ret .= ProfileDetails( $recipient['ID'] );
  $ret .= '<div class="clear_both"></div>';
 }

Quote · 15 Aug 2008

Already tested with 6.1.1 :-)

Working fine !!! Great !!!

Thank you very much :-)

 

Hope that BoonEx will give us new features following the same way... One by one ;-)

 

 

 

Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine.
Quote · 15 Aug 2008

that works !

fine, 1588874154 thank you :-)

Quote · 15 Aug 2008

Write some code fast yesterday, code works but if messageID is empty it show a empty box one place, not so good...

so I have moved and added some code to it...

Hope it will work good to you now!!!

 

compose.php Dol.v.6.2 (only some part of the file)

Added code is bold.

 

 

function PageCompPageMainCode()
{
 global $site;

 $ret = '';
 $en_inbox_notify   = getParam("enable_inbox_notify");
 $en_dest_choice   = getParam("enable_msg_dest_choice");
 $free_mode     = getParam( "free_mode" );

 $member['ID']    = (int)$_COOKIE['memberID'];
 $member['Password']  = $_COOKIE['memberPassword'];
 $recipientID    = getID( $_REQUEST['ID'], 0 );

 $messageID = (int)$_GET[messageID];

 $recipient = getProfileInfo( $recipientID );
 
 $contact_allowed   = contact_allowed($member['ID'], $recipientID);

 // Check if member can send messages
 $check_res = checkAction( $member['ID'], ACTION_ID_SEND_MESSAGE );
 if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED
  && !$contact_allowed )
 {
  $ret = '
   <table width="100%" cellpadding="4" cellspacing="4" border="0">
    <tr>
     <td align="center">' . $check_res[CHECK_ACTION_MESSAGE] . '</td>
    </tr>
   </table>';
  return $ret;
 }

 //ob_start();

 $ret = '';

 if ( $_POST['action'] == "send" && strlen($_POST['text']) )
 {
  $action_result = "";

  // Check if recipient found
  if( !$recipient )
  {
   $ret = "
    <table width=\"100%\" cellpadding=\"4\" cellspacing=\"4\" align=\"center\">
     <tr>
      <td align=center>". _t("_COMPOSE_REJECT_MEMBER_NOT_FOUND") ."</td>
     </tr>
    </table>\n";
   return $ret;
  }

  // Perform sending
  $send_result = MemberSendMessage( $member, $recipient );
  
  switch ( $send_result )
  {
   case 1:
    $action_result .= _t_err( "_FAILED_TO_SEND_MESSAGE" );
    $hide_form = '0';
    break;
   case 3:
    $action_result .= _t_err( "_You have to wait for PERIOD minutes before you can write another message!", 1 );
    $hide_form = '1';
    break;
   case 5:
    $action_result .= _t_err( "_FAILED_TO_SEND_MESSAGE_BLOCK" );
    $hide_form = '0';
    break;
   case 10:
    $action_result .= _t_err( "_FAILED_TO_SEND_MESSAGE_NOT_ACTIVE" );
    $hide_form = '0';
    break;
   default:
    $action_result .= _t_action( "_MESSAGE_SENT" );
    $hide_form = '1';
    break;
  }
    }
 $ret .= '<div class="com_box"">';


 if ( strlen($action_result) )
 {
  $ret .= $action_result;
 }

 

// Check if messageID found
 if( $messageID )
 {
 $message_sql= "SELECT `Text`, `Subject`, `Date` FROM `Messages` WHERE `ID` = '$messageID'";

 $message_arr= db_arr($message_sql);

 $ret = '';

 $ret .= '<div class="m_block">';


  $ret .= '<div class="m_subject_date">';
   $ret .= '<div class="name">';
    $ret .= _t('_Date').':';
   $ret .= '</div>';

   $ret .= '<div class="value">';
    $ret .= $message_arr['Date'];
   $ret .= '</div>';

   $ret .= '<div class="name">';
    $ret .= _t('_Subject').':';
   $ret .= '</div>';

   $ret .= '<div class="value">';
   $ret .= process_smiles( process_line_output($message_arr['Subject']) );
   $ret .= '</div>';

  $ret .= '</div>';


  $ret .= '<div class="m_text">';
   $ret .= process_html_output($message_arr['Text'], 150);
  $ret .= '</div>';
  $ret .= '<div class="clear_both"></div>';
 $ret .= '</div>';
$ret .= '<br /><br />';
 }


 if ( $recipient &&  $hide_form != '1' )
 {
  $ret .= '<div class="clear_both"></div>';
  $ret .= ProfileDetails( $recipient['ID'] );
  $ret .= '<div class="clear_both"></div>';
 }

 

Quote · 15 Aug 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.