Page 1 of 1
Asking for a Real-Time Comment System Script
Posted: 22 Mar 2018, 12:49
by JanMolendijk
Dear Admin I looking for months for a script (i think javascript).
I want on my website when i have a page open & another member posting something to me that a popup or extra window
opens on the page where i`m -> with the post from the other user.
Meight you have a search-tip for me
Asking for a Real-Time Comment System Script
Posted: 23 Mar 2018, 06:26
by Admin
Hello,
I not know such a script, from what I know, that feature must be implemented in the user-login script. It must be made manually according to the user-posting script you have.
Try search on internet for: " real time comment system php ".
Or, you can ask and hire a freelancer to make that script, on freelancer's websites.
Asking for a Real-Time Comment System Script
Posted: 02 Apr 2018, 19:34
by JanMolendijk
I hope you had a good Easter... 2 questions:
About building a Real-Time Comment System
I found a way to do it with in a iframe in this iframe i dropt a alert script
to keep it continu updated i just place a reloader after some seconds
but is this way okey to do it because off continu loading from a iframe ???
My problem is i can`t put in the alert a hyperlink is their anything to fix this ?
Code: Select all
<script>
function loaded()
{
alert("<?php echo $user->filter->username; ?> <a href='http://145.53.93.209/Jan-Molendijk/' title='' class='postlink' target='_top'></a> Beep! ");
window.setTimeout(CloseMe, 5000);
}
function CloseMe()
{
window.close();
}
</script>
</head>
<body onLoad="loaded()">
Asking for a Real-Time Comment System Script
Posted: 03 Apr 2018, 06:21
by Admin
From my opinion, is not ok with continuu loading iframe, nor with default alert which cannot have a hyperlink.
A better way is with Ajax, to auto-call an ajax function every 7-8 seconds to check for messages.
If there is new message, to display a nice Div with a link and a button to close.
It is a bit complicated, and to make such a script you should learn to make ajax scripts.
Asking for a Real-Time Comment System Script
Posted: 21 Apr 2018, 14:46
by JanMolendijk
Stupid question is this a way to do it ???
But my opinion it is just like a I frame what is reloading ???
Code: Select all
<script src="jquery-latest.js"></script>
<script>
$(document).ready(function() {
$("#responsecontainer").load("popup.php");
var refreshId = setInterval(function() {
$("#responsecontainer").load('popup.php');
}, 10000);
$.ajaxSetup({ cache: false });
});
</script>
</head>
<body>
<div id="responsecontainer">
</div>
</body>
With this script I just load a little SQL document
Code: Select all
$sql = "SELECT `ip_adress`, `message_count` FROM `ip_register` WHERE ip_adress='$ip' AND NOT message_count='0' LIMIT 1 ";
I just use ELSE
Code: Select all
echo ''you have messages ;
}
}
else {
echo 'no message';
}
Asking for a Real-Time Comment System Script
Posted: 21 Apr 2018, 16:09
by Admin
If for you it is working as you want and you are content of its result, then it is ok.