Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#517 2008-12-14 16:32:35

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: zem_contact_reborn 4.0.3.20

Thanks ruud time to talk with the dorkwads at security metrics

Offline

#518 2008-12-18 07:25:53

maodiddy
Member
From: Seattle, WA - USA
Registered: 2008-02-10
Posts: 17
Website

Re: zem_contact_reborn 4.0.3.20

I’m curious if you can use ZCR to create a form for a user to e-mail the website URL to someone… as opposed to a specific article, just e-mail the site URL… The thought being that there would be a global “tell a friend” link that would take the user to this form regardless of where they are on the site.

Is this possible?

Thank you.

Offline

#519 2008-12-18 07:40:33

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: zem_contact_reborn 4.0.3.20

I am using ZCR on a site where the show_errors is displayed on a separate part of a page. All works fine. I’d like to add a custom message above the displayed form submission errors, something like “There was a problem with your contact submission”. Using an H2 tag. Can this be done?

Offline

#520 2008-12-19 12:36:49

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

maodiddy, you can easily do that creating a normal contact form and enclose the <txp:permlink /> tag in a <txp:zem_contact_secret /> tag in your contact form.

Jonathan, you can edit the plugin. Find the line that says $out .= n.'<ul class="zemError">'; and add your custom h2 header before the UL tag.

Offline

#521 2008-12-21 00:58:09

maodiddy
Member
From: Seattle, WA - USA
Registered: 2008-02-10
Posts: 17
Website

Re: zem_contact_reborn 4.0.3.20

Hi Ruud – thanks for getting back to me. Please forgive my ignorance – I’m not sure I entirely understand how to do this. This is what I have thus far.

The form, “referral_form” :

<txp:zem_contact_email label="Recipient Email" break="" />
  <txp:zem_contact_email label="Your Email" break="" />
  <txp:zem_contact_secret value='<txp:site_url />' />
  <txp:zem_contact_textarea default="I thought you would really enjoy this website!" break="" />
  <txp:zem_contact_submit label="Tell A Friend" />
  <p id="requiredFieldMessage">* Denotes required field</p>

is included on the contact page after the article, “refer-a-friend” (article ID=12) :

<txp:output_form form="head" />
	<div id="main">
    	<txp:if_individual_article>
        <txp:if_article_id id="12">
		<h2><txp:title /></h2>
		<txp:body />
		<txp:zem_contact to="michael@maostudios.com" redirect="contact/confirmation" form="referral_form" label="" show_error="1" />
	<txp:else />
		<txp:body /> 
	</txp:if_article_id>
    	</txp:if_individual_article>
    	</div>
	</div><!-- end main -->
<txp:output_form form="footer" />

What I am intending to do is have this form send a message to the e-mail entered as the “recipient email” with the message from the “message” field and a link to the site URL… so the message in the recipient’s inbox would look like:

Hi! I thought you would find this site interesting:
www.siteURL.com

I don’t want this message to e-mail to the site owner necessarily and I want the message to read natural to the recipient… I also don’t want to e-mail a link to a specific article, just the home page of the site… Can you help me understand how to do this better?

Thank you so much,
Michael

Offline

#522 2008-12-21 08:25:26

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

Try replacing

<txp:zem_contact_textarea default="I thought you would really enjoy this website!" break="" />

with:

<txp:zem_contact_secret label="I thought you would really enjoy this website!"><txp:permlink /></txp:zem_contact_secret>

Offline

#523 2008-12-21 09:07:14

maodiddy
Member
From: Seattle, WA - USA
Registered: 2008-02-10
Posts: 17
Website

Re: zem_contact_reborn 4.0.3.20

Thanks for the assistance, Ruud – however, this doesn’t solve any of the issues. This only creates an e-mail that still goes to the site owner (or whoever I define in the <txp:zem_contact to=“siteowner@siteurl.com” /> field) and the permlink is still specific to the article being viewed when sent – in this case the referral form page.

The e-mail doesn’t go to the recipient at all – I tested this – it only goes to the e-mail defined in the “to” field of the <txp:zem_contact /> tag… which is NOT the recipient e-mail.

What I want to do is create a form that enables the user to fill out their own personal message and also provides a link to the HOME page of the site. I don’t want this email to send to anyone except the e-mail that is filled out in the e-mail recipient field. Is this possible?

Thank you,
Michael

Offline

#524 2008-12-21 10:18:02

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

Hmm… know your own plugin, heh ;)

Have you looked at the ‘send_article’ attribute for the zem_contact tag (see plugin help)?

Offline

#525 2008-12-21 19:09:14

