S
S
Stanislav Molodtsov2016-08-25 19:46:41
JavaScript
Stanislav Molodtsov, 2016-08-25 19:46:41

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>

A line that's just for show right now, but should work:
<input type="text" name="phone" id="phone" placeholder="Телефон" required>

I couldn't find anything on the net about this topic, I would be very grateful if anyone can help!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
IllusionTurtle, 2016-06-07
@VGrabko

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.

A
Andrey Verkh, 2016-08-25
@sadisme

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.

I
Ivan, 2020-10-06
@9StarRu

Edit /engine/classes/js/dle.js
Approximately line 18 in version 14.1

$.post(dle_root+"engine/ajax/controller.php?mod=addcomments",{post_id:a.post_id.value,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question