Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to make live commentary page?

Featured Replies

Hello there,

 

Firstly I don't know if this is the right place, so I apologize in advance if I posted in a wrong forum, but I think comments are related with JavaScript.

 

I have a wordpress website. And I would like to know, if it is possible to make a commentary page. So basically a page where you would post your status updates/comments. Just admins, no one else. Example is this:

http://live.autosport.com/commentary.php/id/487

 

Is there any similar plugin available? Can be a comment system(like disques) integrated? Or is this totally custom made? If yes, how much would this custom work cost?

 

Would really appreciate any of your help or suggestions,

 

thanks

Well you could just put a snippet of Javascript on the page which refreshes the page every X seconds. That way, you can continually update the page, and viewers will see your updates almost live.

 

Not the most user-friendly approach, but it would work. Perhaps a way to stop the auto-refresh happening would be a good idea too, so people don't get refreshed when they're reading!

 

var refreshEvery = 5; //time in seconds
var refreshTimeout = setTimeout(function(){window.location.reload(true)}, refreshEvery*1000);

Then you can cancel that automated refresh with:

 

clearTimeout(refreshTimeout);

Edited by andyl

  • Author

Well you could just put a snippet of Javascript on the page which refreshes the page every X seconds. That way, you can continually update the page, and viewers will see your updates almost live.

 

Not the most user-friendly approach, but it would work. Perhaps a way to stop the auto-refresh happening would be a good idea too, so people don't get refreshed when they're reading!

 

var refreshEvery = 5; //time in seconds
var refreshTimeout = setTimeout(function(){window.location.reload(true)}, refreshEvery*1000);

Then you can cancel that automated refresh with:

 

clearTimeout(refreshTimeout);

 

Thanks for your respond,

 

I see. I'm not any kind of developer, so how would I do it excatly? I mean should I make new seperate template? Remember I'm using Wordpress.

Hi,

 

you dont have to have autorefresh, I dont believe your example page is doing that either

 

All they are doing is editing an article in word press and adding a few lines at the top and saving (or at the bottom and saving)

 

\EASY/

 

So all you do is create a nice page in wordpress and keep editing(and saving) it every few minutes (as admin).

Hi,

 

you dont have to have autorefresh, I dont believe your example page is doing that either

 

All they are doing is editing an article in word press and adding a few lines at the top and saving (or at the bottom and saving)

 

\EASY/

 

So all you do is create a nice page in wordpress and keep editing(and saving) it every few minutes (as admin).

 

 

Yes - but users will have to manually refresh to see changes...

Thanks for your respond,

 

I see. I'm not any kind of developer, so how would I do it excatly? I mean should I make new seperate template? Remember I'm using Wordpress.

Nope, just open up the HTML view of the page and pop this in somewhere:

 

<script type="text/javascript">
var refreshEvery = 5; //time in seconds
var refreshTimeout = setTimeout(function(){window.location.reload(true)}, refreshEvery*1000);
</script>

(I would change that number 5 for something a little longer...a refresh every 5 seconds would get very irritating. Maybe 10, 15 or 30 seconds).

 

Then add this somewhere where you want the user to be able to stop your forced refresh:

 

<a href="#" onclick="clearTimeout(refreshTimeout);return false">Stop refreshing</a>

Edited by andyl

  • Author

Nope, just open up the HTML view of the page and pop this in somewhere:

 

<script type="text/javascript">
var refreshEvery = 5; //time in seconds
var refreshTimeout = setTimeout(function(){window.location.reload(true)}, refreshEvery*1000);
</script>

(I would change that number 5 for something a little longer...a refresh every 5 seconds would get very irritating. Maybe 10, 15 or 30 seconds).

 

Then add this somewhere where you want the user to be able to stop your forced refresh:

 

<a href="#" onclick="clearTimeout(refreshTimeout);return false">Stop refreshing</a>

 

Thanks for your reply,

 

Hmm I see, this is a very manually thing to do, isn't it?

 

Is there any option that the page refreshes just when the page is updated?

 

I mean if you go to that website: http://live.autosport.com/commentary.php/id/487 -

you see every update has a time there.

It would be hard to allways type a time, make it in bold, and when you update the page it can go to some minutes difference.

 

We need to post updates quick, and this would take time.

 

Is there any automatic system? So I could insert a comment box or something in the page and just type something and press and the comment would appear just bellow it?

 

 

thanks

That would start to get quite complex, and you'd need a lot of custom coding.

Edited by andyl

I have a wordpress website. And I would like to know, if it is possible to make a commentary page. So basically a page where you would post your status updates/comments. Just admins, no one else.

You could just use a chat box plugin http://www.cbox.ws/ to show in part of your page. You could update this from the webpage (restricted to admin only) and the update would show immediately. (I think previous entries could be shown or deleted according to settings applied by restricting to one chat entry).

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.