11
tzvook
Re: send email with html to site members
  • 2006/5/17 14:31

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


OK ... found the little error in it: ( missed the 'name'=>'description' before )

the full code for mailform.php (line 82) should be:

include_once(XOOPS_ROOT_PATH "/class/xoopseditor/inbetween/forminbetweentextarea.php");
$body_text = (new XoopsFormInbetweenTextArea(array('caption'=> $body_caption'name'=>'mail_body''value'=>$mail_body'width'=>'100%''height'=>'250px'),true));



So now as far as I tested all if fine and hack is great.
I would really like to get more test reports, though I tested it quite a bit under 2.2.3 , and inbetween is functioning well in here ... pictures path, smilies ... all is good ....

I think it'll be a nice addition to the core ( 2.2.5 ... ??? ... phppp ? ) ... with a wysiwyg selection box and all .... after all it's a long awaited option for a lot of users

12
sceilig
Re: send email with html to site members
  • 2006/5/17 18:23

  • sceilig

  • Just popping in

  • Posts: 53

  • Since: 2006/3/1 1


Glad to hear your were able to implement it tzvook and thanks for testing.
I do see one issue which is that if you also select to have the message sent as a private message, the PM wont show the content of the message correctly (shows as straight html). I have looked at the PM module and its object handler but cant see where the html characters in the message are being translated to their character entities. The database stores the private message correctly as straight html - but doesnt when it renders to the readpmsg.php?

I also decided to use the evennews module, and the hack to get that to work with html emails would be here:

modules/evennews/admin/index.php
In the sendMessage() function just after
$xoopsMailer = &getMailer();

Quote:

$xoopsMailer->setContentType("text/html");
$xoopsMailer->setTemplate('mailusers.tpl');
$xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']);
$xoopsMailer->assign('X_SITEURL', XOOPS_URL."/");
$xoopsMailer->assign('X_MESSAGE', $mail_mess);


Of course you would need a html editor like inbetween in your messageForm function (not sure of the line number since Ive hacked this module quite a lot).
Quote:

include_once XOOPS_ROOT_PATH . "/class/xoopseditor/inbetween/forminbetweentextarea.php";
$sform->addElement(new XoopsFormInbetweenTextArea(array('caption'=> _ADM_EVENNEWS_MESSAGE, 'name'=>'mail_mess', 'value'=>$mainemailbodytext, 'width'=>'100%', 'height'=>'250px'),true));

13
tzvook
Re: send email with html to site members
  • 2006/5/17 18:45

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Are you using evennews with the 2.2.x series ?

14
sceilig
Re: send email with html to site members
  • 2006/5/17 19:24

  • sceilig

  • Just popping in

  • Posts: 53

  • Since: 2006/3/1 1


Im using Evennews v2.1 on XOOPS 2.2.4

I also wondered about the templating system in Evennews - there seems to be a section commented out. Perhaps in a previous version you could choose mail templates to use?
The commented out section is just after the Subject row in the messageForm function.

15
tzvook
Re: send email with html to site members
  • 2006/5/17 20:13

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Actually I kind of gave up evenews due to the problems importing a large no. of users (starts the problems from about 1500 users) .... take a look @ here: https://xoops.org/modules/newbb/viewtopic.php?topic_id=47617&viewmode=flat&order=ASC&start=0

16
tzvook
Re: send email with html to site members
  • 2006/10/25 16:47

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


I just now realised (with a new site I made) that since I send HTML nitifications, the users that chose to get nitified by PM get the html tags in the mail I send.

I searched the forum for a few hours and can't find any hack for that one ... if somebody made this hack ... please post, if not, I'll start digging again at the PM module ( I use XOOPS 2.2.3 )

17
tzvook
enable html in PM's
  • 2006/10/29 13:36

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


As happens a lot lately, I have to answer myself

Quite easy actually (after chasing it for 2 days) ...

Open /modules/pm/class/privmessage.php and look for the line:

$this->initVar('msg_text'XOBJ_DTYPE_TXTAREAnulltrue);


Add after this line:
// Tzvook hacked for HTML massages //
        
$this->initVar("dohtml"XOBJ_DTYPE_INT1false);
// Tzvook hacked for HTML massages //


Found Problems .... PM can't be sent now .... ... but solution got to be close ...

Any clue ..... somebody ??????

18
tzvook
Re: enable html in PM's
  • 2006/10/30 7:01

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


BUMP

Someone ????? .... what's wrong with my hack ???

It do the Work , but gives ERRORS when sending PM's ????????
(missing something) .....

????

19
tzvook
Re: enable html in PM's
  • 2006/10/31 14:13

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


LAST bump ....
No one sees my mistake ?

20
tzvook
Re: enable html in PM's
  • 2006/11/2 15:31

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Had to replace the line with
$this->initVar('msg_text'XOBJ_DTYPE_OTHERnulltrue);


Which is quite unsfe to do, but works !!! HTML is ok and PM is working !!!

probably an "unserialize" is needed here, but I don't know how to do it...

Login

Who's Online

380 user(s) are online (280 user(s) are browsing Support Forums)


Members: 0


Guests: 380


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits