1
EyeKeeper
Liaise 1.24 with Xlanguage 3
  • 2007/2/16 12:18

  • EyeKeeper

  • Quite a regular

  • Posts: 209

  • Since: 2002/6/11


Hello!

I'm running both above mentioned modules on a XOOPS 2.016 site, php4 and MySQL 4 too...

No problem at all with the details above but in order to test XLanguage I created two tags [br] por Portuguese and [spanish].

I use this tags to thread the way the text before the fields is displayed and it runs fine

Example:
[br]Nome[/br][spanish]Nombre[/spanish] --> Field to be completed

The problem is with the email that I receive after the form is sumitted.

The template that is liaise.tpl forsees receiving the smarty tag {MSG} that contains the fields and their contents but the display is horrible once it gets the field's introductory name, e.g.:

(this is the email, ok?)
[br]Nome[/br][spanish]Nombre[/spanish]: field_content
etc...

How can I remove the tags and let only the field according to the language?

Thanks

2
EyeKeeper
Re: Liaise 1.24 with Xlanguage 3
  • 2007/2/21 22:17

  • EyeKeeper

  • Quite a regular

  • Posts: 209

  • Since: 2002/6/11


just bumping for help...

3
sabahan
Re: Liaise 1.24 with Xlanguage 3
  • 2007/2/22 10:32

  • sabahan

  • Quite a regular

  • Posts: 317

  • Since: 2006/3/4 5


i don't know if this would help but there is a new version of liaise

Liaise 1.26 http://www.brandycoke.com/home/modules/cryptica/showfile.php?file_id=31

4
EyeKeeper
Re: Liaise 1.24 with Xlanguage 3
  • 2007/2/22 12:41

  • EyeKeeper

  • Quite a regular

  • Posts: 209

  • Since: 2002/6/11


well... no luck with the change...

In fact I wouldn't consider it a porblem with liaise but it's an issue with the tags that should be removed...

I just need in the email the Portguese text but I don't know how to remove the text and the tags I don't want to keep

5
EyeKeeper
Re: Liaise 1.24 with Xlanguage 3
  • 2007/2/23 13:09

  • EyeKeeper

  • Quite a regular

  • Posts: 209

  • Since: 2002/6/11


I finally found the solution to my problem...

First of all I might say it's for one specific case so I didn't really care of making the "[br]" tags as variables but you can easily adapt it according to your needs...

what you need to do is:

edit the file \include\form_execute.php

around lines 68-70 you have:

if( $ele_caption != '' ){
   
$msg[$ele_id] = $myts->stripSlashesGPC($ele_caption)." ";
 }        }


change it to:

if( $ele_caption != '' ){
   
$er '~(.*?)[br](.*?)[/br](.*?)~sUi';
   
$tagless_caption preg_replace($er'\2'$ele_caption).": ";
   
$msg[$ele_id] = $myts->stripSlashesGPC($tagless_caption)." ";
 }


in this part I defined that I wanted to copy only the string between the tags [br] and [/br] because it was only the caption in Portuguese I needed. After I associated the back without all the rest...

Second you have to make sure that the form title will be changed too...
For that edit around line 198 the following line:

$xoopsMailer->setSubject(sprintf(_LIAISE_MSG_SUBJECT$myts->stripSlashesGPC($form->getVar('form_title'))));


and change it to:

$tagged_subject $form->getVar('form_title');
$er '~(.*?)[br](.*?)[/br](.*?)~sUi';
$tagless_subject preg_replace($er'\2'$tagged_subject);
$xoopsMailer->setSubject(sprintf(_LIAISE_MSG_SUBJECT$myts->stripSlashesGPC($tagless_subject)));


the explanation is the same as previous but here you make sure the subject in the message is tagless too...

that's it!

I hope it can be usefull for anyone else!

6
jagibu
Re: Liaise 1.24 with Xlanguage 3
  • 2007/7/26 20:08

  • jagibu

  • Just popping in

  • Posts: 68

  • Since: 2005/6/17


Quote:

RedEye wrote:

edit the file \include\form_execute.php

around lines 68-70 you have:

if( $ele_caption != '' ){
   
$msg[$ele_id] = $myts->stripSlashesGPC($ele_caption)." ";
 }        }


change it to:

if( $ele_caption != '' ){
   
$er '~(.*?)[br](.*?)[/br](.*?)~sUi';
   
$tagless_caption preg_replace($er'\2'$ele_caption).": ";
   
$msg[$ele_id] = $myts->stripSlashesGPC($tagless_caption)." ";
 }




This works for me (liaise 1.27);
I change only
$msg[$ele_id] = "n".$myts->stripSlashesGPC($tagless_caption)."n";

to original lines break sending in email ...
THX for hack RedEye ;)

Login

Who's Online

310 user(s) are online (205 user(s) are browsing Support Forums)


Members: 0


Guests: 310


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