# |
Dec 5th 2017, 19:33 |
hmic |
and you should look at https://github.com/WyriHaximus/Ratchet to get started quick |
# |
Dec 5th 2017, 19:33 |
hmic |
you will need a pretty specifc server setup, so no shared hosting with apache |
# |
Dec 5th 2017, 19:33 |
inoas |
hmic :p |
# |
Dec 5th 2017, 19:33 |
inoas |
but maybe you just want to learn elixir ;p (sorry) |
# |
Dec 5th 2017, 19:33 |
hmic |
and websockets |
# |
Dec 5th 2017, 19:33 |
hmic |
more specifically cakephp |
# |
Dec 5th 2017, 19:33 |
inoas |
and just run a process every x to check if stuff changed |
# |
Dec 5th 2017, 19:33 |
hmic |
if you want to use php |
# |
Dec 5th 2017, 19:33 |
hmic |
same can be true on the software side |
# |
Dec 5th 2017, 19:32 |
inoas |
instead of websockets you can also use cakphp-queue and ajax |
# |
Dec 5th 2017, 19:32 |
hmic |
if you are bound to any server setup, your options are limited. |
# |
Dec 5th 2017, 19:32 |
hmic |
implemented has 2 parts: the software development and operations part |
# |
Dec 5th 2017, 19:31 |
maneken |
hmic: what would you suggest? I'm looking for something that can be implemented as fast as possible |
# |
Dec 5th 2017, 19:29 |
hmic |
there is a plugin to do that available |
# |
Dec 5th 2017, 19:28 |
hmic |
you can use e.g. ratchet to create a websocket server with php. but it's not a very common thing to do IMHO |
# |
Dec 5th 2017, 19:28 |
maneken |
Should I create one with nodejs? |
# |
Dec 5th 2017, 19:27 |
hmic |
your cakephp app on the server has no contunious running process which is nesseccary for making use of websockets |
# |
Dec 5th 2017, 19:26 |
maneken |
hmic ^ |
# |
Dec 5th 2017, 19:26 |
maneken |
I have a basic CRUD app. I have a Visitors Controller where anonymous users can add visitors (visitors/add) and verified users can see a list of visitors (visitors/list). All I want is the visitors list to automatically be updated when a user creates a new Visitor in visitors/add |
# |
Dec 5th 2017, 19:15 |
hmic |
maneken, whats the usecase? |
# |
Dec 5th 2017, 19:07 |
maneken |
Hello. I have a small experience in cakephp3 and JS. I'm looking for the easiest way to add websockets in my application. Do you have any usefull links / tutorials? |
# |
Dec 5th 2017, 18:41 |
saeideng |
and you hmic |
# |
Dec 5th 2017, 18:41 |
saeideng |
@neon1024 thank you for reply |
# |
Dec 5th 2017, 17:52 |
dereuromark |
never mind then, too error prone |
# |
Dec 5th 2017, 17:52 |
dereuromark |
yeah only chrome etc work (even IE10..), but not FF |
# |
Dec 5th 2017, 17:51 |
hmic |
and#10 and U+000A is the same character |
# |
Dec 5th 2017, 17:51 |
dereuromark |
might not be too compatible with browsers just yet, though |
# |
Dec 5th 2017, 17:50 |
dereuromark |
and#10; worked for me |
# |
Dec 5th 2017, 17:50 |
dereuromark |
afaik you can with https://stackoverflow.com/questions/7312623/insert-line-break-inside-placeholder-attribute-of-a-textarea |
# |
Dec 5th 2017, 17:42 |
admad |
you can't have new lines in placeholder https://stackoverflow.com/questions/7189223/can-you-have-multiline-html5-placeholder-text-in-a-textarea |
# |
Dec 5th 2017, 17:35 |
dereuromark |
like nl2br() or autoParagraph() handle it |
# |
Dec 5th 2017, 17:35 |
dereuromark |
auto transform PHP_EOL makes sense to me |
# |
Dec 5th 2017, 17:35 |
dereuromark |
yeah, but I need a newline, and the PHP_EOL does not work and the html char would but is escaped |
# |
Dec 5th 2017, 17:34 |
dereuromark |
I just cant disable it only. |
# |
Dec 5th 2017, 17:34 |
hmic |
and why do you care if it's escaped or not - the placeholder is static text in your code, isn't it? |
# |
Dec 5th 2017, 17:34 |
dereuromark |
as could any other attr |
# |
Dec 5th 2017, 17:34 |
dereuromark |
makes sense, because it could contain dangerous HTML |
# |
Dec 5th 2017, 17:34 |
dereuromark |
it does, yeah |
# |
Dec 5th 2017, 17:34 |
hmic |
escape => true escapes the placeholder?! |
# |
Dec 5th 2017, 17:32 |
dereuromark |
How do you do placeholder newlines in textareas? 'and#10;' would be escaped, but I also dont want to disable escape here completely. Couldnt we have PHP_EOL transformed into 'and#10;' for escape => true? |
# |
Dec 5th 2017, 17:25 |
hmic |
you can use the very same concepts in 2.x already! works exactly the same way |