Help Center Live Community

Support => Installation Help & Software Support => Topic started by: tuibm on June 27, 2007, 12:11:52 AM



Title: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 12:11:52 AM
I deactivate osTicket, Now, how can i deactivate phpmailer?? i dont want ppl to send me msgs...


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 12:14:28 AM
phpmailer is not for receiving message, but for sending mail out to visitors or notifications for the staff.


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 12:24:45 AM
oh, ok 

My problem is, (i deactivate te osTicket) When I am offline and someone tries to send an email, i get this error:

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /hcl/class/phpmailer/class.smtp.php on line 209

Warning: fsockopen(): unable to connect to :25 in /hcl/class/phpmailer/class.smtp.php on line 209

Then, i modify include.php from this:

        var $phpmailer_flag = false;
        var $email_flag = false;
to this:

        var $phpmailer_flag = true;
        var $email_flag = true;

and get this error:

Fatal error: Call to a member function on a non-object in /hcl/modules/HelpCenter/index.php on line 38

so, i want to deactivate the SEND MAIL function, or configure it but i don't know what files i need to modify to configure the send mail function...


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 12:27:36 AM
Hmm, your #3 with this issue.  And I just noticed that beta2 is having the same problem.  Most likely a variable mismatch somewhere.  Ok, I'll get on it with a hotfix for 2.1.2

I'll try to have it tonight, but no promises, I've just done about 13 hours of straight HCL, I'm taking a little break.


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 01:38:45 AM
Thanks!! :D

I make a php file that allow to send email from a flash (.swf) form.. give me a few minutes and i update it, this may be helpful for the send mail option (i hope)


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 01:40:08 AM
That would be cool, if nothing else it could be wrapped and used as a plug in replacement.  I love options. :D


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 01:48:48 AM
There is the file,


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 03:05:02 AM
Cool, I'll take a look at it a little later.  Since 2.1.3Beta2 was released, I need to take care of a couple of other things right at the moment.  I should be back on it tomorrow.


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 03:40:20 PM
any news?


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 04:02:36 PM
Afraid not.  I just haven't had a chance to even start eclipse up yet.


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 04:14:28 PM
Ok your script would work on for the contact, but not the transcripts.  To add it, just edit your the /live/divert.php file to include your script in.  I believe that is potentially where the error might be occuring, and will put some time into it today.


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 04:22:26 PM
Thanks  ;D i will work on it... thanks again :)


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 04:24:21 PM
Sorry, I was hoping to get a chance to put it in there for you, but I just haven't had much chance this morning.  Phone is ringing off the hook, and while I don't mind foruming while on the phone, coding is a whole 'nother story...


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 05:15:20 PM
mlzhosting: i modify the file live_divert.tpl to this:

Code:
{if $conf.forum_show == true}
<b><a href="{$conf.forum_url}" target="_blank">{$lang.forums}</a></b><br/><br/>
{/if}
<form action="mailform.php" method="post">
  <table cellspacing="0" cellpadding="5" class="border">
    <tr class="dark">
      <td colspan="2">{$lang.contact_us}</td>
    </tr>
    {if $departmentid == '0'}
    {/if}
    <tr class="medium">
      <td>{$lang.your_name}</td>
      <td><input type="text" name="name" value="" size="20" /></td>
    </tr>
    <tr class="medium">
      <td>{$lang.your_email}</td>
      <td><input type="text" name="email" value="" size="20" /></td>
    </tr>
    <tr class="medium">
      <td>{$lang.message}</td>
      <td><textarea name="message" rows="5" cols="20"></textarea></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" name="Enviar" value="Enviar" /></td>
    </tr>
  </table>
</form>
{/if}
</div>
</body>
</html>

but when i reload the page (www.mysite.com/hcl) i get the old live_divert.tpl
im using Bliss Template: so the file i modify was templates/bliss/live_divert.tpl

in the divert.php file i have this:
Code:
   // Display the output
    $GLOBALS['template']->display('live_divert.tpl');

