Recent Topics

1 Jun 11, 2008 16:39    

My b2evolution Version: 2.x

Hello,

yesterday i tried to hide the complete "options" of my comment formfield and i want to put the turing test over the comment textfield.

Im using b2evolution 2.2.0-beta and turingtest plugin 220

here you can see the image of the comments.

http://www.apocalypsed.de/forum/commenttab.jpg

The options should be enabled but they shouldn´t be indicated at the formfields

This is the script of the item_feedback_inc.php

if( ! is_logged_in() )
{ // User is not logged in:
$comment_options[] = '<label><input type="checkbox" class="checkbox" name="comment_cookies" tabindex="7"'
.' checked="checked" value="0" /> '.T_('Remember me').'</label>'
.' <span class="note">('.T_('Name, email &amp; website').')</span>';
// TODO: If we got info from cookies, Add a link called "Forget me now!" (without posting a comment).

$comment_options[] = '<label><input type="checkbox" class="checkbox" name="comment_allow_msgform" tabindex="8"'
.' checked="checked" value="0" /> '.T_('Allow message form').'</label>'
.' <span class="note">('.T_('Allow users to contact you through a message form (your email will <strong>not</strong> be revealed.').')</span>';
// TODO: If we have an email in a cookie, Add links called "Add a contact icon to all my previous comments" and "Remove contact icon from all my previous comments".
}

any ideas?

2 Jun 11, 2008 19:02

You've lost me at your question. *if* you just want to hide the options from the users and just set them to "always true" then just change the section of code you posted to :

if( ! is_logged_in() )
{ // User is not logged in:
$comment_options[] = '<input type="hidden" name="comment_cookies" value="1" />' ;
// TODO: If we got info from cookies, Add a link called "Forget me now!" (without posting a comment).

$comment_options[] = '<input type="hidden" name="comment_allow_msgform" value="1" /><!-- this one would be better as value="0" ;) -->';
// TODO: If we have an email in a cookie, Add links called "Add a contact icon to all my previous comments" and "Remove contact icon from all my previous comments".
} 

¥

3 Jun 11, 2008 19:08

It works.

Thanks

4 Jun 11, 2008 19:40

Now the users see the options formfield without content.
How i hide the whole formfield?

if( ! empty($comment_options) )
{
$Form->begin_fieldset();
echo $Form->begin_field( NULL, T_('options'), false );
echo implode('',$comment_options);
echo $Form->end_field();
$Form->end_fieldset();
}

5 Jun 11, 2008 19:42

apocalypsed wrote:

if( ! empty($comment_options) )
{
$Form->begin_fieldset();
echo $Form->begin_field( NULL, T_('options'), false );

echo implode('',$comment_options);
echo $Form->end_field();
$Form->end_fieldset();

}

delete the red bits ;)

¥

6 Jun 11, 2008 19:49

Ok, Thats it ;)

Thank you :>>


Form is loading...