|
Terry Woody - 2017-09-09 18:07:49
Been playing around with your class and can't seem to make modification and wondering if you could assist?
See the code in XajaClient.js which closes alert when clicked and can remove to keep the div active at all times.
Is there simple way to keep the notifications send active on client side at all times? In other words the last send notification is always in view until new message is sent.
Using your class on a school project and really working nice.
Thanks in advance for any input.
Ettore Moretti - 2017-09-11 15:59:15 - In reply to message 1 from Terry Woody
Hello, to keep the notification always visible, you must delete the animation for the notification class in the file index.php of the client. In the XajaClient.js file in the longPollNotification function, delete or comment this line of code:
$('#notification').animate({
top: "0"
}, 500);
Also in the document.ready comments the part for hide notification and hide when clicked.
I hope to be of help to you.
Ettore
Terry Woody - 2017-09-11 16:20:10 - In reply to message 2 from Ettore Moretti
Thank you Ettore for information. I got that part understood.
What I try to do, is keep the message on client side until new message is sent. Maybe using local storage or even in the mysql database.
Also, is there a limit on amount of content / characters that can be send? Tried to send YouTube video embed code and would not send.
Using this to send content to students in classroom environment.
Thank you again.
Ettore Moretti - 2017-09-12 09:18:50 - In reply to message 3 from Terry Woody
Hi Terry,
For the content limit, the only limit is in the support db, xaja_user table (msg column, is a varchar of 360 char).
Also modifies the "SERVER/core/XajaAdminServer.php" file, instead of $stmt->bindParam ( ':msg', $notification ); enter $stmt->bindParam (':msg', $notification, PDO::PARAM_STR);
Doing so should not lose HTML tags.
Ettore
Terry Woody - 2017-09-12 15:03:36 - In reply to message 4 from Ettore Moretti
Thank you Ettore. Had already changed the varchar limit in table.
Unfortunately replacing the lines (there are 2 places) with $stmt->bindParam (':msg', $notification, PDO::PARAM_STR); does not work.
Get message "notification error".
When using $stmt->bindParam ( ':msg', $notification ); it says message with youtube embed is sent, but it is not.
Will continue to explore solution. If you come u with one appreciate the share.
All the best to you!
Terry
Ettore Moretti - 2017-09-12 18:25:44 - In reply to message 5 from Terry Woody
Hi Terry,
I tried downloading the class and posting a youtube embed.
I created the db, modified the SERVERLNK in the XajaClient.js file, tried sending this:
<iframe width="941" height="539" src="https://www.youtube.com/embed/cLdxuaxaQwc" frameborder="0" allowfullscreen></iframe>
Send it correctly, i get it in the client (Not only do i get it, but i can see the video in the div of notifications).
All with Google Chrome, which Browser are you using?
Ettore
Terry Woody - 2017-09-12 18:57:41 - In reply to message 6 from Ettore Moretti
I have tried in opera, chrome, edge and firefox. None work so must be the server platform since working for you.
Will try to troubleshoot and see what may be happening. No error messages or anything so might be impossible to find issue.
Thank you much for followup.
Terry Woody - 2017-09-14 07:29:05 - In reply to message 6 from Ettore Moretti
Quick note Ettore. Seems the YouTube issue has to do with the ? within the iframe code. If I remove them video sends fine.
Thinking either mod_security or Cloudflare causing the issue.
Just want to let you know.
Thanks!
|