Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi all,

I have a few challenges for those who think they like Couch :) Today is the first one.

First of all, it is for your entertainment with code and problem solving (although it has some merit in real world websites), so if you up to a challenge (not you, @KK, please be a judge on this) then try sharpen a tooth on the following task:

- 1 -
Create a simple text field in Couch AdminPanel, that can be saved with something only once but never changes its value again during subsequent page saves.
To clarify: the user can turn it from a blank text field to some text -- but after saving, they can't change it again via Admin Panel.
- - -

A solution comes with no PHP involved! Do not spoil the answer to others, as there are maybe different approaches. Simply send a PM with working code for the judges (me and @KK). Discussion is welcome in this thread. No deadlines, but if it takes more than a couple coffees, then ask around for the hints. Good luck :)

P.S. Once we get a few answers, we'll rate them here by the "Most elegant", "Most brief" etc. This first post of the topic will be updated over time.

P.P.S. Every winner who solves the task receives a special treat.
Very cool @trendoman! Just sent in my answer ...with zero coffees! (only because it's late here) :lol:

Looking forward to seeing other interesting ways of solving this!
As @mwlarkin1 got a clear win on this, I completed his wish for a desired treat. Congratulations!

Another no-PHP challenge is again connected to customization of AdminPanel, and is even more practical. The task is —

- 2 -
Create a dropdown input in any cloned template list-view in Admin Panel and upon selection it must correctly change the number of visible pages i.e. paginated limit. The shorter the code is — the better!
- - -


If anyone wants a small challenge with PHP, here is one interesting task that is also nice for AdminPanel — that is —

- 3 -
Display number of deleted pages in list-view.
For example, admin deletes 5 cloned pages, page reloads as usual and you show the confirmation (any text, toastr or admin alert) and, most importantly, show number "5" (amount of just deleted pages).
- - -

Screenshot-2023-03-04-122601.619.png
Screenshot-2023-03-04-122601.619.png (5.83 KiB) Viewed 1639 times


The shorter — the better! I say, it can be done in less than 10 PHP lines (plus unlimited lines for HTML) – this small PHP code should be enough ;) That's the third challenge.

A treat for the winnner is on me ;)

Good luck :)

Attachments

3 posts Page 1 of 1
cron