Page 1 of 1

Tell a friend module ?

Posted: Sun Dec 10, 2006 12:00 pm
by siraxi
Hi there

I'm so excited I've got this CMS instaleld on my new website. Wondering if there is a ready to use tell-a-friend module that I could use?

Thanks!

Re: Tell a friend module ?

Posted: Fri Mar 09, 2007 7:40 pm
by vaughnt

Re: Tell a friend module ?

Posted: Sat Mar 10, 2007 7:51 pm
by Pierre M.
Hello,

well done. Sorry for being grumpy, but I'd like to tell that I don't like those "tell a friend" features : I think it is too often a way for spammers to collect 2 adresses at a time from webnewbies (like my beloved sister ;).

Pierre M.

Re: Tell a friend module ?

Posted: Fri Mar 16, 2007 11:51 am
by RonnyK
vaughnt,

thanks for providing the tag. I made a small change to the function I wanted to share. As I wanted the tag to be opened similar to the print-button I couldn't work with "REQUEST_URI" as that shows the current page. I changed the logic for $pageURL:

Code: Select all

$pageURL .= $_SERVER["HTTP_REFERER"];
This way the page I came from is the link provided and not the page that holds the tag. It might be good to have it as a variable in the tag, to choose between the current-page and the refering-page as it depends on the way you use the tag.

On my site I implemented your tag as follows:

In the template I call (in addition to {print}):

Code: Select all

<div style="float: right;"><a href="index.php?page=mailfriend"><img height="20" alt="" 
width="20" src="uploads/images/email-icon.png" />{print showbutton=true script=true}</div>
I then created a page called "mailfriend" as that is the page being called using the link (image). On the options tab, I unchecked the "visible in menu" as I don't want to show that page in menu, but it must be active to be able to call it. The content on that page is, the calling of the tag.

Code: Select all

{tellafriend_form emailsubject='Check out this page!' captcha=true}
The subject is than the calling page instead of the "mailfriend"-page. My suggestions for future development would be to call it from a link instead of a direct form, where there is an option on the page in the content, and maybe optionally the detailpage (the page where the form is to be opened).

One Karma to you.

Ronny

Re: Tell a friend module ?

Posted: Fri Mar 16, 2007 9:30 pm
by Nullig
I tried it out, but it doesn't seem to send any emails.

Is there a pre-requisite to have formbuilder installed?

My CMSMailer uses SMTP and other forms send OK.

Any ideas?

Nullig

Re: Tell a friend module ?

Posted: Wed Mar 21, 2007 11:08 am
by RonnyK
Nullig,

did you get it working yet?

On http://test.krijt.eu I got it working with the settings described above. It isn't using the FormBuilder.

If you want I can PM you a login/pw to see the settings on that site to see by yourself what is different from your setup.

Ronny

Re: Tell a friend module ?

Posted: Wed Mar 21, 2007 11:14 am
by Pierre M.
BTW, folks, don't your browsers have a "send page" or "send link" builtin feature ?
Pierre M.

Re: Tell a friend module ?

Posted: Wed Mar 21, 2007 11:25 am
by RonnyK
Pierre,

the browsers have that function, but they use the default mail-program to send it (Outlook f.e.). The tag goes through the CMSMS mailer, so no need for a mail-client.

Ronny