4images Forum & Community
4images Issues / Ausgaben => Feedback & Suggestions => Topic started by: Kurman on August 18, 2009, 10:21:48 PM
-
Hi everyone!
I was thinking about uselessness of showing the user name while adding comments, if user is already logged in.
In comment_form.html
If users are not logged in, let's them insert wanted name as an author of a comment.
But if users are already logged in, there is no need for even show them the username input area, am I right?
There enough to show them only Subject area and textinput area.
So, I myself tried make not visible that area for logged in users using {ifnot lang_loggedin_msg} like this in comment_form.html:
{ifnot lang_loggedin_msg}
<tr>
<td width="90"><b>{lang_name}</b></td>
<td><input type="text" name="user_name" size="30" value="{user_name}" class="commentinput" /></td>
</tr>
{endifnot lang_loggedin_msg}
But then I recieve an error, as if I did not insert username and as a result, posting of a comment fails. :?
As I did not know how to make it work with {ifnot lang_loggedin_msg} tags I remove them.
It was unsuccessfull trying )))
But you will agree with me - it is a good idea, and it would be very nice, if this little thing would be solved in next version of 4images.
-
use these tags: {if user_loggedin}....{endif user_loggedin}
You can do it two ways:
disabling the input field:
<tr>
<td width="90"><b>{lang_name}</b></td>
<td><input type="text" name="user_name" size="30" value="{user_name}" class="commentinput" {if user_loggedin}disabled {endif user_loggedin}/></td>
</tr>
Or completely removing it:
{if user_loggedin}
<input type="hidden" name="user_name" value="{user_name}" />
{endif user_loggedin}
{ifno user_loggedin}
<tr>
<td width="90"><b>{lang_name}</b></td>
<td><input type="text" name="user_name" size="30" value="{user_name}" class="commentinput" /></td>
</tr>
{endifno user_loggedin}
-
Oops.. :(
I've tried, but alas.. It is not working.. (both of them does not working)
There is the same error, as if username is not entered, altrough I am logged in.
Need another solution.. These tags do not let send a comment.