maodiddy
Member
From: Seattle, WA - USA
Registered: 2008-02-10
Posts: 17
Website

Re: zem_contact_reborn 4.0.3.20

I have looked at that, however I can’t get it to send a URL to just the home page instead of the page where the referral form is located. Also I can’t figure out how to send to just the recipient (or get the recipient’s email in the “to” property)…

Basically I want to be able to send a message with a link to the home page (as opposed to just a link to the current article) to only the recipient the user defines, not the recipient defined by the webmaster.

Does that make sense? Is it possible, and if so how is it done?
Perhaps there’s another method or plugin that does this better but so far I haven’t been able to find one.

Thanks for your help,
Michael

Offline

#526 2008-12-22 12:05:19

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

‘send_article’ allows the visitor to specify his/her own URL. You don’t have to specify the ‘to’ attribute when using ‘send_article’.

But to send only the link to the homepage, you’ll have to modify the plugin code:
Change this line: $msg[] = permlinkurl($thisarticle);
Into:

$msg[] = 'Hi! I thought you would find this site interesting:'
$msg[] = 'http://link_to_your_website';

If you want to prevent all other form fields from showing up in the email, add $msg = array(); just before those two lines and remove the two $msg[] lines that are a few lines further down in the code.

Offline

#527 2008-12-23 07:05:08

maodiddy
Member
From: Seattle, WA - USA
Registered: 2008-02-10
Posts: 17
Website

Re: zem_contact_reborn 4.0.3.20

OK – I’ve tried this and it didn’t seem to work for me… I think I’m going to need a little hand-holding on this, Ruud… Here is what I’ve got so far:

this is my contact page code – keep in mind that I am using the contact page for the global contact form (article id 8) and the referral form (article id 12), as well as the confirmation pages (all other article id’s in the contact section)… hopefully that will help the code below make sense to you:

<txp:output_form form="head" />
	<div id="main" class="column2">
		<h1 id="sectionHeading"><txp:section title="1" /></h1>
		<div class="post">
		<txp:if_individual_article>		    	
    		<txp:if_article_id id="8">
    			<txp:body />
				<txp:zem_contact to="michael@maostudios.com" redirect="contact/confirmation" form="contact_form" label="" show_error="1" />   
			<txp:else />	
				<txp:if_article_id id="12">
					<h2><txp:title /></h2>
					<txp:body />
					<txp:zem_contact redirect="contact/referral-confirmation" form="referral_form" label="" show_error="1" send_article="1" />
				<txp:else />
					<txp:body /> 
				</txp:if_article_id>	
    		</txp:if_article_id>
    	<txp:else />
    		<txp:article id="8">
    			<txp:body />
				<txp:zem_contact to="michael@maostudios.com" redirect="contact/confirmation" form="contact_form" label="" show_error="1" />   
    		</txp:article>
    	</txp:if_individual_article>
    	</div>
	</div><!-- end main -->
	<div id="sub" class="column1">
	<txp:chh_if_data>
	<h3>Categories:</h3>
	<txp:rss_uc_list section='<txp:section />' linktosection='<txp:section />' countlinked="0" class='subNav' />
	</txp:chh_if_data>
		<txp:output_form form="tell_friend" />
	</div><!-- end sub -->
<txp:output_form form="footer" />

And here is the form called “referral_form”:

<txp:zem_contact_secret label="I thought you would really enjoy this website!"><txp:site_url /></txp:zem_contact_secret>
  <txp:zem_contact_email label="Recipient Email" break="" send_article="1" />
  <txp:zem_contact_email label="Your Email" break="" />
  <txp:zem_contact_submit label="Tell A Friend" />
  <p id="requiredFieldMessage">* Denotes required field</p>

Currently, the referral form doesn’t even show up on the page. I’m not sure why – it will show up only if I fill in the “to” attribute and remove the “send_article” attribute… ??

I’ve reverted the plug-in code back to normal again.

You can see the BETA site here: http://mikeandmack.com/BETA/contact/refer-a-friend/

Is there a better way to do this?

Thanks,
Michael

Offline

#528 2008-12-25 19:37:58

[Axel]
Member
From: Switzerland/Denmark
Registered: 2007-07-26
Posts: 65
Website

Re: zem_contact_reborn 4.0.3.20

I got the following error message.

@Warning: mail() [function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE ***/textpattern/lib/txplib_misc.php on line 1048@

no mails are send.

If I replace the file with an older version (rev. 2464) the mailer works fine, but some other errors occur. expl. I have no access to the usertab in the admin section anymore in other words it displays a blank page under the tab..


Greetz [Axel]

Offline

Board footer

Powered by FluxBB