what other file i need to modify??


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 05:18:27 PM
Try closing the browser and reopening it.  The templates are compiled and it may not have picked up the change.


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 05:24:11 PM
noup, same old tpl... i close and reopen it, i clear my private data, and same old tpl, i open it in another computer and still opening the old .tpl, i download the live_divert.tpl to another computer and is the modified file...  ???


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 05:28:09 PM
hold on, it should be /live/divert.php  There is no core file called live_divert.php.  It's very dependent on the file names being the same.


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 05:38:26 PM
is not live_divert.php, is live_divert.tpl (is the file that has the form) it found in hcl/templates/bliss/ i modify that file to this:

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$conf.company} - En Linea</title>
<meta http-equiv="Content-Type" content="text/html; charset={$lang.charset}" />
<link href="{$conf.url}/templates/{$conf.template}/css/live.css" rel="stylesheet" type="text/css" />
{if $javascript != ""}
<script type="text/javascript" language="javascript" src="{$conf.url}/class/js/include.php?{$javascript}">
</script>
{/if}
</head>
<body{$onload}>
<div align="center">
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="{$conf.url}/templates/{$conf.template}/images/live_top.gif" alt="" /></td>
  </tr>
</table>
<br /><br />

{if $divert == 'offline'}
  {$lang.operators_offline}
{elseif $divert == 'busy'}
  {$lang.connection_failure}
  <br /><br />
  {$lang.operators_busy}
  <br /><br />
{elseif $divert == 'email_sent'}
  {$lang.email_sent}
{else}
  {$lang.error}
{/if}

{if $conf.modules.osTicket.active == true}
<b><a href="{$conf.url}/module.php?module=osTicket&file=/modules/osTicket/open.php" target="_blank">{$lang.use_tickets}</a></b>
{if $conf.forum_show == true}
<br/><br/><b><a href="{$conf.forum_url}" target="_blank">{$lang.forums}</a></b>
{/if}
{else}
{if $conf.forum_show == true}
<b><a href="{$conf.forum_url}" target="_blank">{$lang.forums}</a></b><br/><br/>
{/if}
<form action="mailform.php" method="post">
  <table cellspacing="0" cellpadding="5" class="border">
    <tr class="dark">
      <td colspan="2">{$lang.contact_us}</td>
    </tr>
    {if $departmentid == '0'}
    {/if}
    <tr class="medium">
      <td>{$lang.your_name}</td>
      <td><input type="text" name="name" value="" size="20" /></td>
    </tr>
    <tr class="medium">
      <td>{$lang.your_email}</td>
      <td><input type="text" name="email" value="" size="20" /></td>
    </tr>
    <tr class="medium">
      <td>{$lang.message}</td>
      <td><textarea name="message" rows="5" cols="20"></textarea></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" name="Enviar" value="Enviar" /></td>
    </tr>
  </table>
</form>
{/if}
</div>
</body>
</html>

where mailform.php is the mailform script i attach to forum...

i modify divert.php to this, (only for probe the results)

Code:
<?php

    
// Copyright ? 2005 UberTec Ltd. All Rights Reserved

    // This file is part of Help Center Live.

    // Help Center Live is free software; you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation; either version 2 of the License, or
    // (at your option) any later version.

    // Help Center Live is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.

    // You should have received a copy of the GNU General Public License
    // along with Help Center Live; if not, write to the Free Software
    // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    // Contributors: Michael Bird

    // File Comments:
    // This file deals with visitors that have been diverted when requesting a chat
    // because there are no operators or all the operators are busy

    // $Id: divert.php,v 1.8 2005/07/05 18:24:56 mikebird Exp $ 

    //include_once('../class/include.php');
    //$inc = new Includer();
    //$inc->template();
    //$inc->department();
    //$inc->email();
    //$inc->chat();

    
