Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#526 2008-12-22 12:05:19
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
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
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
#529 2008-12-25 21:47:17
Re: zem_contact_reborn 4.0.3.20
- wrote:*
I got the following error message.
pre.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..
Hello Axel,
I think your ISP has enabled PHP safe mode. Some ISP allows you to disable PHP safe mode. If you can’t do it yourself, then ask them. My ISP (servage.net) allows me to turn the PHP safe mode.
Kind regards,
Maarten.
Kind regards,
Maarten
Offline
#530 2008-12-26 07:42:19
Re: zem_contact_reborn 4.0.3.20
- wrote:*
If I replace the file with an older version (rev. 2464) the mailer works fine
This is a known bug which is fixed in the most current version of txplib_misc.php. Using this file should provide a workaround for safe-mode restrictions until Textpattern 4.0.8 is released.
Offline
#531 2008-12-26 09:14:16
Re: zem_contact_reborn 4.0.3.20
THX a lot wet! it works like a charm
I hope you all have a nice and chilling Christmas time
Greetz [Axel]
Offline
#532 2008-12-30 03:42:23
Re: zem_contact_reborn 4.0.3.20
Hi Ruud (or anyone else who can help me),
I’m in a bind and I really need some help. I can’t get this to work so that the “Tell a Friend” form sends a URL for the home page and isn’t tied to a specific article. It seems really simple, but there isn’t a plugin that does this by default. I don’t understand PHP very well and I want to make sure the form is secure for the client.
The intent is to have a “tell a friend” button on every page – when clicked the user ends up at a form on the contact page to input their e-mail and their friend’s e-mail (it would be nice to be able to input multiple e-mails, separated by commas). The form would validate and send a message (message can be fixed in the code) to the recipient with a link to the home page URL.
This is different from a “send_article” link, as it is NOT tied to a specific article. Perhaps zem_contact is not the best plugin for this? Perhaps it needs to be customized? Whatever the case I really need to make this seemingly simple task work, and I need some help to do it. The suggestions made above don’t seem to work at all, or I’m not understanding correctly what I should be doing.
I’m willing to pay you for your time to help me accomplish this – please help me out.
Your time and help is very, very much appreciated.
Thank you,
Michael
Offline
#533 2008-12-30 09:57:03
Re: zem_contact_reborn 4.0.3.20
Michael/maodiddy, send me an email (link on left side).
Offline
#534 2008-12-30 10:09:50
Re: zem_contact_reborn 4.0.3.20
Hi Ruud – looks like you aren’t showing your e-mail or messaging links… I only see a link to your website. (?)
edit: check your email ;)
Last edited by ruud (2008-12-30 10:48:42)
Offline
#535 2009-01-02 19:15:13
- facho
- Member
- Registered: 2007-04-15
- Posts: 64
Re: zem_contact_reborn 4.0.3.20
I’ve got an issue with the form mail not being sent. It looks like it works, but I never receive the mail (yes, I checked junkmail). Here’s what I am doing:
From the article page, I call a form using the following tag: <txp:output_form form=“askForm”/>
Within the form, I have code for a lightbox (so the form will be displayed there) and zem_contact. The Zem piece within the form is:
<div id=“askForm”> <txp:zem_contact to=“MY EMAIL ADDRESS” label=“Send Your Question” thanks=“Thank you for your question. You’ll see it in the newsletter if it gets published.”><txp:zem_contact_text label=“What’s Your Name?” /> <txp:zem_contact_email label=“What’s Your eMail?” /> <txp:zem_contact_text label=“Where are you from?” /> <txp:zem_contact_textarea label=“What’s Your question?” />
<txp:zem_contact_submit /> </txp:zem_contact> </div>What I get is a working lightbox and the form looks as expected. I fill it out and hit the send link. The lightbox goes away and I am returned to the page. I don’t get the confirmation message, but it feels like it works. However, like I said, I never get the mail. Any ideas?
Offline
#536 2009-01-02 20:22:55
Re: zem_contact_reborn 4.0.3.20
Check your source after submiting to see if the .zemThanks or .zemError messages are there but hidden. This may help lead you in the right direction.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#537 2009-01-02 21:53:16
- facho
- Member
- Registered: 2007-04-15
- Posts: 64
Re: zem_contact_reborn 4.0.3.20
Can you give me more specific instructions? I’m still trying to figure all of this stuff out. Thanks for more details.
Offline
#538 2009-01-02 22:31:04
Re: zem_contact_reborn 4.0.3.20
When you submit the form and there is an error zem_contact_reborn will output a ul with a class of zemError. This may be hidden from view by the lightbox so I was suggesting looking at the html source of the page to see if you are missing an error. In internet explorer you would click “View – Source”.
Alternatively a give a url and we can check it out further.
Last edited by MattD (2009-01-02 22:31:44)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#539 2009-01-03 01:38:10
- facho
- Member
- Registered: 2007-04-15
- Posts: 64
Re: zem_contact_reborn 4.0.3.20
oh ok. I will give it a try shortly. The URL is: http://healthnutnation.com/ask-alison/ (click the ASK ALISON button)
Thanks!
Offline
#540 2009-01-03 01:52:13
- facho
- Member
- Registered: 2007-04-15
- Posts: 64
Re: zem_contact_reborn 4.0.3.20
I don’t see an error anywhere in the source. Any other ideas? I’m not sure where to go from here for troubleshooting.
Offline