Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#676 2009-09-25 19:41:58
Re: zem_contact_reborn 4.0.3.20
The error message is telling you that the function zem_contact() is being declared twice, which is illegal. Unless you have hacked your installation, the second declaration would most likely come from an older version of the plugin with a different name, either installed as normal or in your plugin cache.
BTW, for security it is probably best to edit such error messages before posting them publicly, excising the telling part of your file paths (everything before “/textpattern”).
Code is topiary
Offline
#677 2009-09-26 06:14:54
Re: zem_contact_reborn 4.0.3.20
Likely a copy of zem_contact, the predecessor of zem_contact_reborn.
PS. Editing out file paths is security by obscurity. If publishing file paths is insecure, then the system is insecure anyway.
Offline
#678 2009-10-08 14:56:47
Re: zem_contact_reborn 4.0.3.20
What should I change to the plugin code if I wanted to display the label in the e-mail, even if nothing was entered. Now, it doesn’t show at all.
I tried to use as the default text, but that shows that code in the inputfield, instead of replacing it with a non-breaking space.
Offline
#679 2009-10-09 09:07:35
Re: zem_contact_reborn 4.0.3.20
Michiel, you can do that by commenting out (or removing) the following line in the plugin code:
if (!trim($zem_contact_values[$name])) continue;
Offline
#680 2009-10-16 11:25:26
Re: zem_contact_reborn 4.0.3.20
Maybe a small bug in version 4.0.3.20 related to the way the form label is handled…
In the documentation, on can read:
label="text"
Label for the contact form. If set to an empty string, display of the fieldset and legend tags will be suppressed. Default is Contact.
If one does not put the label field, that’s okay, one gets a label, with value “Default”.
But if one puts a value or an empty value, the value of the form label equals the label from the last form field.
In the code, function zem_contact, I see:
if ($show_input and !$send_article or gps('zem_contact_send_article'))
{
return '<form method="post"'.((!$show_error and $zem_contact_error) ? '' : ' id="zcr'.$zem_contact_form_id.'"').' class="zemContactForm" action="'.htmlspecialchars(serverSet('REQUEST_URI')).'#zcr'.$zem_contact_form_id.'">'.
( $label ? n.'<fieldset>' : n.'<div>' ).
( $label ? n.'<legend>'.htmlspecialchars($label).'</legend>' : '' ).
$out.
n.'<input type="hidden" name="zem_contact_nonce" value="'.$zem_contact_nonce.'" />'.
n.'<input type="hidden" name="zem_contact_form_id" value="'.$zem_contact_form_id.'" />'.
$form.
callback_event('zemcontact.form').
( $label ? (n.'</fieldset>') : (n.'</div>') ).
n.'</form>';
}
I think $label should be something else, because $label gets its wrong value from the last iteration of:
foreach ($zem_contact_labels as $name => $label)
{
if (!trim($zem_contact_values[$name])) continue;
$msg[] = $label.': '.$zem_contact_values[$name];
}
I am right (there is a name clash), or I am in the void?
P.S.: sorry, no time for the moment, but I will try a fix in a few days.
Offline
#681 2009-10-17 20:55:02
Re: zem_contact_reborn 4.0.3.20
Those two blocks of code never execute at the same time, so they don’t clash.
If there’s a problem, please provide an example that shows how you’re using the plugin, what the result is and what you think is wrong.
Offline
#682 2009-10-21 05:38:48
- saccade
- Plugin Author

- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: zem_contact_reborn 4.0.3.20
Hi,
today I ran into problems installing contact_reborn on a new txp 4.20 install.
zem_contact_reborn won’t install.
There is an error message “Badly formed or empty plugin code.”
I never had this before. Thrice checked and verified, but I can’t get rid of it.
Any tipps?
Textpattern version: 4.2.0 (r3275)
Last Update: 2009-10-11 15:50:58/2009-10-11 15:43:25
Document root: /home/www
$path_to_site: /home/www
Textpattern path: /home/www/textpattern
Permanent link mode: section_id_title
Temporary directory path: /home/www/textpattern/tmp
Site URL: xxxxxx.de
PHP version: 5.2.10
GD Image Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server TZ: Europe/Berlin
Server Local Time: 2009-10-21 07:41:39
DST enabled?: 1
Automatically adjust DST setting?: 1
Time Zone: Europe/Berlin (3600)
MySQL: 5.0.32-CM4all-PRO-4-log
Locale: en_GB.UTF-8
Server: Apache/2.0.55 (Debian) JETServ/2.2.24 CM4all-JailCGI/1.2 mod_apreq2-20051231/2.6.0
PHP Server API: cgi
RFC 2616 headers: 0
Server OS: Linux 2.6.30.5-cmag1-toi-hosting32
Active plugins: rvm_maintenance-0.5, rvm_privileged-0.3, sac_link_in_excerpt-0.1.2, jmd_author-0.2, pap_contact_cleaner-0.1, zem_contact_lang-de-4.0.3.6, hcg_templates-0.3, tru_tags-3.5, upm_img_popper-1.3.7, wet_haystack-0.5, wet_quicklink-0.6, wet_peex-0.4
Admin-side theme: classic 4.2.0
Pre-flight check:
------------------------
.htaccess file is missing
Clean URL test failed.
------------------------
Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: utf8
character_set_filesystem: binary
character_set_results: utf8
character_set_server: utf8
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
17 Tables: OK
10 Custom Fields: custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10 (10)
PHP extensions: date/5.2.10, libxml, openssl, pcre, zlib/1.1, bcmath, calendar, ctype, curl, dba, dbase, dom/20031129, session, filter/0.11.0, ftp, gd, gettext, gmp, hash/1.0, iconv, json/1.2.1, ldap, mbstring, mcrypt, mhash, mysql/1.0, SimpleXML/0.1, SPL/0.2, PDO/1.0.4dev, pdo_sqlite/1.0.1, pgsql, posix, Reflection/0.1, standard/5.2.10, shmop, pdo_pgsql/1.0.2, soap, pdo_mysql/1.0.2, SQLite/2.0-dev, exif/1.4 $Id: exif.c,v 1.173.2.5.2.28 2009/05/28 14:03:09 pajoye Exp $, tokenizer/0.1, wddx, xml, xmlreader/0.1, xmlwriter/0.1, xsl/0.1, zip/1.8.11, cgi, suhosin/0.9.23, mailparse/2.1.1
Edit: I tried to install older versions. Now I succeeded with installing 4.0.3.18 – and then modified the code by pasting the code of 4.0.3.20. But I still have to test if it really works.
Last edited by saccade (2009-10-21 05:53:54)
Offline
#683 2009-10-21 09:14:47
Re: zem_contact_reborn 4.0.3.20
Michael, does it make a difference if you upload the compressed version of the plugin or not?
Is it the upload step that fails or the install confirmation step?
Offline
#684 2009-10-21 09:31:58
- saccade
- Plugin Author

- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: zem_contact_reborn 4.0.3.20
Ruud, nice to have you here :)
Stupid me, the compressed version worked – I didn’t think of that way.
BTW it failed in the upload step.
Thanks for your help! Now it is installed.
Offline
#685 2009-11-08 18:33:04
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Re: zem_contact_reborn 4.0.3.20
Getting this error when I place a tag down:
Fatal error: Call to undefined function zem_contact_gTxt() in /Library/WebServer/Documents/ohope/textpattern/lib/txplib_misc.php(594) : eval()’d code on line 464
When I place this tag in a content form
<txp:zem_contact_email />
I got the error.
I tried both compressed and uncompressed versions.
Plugin is activated as well.
Last edited by richtestani (2009-11-08 18:40:35)
Offline
#686 2009-11-08 20:14:57
Re: zem_contact_reborn 4.0.3.20
Did you also install zem_contact_lang?
Offline
#687 2009-11-09 00:31:22
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Re: zem_contact_reborn 4.0.3.20
No I did not.
Just did and that took care of it.
Thanks!
Offline
#688 2009-11-12 10:23:44
Re: zem_contact_reborn 4.0.3.20
On this page I’m using ZCR and it works great > www.redfoxwebdesign.nl/new/contact
I’ve put input[type="text"]:focus {background-color: #f4f4f4;} in the stylesheet and it works fine too … but when the form is coming back say because there is something wrong in a textfield … entering that field again makes the input disappear … and that is somewhat annoying. What can I do about it? Thanks for some help.
Last edited by RedFox (2009-11-12 10:30:09)
Offline
#689 2009-11-12 16:42:40
Re: zem_contact_reborn 4.0.3.20
You’re using a bit of javascript that removes the default value from the input field when that input field receives focus. If a user fails to fill out the form correctly, the default values of the form are the already filled out fields.
Example:
By default you have all input fields empty (default=”“).
If you enter the name “Ruud” and fill out an incorrect email address (fake@address) and submit the form, you’ll get a new form with default values “Ruud” and “fake@address” for the name/email fields.
I think it’s caused by this bit of javascript:
$('input[type="text"]').focus(function() {
$(this).removeClass("idleField").addClass("focusField");
if (this.value == this.defaultValue){
this.value = '';
}
if(this.value != this.defaultValue){
this.select();
}
});
If you leave out the line that says this.value = ''; the problem will be fixed I think.
Offline
#690 2009-11-12 19:52:58
Re: zem_contact_reborn 4.0.3.20
Yep … it’s ok now … thanks Ruud!
[edit]
It’s a ‘trick’ I found on http://buildinternet.com … a lot of code to get IE6 on board. I don’t know if I’ll use it when the site I’m building goes online!
Last edited by RedFox (2009-11-12 19:58:23)
Offline