P
P
Pavel2016-06-25 16:09:44
C++ / C#
Pavel, 2016-06-25 16:09:44

How to make a button for loading images in the additional field DLE when you click the review?

I rummaged through the whole Google (I found only 1 way and that is not working.
It is necessary to implement the selection of an image from the computer and uploading it to the server after inserting a link to the image in the additional field, when adding news, I am attaching a screenshot of my form for adding news, alas, the horseradish button understand how to configure (
6121ceb4972b40d786db020de2d5d27b.PNG

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Armenian Radio, 2015-11-28
@gbg

The two options are either to write your own crazy comparator that treats zero in a special way, and then do a std::sort.
Or sort as usual, and then move the zeros to the beginning.

A
anikavoi, 2015-12-09
@anikavoi

It's very simple - qsort or std::sort have a compare procedure call as a parameter.
Here in this procedure, before comparing, bring the compared values ​​​​to unsigned (unsigned), and only then compare. Then -1 will become 0xffff and will be > 0.

P
Pavel, 2016-06-25
@0Err

I gave birth somehow, thanks to everyone: D who has the same problem, write for $ I will do it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question