contactform

Creating and modifying plugins.
Post Reply
User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

contactform

Post by Timbalu » Sat Nov 10, 2012 7:30 pm

Underneath the contactform form we have the same standard sentences like for commentform forms.
At least one is completely useless and does not really help John Doe contacters to get on their way.
"Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet."
What can we do about it?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Czorneboh
Regular
Posts: 383
Joined: Tue Apr 08, 2008 7:17 pm
Location: Berlin
Contact:

Re: contactform

Post by Czorneboh » Sun Nov 11, 2012 6:08 pm

Oh, I was not recognising it.

I guess, this was overtaken from contactform underneath every article. It makes really no sense.

Everybody expects, that that message or comment addresses the blog-owner and should know, that he needs to type his/her email-address to get an answer.

So this sentence should simply deleted.
But behind the word "Kommentar" in next sentence could be added "oder Nachricht".

Or so:

"eine Frage, Nachricht oder einen Kommentar".

On Friday one reader has used the field to write for me only a comment combined with question.

regards
Czorneboh

User avatar
Don Chambers
Regular
Posts: 3638
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: contactform

Post by Don Chambers » Mon Nov 12, 2012 4:07 pm

That line is emitted by the spamblock plugin when the option "Hide E-Mail addresses of commenting users" is enabled. The code is at line 1227:

Code: Select all

                    if (serendipity_db_bool($this->get_config('hide_email', false))) {
                        echo '<div class="serendipity_commentDirection serendipity_comment_spamblock">' . PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL_NOTICE . '</div>';
}

Is there a conditional test that plugin can use to determine if this is a comment vs. contact form?

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: contactform

Post by Timbalu » Tue Nov 13, 2012 5:39 pm

via CSS as easy as this... ;-) until better solution...

Code: Select all

/* hide contactform plugin comment form email text */
.serendipity_staticpage .serendipity_comment_spamblock {
    display: none;
}
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
Don Chambers
Regular
Posts: 3638
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: contactform

Post by Don Chambers » Tue Nov 13, 2012 5:55 pm

.serendipity_staticpage????

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: contactform

Post by Timbalu » Tue Nov 13, 2012 6:39 pm

Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
Don Chambers
Regular
Posts: 3638
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: contactform

Post by Don Chambers » Tue Nov 13, 2012 7:03 pm

Timbalu wrote:yes, wisely introduced in
https://github.com/s9y/Serendipity/blob ... ctform.tpl
;-)
The css above will only work for those using the 2k11 template. You said it was "wisely" added. I have no problem with the added class, but why did you refer to it as a "wise" addition? If it is indeed "wise", then perhaps it should be added to the plugin's tpl, and not just 2k11?

Also, for either 2k11, or the plugin, if there is to be a modified plugin_contactform.tpl, then there should probably be a matching plugin_dynamicform.tpl IMHO.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: contactform

Post by Timbalu » Tue Nov 13, 2012 7:35 pm

Don, as this thread did not fell on massive interest, I personally was satisfied with my small css solution for the moment. Please feel free to implement something better for all of us ...
Maybe you could find out with the assigned var

Code: Select all

{if !empty($staticpage_pagetitle)} do something {/if}
or change the plugin itself, to output a more specific contactform var to check for.
Or use one of these. Available are:

Code: Select all

 'plugin_contactform_articleformat' => $this->get_config('articleformat'),
 'plugin_contactform_name' => PLUGIN_CONTACTFORM_TITLE,
 'plugin_contactform_pagetitle' => $this->get_config('pagetitle'),
 'plugin_contactform_preface' => $this->get_config('intro'),
 'plugin_contactform_sent' => $this->get_config('sent', PLUGIN_CONTACTFORM_SENT_HTML),
 'plugin_contactform_message' => PLUGIN_CONTACTFORM_MESSAGE,
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7083
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: contactform

Post by yellowled » Tue Nov 13, 2012 9:22 pm

Don't know if you care, but you do realize that this will still be read in (at least some) screenreaders? It needs an additional visibility: hidden;

Other than that, this should really be suppressed in the contact form plugin in the first place since it really doesn't make any sense in the contact form in any template.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

Post Reply