Answer the question
In order to leave comments, you need to log in
How to add an additional field for DLE comments?
Can anyone suggest if it's possible to add an extra "phone" field for DLE comments?
Here is the addcomments.tpl code:
[not-logged]
<input type="text" name="name" id="name" placeholder="Ваше имя" required>
<input type="text" name="mail" id="mail" placeholder="E-mail" required>
<input type="text" name="phone" id="phone" placeholder="Телефон" required>
[/not-logged]
{editor}
<button type="submit" name="submit" id="add_com" class="but">Отправить</button>
<input type="text" name="phone" id="phone" placeholder="Телефон" required>
Answer the question
In order to leave comments, you need to log in
I don’t quite understand what kind of “toy” we are talking about, if you mean classic gamedev, then the second option is unambiguous - all the logic is on the backend.
usually the logic is not particularly heavy, and one server easily holds thousands of clients.
Create an additional field for users. And send data to engine/addcomments.php through this created input.
I won’t write the code, but I think you can figure it out there and do it by analogy with standard fields.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question