//if ($GLOBALS['chat']->blocked()) {
        //$GLOBALS['template']->assign('text', $GLOBALS['lang']['blocked']);
        //$GLOBALS['template']->display('plain.tpl');
       // $inc->finished();
       // exit;
    //}

    //if (isset($_GET['departmentid'])) {
        //if ($_GET['departmentid'] !== '') {
            //$GLOBALS['template']->assign('departmentid', addslashes($_GET['departmentid']));
        //} else {
            //$GLOBALS['template']->assign('departmentid', '0');
       // }
    //} elseif (isset($_POST['departmentid'])) {
       // if ($_POST['departmentid'] !== '') {
          //  $GLOBALS['template']->assign('departmentid', addslashes($_POST['departmentid']));
      //  } else {
     //       $GLOBALS['template']->assign('departmentid', '0');
   //     }
  //  } else {
  //      $GLOBALS['template']->assign('departmentid', '0');
   // }

  //  if (isset($_GET['divert'])) {
  //      if ($_GET['divert'] == 'busy') {
  //          $GLOBALS['template']->assign('divert', 'busy');
   //     } elseif ($_GET['divert'] == 'offline') {
   //         $GLOBALS['template']->assign('divert', 'offline');
   //         $GLOBALS['template']->assign('departments', $GLOBALS['department']->listall('0'));
   //     }
 //   } elseif (isset($_POST['email_send'])) {
  //      $details['name'] = addslashes($_POST['name']);
  //      $details['from'] = addslashes($_POST['email']);
  //      $details['department'] = $GLOBALS['department']->name(addslashes($_POST['departmentid']));
  //      $details['email'] = $GLOBALS['department']->email(addslashes($_POST['departmentid']));
  //      $details['subject'] = addslashes($_POST['subject']);
   //     $details['message'] = addslashes($_POST['message']);
   //     $GLOBALS['email']->auth($GLOBALS['department']->email_host(addslashes($_POST['departmentid'])), $GLOBALS['department']->email_port(addslashes($_POST['departmentid'])), $GLOBALS['department']->email_username(addslashes($_POST['departmentid'])), $GLOBALS['department']->email_password(addslashes($_POST['departmentid'])));
   //     $GLOBALS['email']->contact($details);
   //     $GLOBALS['template']->assign('divert', 'email_sent');
   // } else {
   //     $GLOBALS['template']->assign('divert', '');
  //  }


  //  $GLOBALS['template']->assign('onload', '');

  //  $GLOBALS['template']->assign('javascript', 'misc');

    // Display the output
    
$GLOBALS['template']->display('live_divert.tpl');
    
    
// do events that need to be done at the end of the file
   // $inc->finished();
    

?>


But when i go to my address, i get this (image attach) if u see in live_divert.tpl i delete subject line and department...


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 05:46:09 PM
Ah, ok, I got confused.  (now you see why I don't code while doing phone work. hehehe)  Anyway, ftp into site, go into the compile directory and delete all the %% directories you see, make sure no one is in live help while you do this (can cause their page load to fail).  This should reset the compile directory and get you going again.


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 05:55:18 PM
jeje :P :P i see xD i delete only %% directories?? or % directories too


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 06:11:05 PM
I already delete % and %% directories, and i still have old live_divert.tpl form :S


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 06:21:48 PM
Hmm, weird, do you have a URL I could take a look at?  This is very odd, almost like it's caching somewhere.


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 06:42:28 PM
http://www.hotelcontinental.com/hcl


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 06:43:49 PM
Hmm, I get a 404 error from the link...


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 06:50:50 PM
sorry, is www.continentaluruapan.com/hcl
 i was in a call :P


Title: Re: I dont Want phpmailer
Post by: HCL Admin on June 27, 2007, 07:46:08 PM
Hmm, there isn't any PHP caching module installed is there?  If you have time to do a test, why don't we try removing the tpl file and see if we get an error.  We're working in the Bliss template, correct?


Title: Re: I dont Want phpmailer
Post by: tuibm on June 27, 2007, 07:49:10 PM
noup, any php caching module, let me delete the tpl file...

yes is bliss template


Title: Re: I dont Want phpmailer
Post by: xstremedesign on July 24, 2007, 02:34:29 AM
I had the same problem and it was my fault. I misspelled the name sever in department email setup. May want to check that everything in correct there. ::)