1
marcan
"Tell a friend" module
  • 2003/11/13 15:43

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Hi, is there a "Telle a friend" module that would send email to a friend with a message that recommend our site?

Where could I find something like that?

Thanks !

2
Mithrandir
Re: "Tell a friend" module

"Something like that" would be the tell-a-friend feature of the news, but if you want a more general "Hey, here's a great site" mailing, you'll need something else, which I don't think is developed (yet)

3
ackbarr
Re: "Tell a friend" module

I believe there are two ways to accomplish this.

1) enable the "Site Info" block, which includes a "Recommend Us" link. The email message is not customizable by each user.

2) use the WF-Channel module, AFAIK this module includes a tell-a-friend page.

4
AAINC
Re: "Tell a friend" module
  • 2003/11/13 19:00

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Hello,
I converted the PHPNuke "recommend Us" to a tell a friend module and I am going to covert it to a XOOPS modle.
I will be releasing several basic XOOPS modules within the next few weeks including the tell a friend.

I will release my XOOPS horoscope module within the next couple of days.

AAINC

5
marcan
Re: "Tell a friend" module
  • 2003/11/13 19:08

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


converted the PHPNuke "recommend Us" to a tell a friend module and I am going to covert it to a XOOPS modle.
I will be releasing several basic XOOPS modules within the next few weeks including the tell a friend.
you can see the nuke module here


Hey ! I'm really pleased to hear that ! I'm looking forward to test your nwe modules !

6
marcan
Re: "Tell a friend" module
  • 2003/11/13 19:10

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


1enable the "Site Info" blockwhich includes a "Recommend Us" linkThe email message is not customizable by each user.


Ok, I did that and it is working, thanks ! However, my site is in french and the title of the message that is sent is not good. Where could I correct it. I went into the mail_templates of the french folder but there is only the body of the message. Could anybody tell me were is the variable that contain the title of the message?

Thanks !

7
ackbarr
Re: "Tell a friend" module

the string for the subject is in /language/french/misc.php' on line 10:
// %s is your site name
define("_MSC_INTSITE","Site intéressant : %s");


8
AAINC
Re: "Tell a friend" module
  • 2003/11/13 20:06

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Doh, <<<<<<(Homer Simpson Voice)

Why remake when it is already part of the core.
The popup from the case friend in the misc.php is nice and clean.
Just change the language file to what you want.
xoops_root/language/english/misc.php
Quote:

define("_MSC_YOURNAMEC","Your Name: ");
define("_MSC_YOUREMAILC","Your Email: ");
define("_MSC_FRIENDNAMEC","Friend Name: ");
define("_MSC_FRIENDEMAILC","Friend Email: ");
define("_MSC_RECOMMENDSITE","Recommend this Site to a Friend");
// %s is your site name
define("_MSC_INTSITE","Interesting Site: %s");
define("_MSC_REFERENCESENT","The reference to our site has been sent to your friend. Thanks!");
define("_MSC_ENTERYNAME","Please enter your name");
define("_MSC_ENTERFNAME","Please enter your friend's name");
define("_MSC_ENTERFMAIL","Please enter your friend's email address");
define("_MSC_NEEDINFO","You need to enter required info!");
define("_MSC_INVALIDEMAIL1","The email address you provided is not a valid address.");
define("_MSC_INVALIDEMAIL2","Please check the address and try again.");


I guess instead of having to hardcode the friend popup link we could make a basic module using the friend case:
http://Xoops_Root/misc.php?action=showpopups&type=friend&op=sendform&t=1068755097
Quote:

if ( !isset($HTTP_POST_VARS['op']) || $HTTP_POST_VARS['op'] == "sendform" ) {
if ( $xoopsUser ) {
$yname = $xoopsUser->getVar("uname", 'e');
$ymail = $xoopsUser->getVar("email", 'e');
$fname = "";
$fmail = "";
} else {
$yname = "";
$ymail = "";
$fname = "";
$fmail = "";
}
printCheckForm();
echo '
';
echo "




'._MSC_RECOMMENDSITE.'



\n";
echo _MSC_YOURNAMEC."
"._MSC_YOUREMAILC."
"._MSC_FRIENDNAMEC."
"._MSC_FRIENDEMAILC."
  
\n";
$closebutton = 0;
} elseif ($HTTP_POST_VARS['op'] == "sendsite") {
$myts =& MyTextsanitizer::getInstance();
if ( $xoopsUser ) {
$ymail = $xoopsUser->getVar("email");
} else {
$ymail = isset($HTTP_POST_VARS['ymail']) ? $myts->stripSlashesGPC(trim($HTTP_POST_VARS['ymail'])) : '';
}
if ( !isset($HTTP_POST_VARS['yname']) || trim($HTTP_POST_VARS['yname']) == "" || $ymail == '' || !isset($HTTP_POST_VARS['fname']) || trim($HTTP_POST_VARS['fname']) == "" || !isset($HTTP_POST_VARS['fmail']) || trim($HTTP_POST_VARS['fmail']) == '' ) {
redirect_header(XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform",2,_MSC_NEEDINFO);
exit();
}
$yname = $myts->stripSlashesGPC(trim($HTTP_POST_VARS['yname']));
$fname = $myts->stripSlashesGPC(trim($HTTP_POST_VARS['fname']));
$fmail = $myts->stripSlashesGPC(trim($HTTP_POST_VARS['fmail']));
if (!checkEmail($fmail) || !checkEmail($ymail)) {
$errormessage = _MSC_INVALIDEMAIL1."
"._MSC_INVALIDEMAIL2."";
redirect_header(XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform",2,$errormessage);
exit();
}
$xoopsMailer =& getMailer();
$xoopsMailer->setTemplate("tellfriend.tpl");
$xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
$xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']);
$xoopsMailer->assign("SITEURL", XOOPS_URL."/");
$xoopsMailer->assign("YOUR_NAME", $yname);
$xoopsMailer->assign("FRIEND_NAME", $fname);
$xoopsMailer->setToEmails($fmail);
$xoopsMailer->setFromEmail($ymail);
$xoopsMailer->setFromName($yname);
$xoopsMailer->setSubject(sprintf(_MSC_INTSITE,$xoopsConfig['sitename']));
//OpenTable();
if ( !$xoopsMailer->send() ) {
echo $xoopsMailer->getErrors();
} else {
echo "

"._MSC_REFERENCESENT."

";
}
//CloseTable();
}

Some small rewrite and it will work.



Then the link to tell a friend would show in the menu block and take you to a single page tell a friend mod.
No reason to covert from nuke, it already in the core.

I have been wandering through the core files and am loving it. Once I get more familar I will make more than the basic mods..

AAINC




9
Catzwolf
Re: "Tell a friend" module
  • 2003/11/13 21:40

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

AAINC wrote:
Doh, <<<<<<(Homer Simpson Voice)

Why remake when it is already part of the core.
The popup from the case friend in the misc.php is nice and clean.


Exactly.

There are many area's of XOOPS Core that developers just do not not use nor it seems know exisr.

The next version of WD-Channel has a 'ferer a freind' in there and it works like a charm. Why? Because I used the core functions and classes for it

10
Mithrandir
Re: "Tell a friend" module

/me whines for more lists of available functions, classes and purposes available in the core

Login

Who's Online

363 user(s) are online (102 user(s) are browsing Support Forums)


Members: 0


Guests: 363


more...

Donat-O-Meter

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

Latest GitHub Commits