Train GraphicClick on the map to explore geographics
 
I need help
FAQ
Emergency
About .
Travel & transport from BBC stories as at 17:55 28 Mar 2024
- How do I renew my UK passport and what is the 10-year rule?
- Passengers pleaded with knifeman during attack
* Family anger at sentence on fatal crash driver, 19
- Easter travel warning as millions set to hit roads
Read about the forum [here].
Register [here] - it's free.
What do I gain from registering? [here]
 02/06/24 - Summer Timetable starts
17/08/24 - Bus to Imber
27/09/25 - 200 years of passenger trains

On this day
28th Mar (1992)
MOD Kineton tour, branch line society (*)

Train RunningCancelled
16:54 Cardiff Central to London Paddington
17:48 Reading to Gatwick Airport
17:54 Cardiff Central to London Paddington
17:57 London Paddington to Worcester Foregate Street
18:04 Bristol Temple Meads to Filton Abbey Wood
18:04 Bedwyn to Newbury
18:08 London Paddington to Frome
18:26 Newbury to Bedwyn
18:37 Westbury to Swindon
18:51 Filton Abbey Wood to Bristol Temple Meads
18:55 Bedwyn to Newbury
19:24 Newbury to Bedwyn
19:29 Gatwick Airport to Reading
19:33 London Paddington to Worcester Shrub Hill
19:55 Bedwyn to Newbury
20:13 Swindon to Westbury
20:16 Frome to Westbury
20:49 Newbury to Bedwyn
20:56 Worcester Foregate Street to London Paddington
21:16 Bedwyn to Newbury
Short Run
14:49 Plymouth to Cardiff Central
15:10 Gloucester to Weymouth
15:15 Plymouth to London Paddington
15:23 Portsmouth Harbour to Cardiff Central
15:30 Cardiff Central to Portsmouth Harbour
15:42 Exeter St Davids to London Paddington
16:19 Carmarthen to London Paddington
16:23 Portsmouth Harbour to Cardiff Central
16:35 London Paddington to Plymouth
16:50 Plymouth to London Paddington
17:03 London Paddington to Penzance
17:30 London Paddington to Taunton
17:30 Warminster to Bristol Temple Meads
17:36 Swindon to Westbury
17:36 London Paddington to Plymouth
Delayed
13:59 Cardiff Central to Penzance
14:15 Penzance to London Paddington
14:36 London Paddington to Paignton
15:03 London Paddington to Penzance
16:03 London Paddington to Penzance
Additional 17:17 Exeter St Davids to Penzance
An additional train service has been planned to operate as shown 17:26 Castle Cary to Penzance
17:29 Gatwick Airport to Reading
PollsOpen and recent polls
Closed 2024-03-25 Easter Escape - to where?
Abbreviation pageAcronymns and abbreviations
Stn ComparatorStation Comparator
Rail newsNews Now - live rail news feed
Site Style 1 2 3 4
Next departures • Bristol Temple MeadsBath SpaChippenhamSwindonDidcot ParkwayReadingLondon PaddingtonMelksham
Exeter St DavidsTauntonWestburyTrowbridgeBristol ParkwayCardiff CentralOxfordCheltenham SpaBirmingham New Street
March 28, 2024, 18:07:14 *
Welcome, Guest. Please login or register.

Login with username, password and session length
Forgotten your username or password? - get a reminder
Most recently liked subjects
[133] West Wiltshire Bus Changes April 2024
[132] would you like your own LIVE train station departure board?
[53] Return of the BRUTE?
[44] If not HS2 to Manchester, how will traffic be carried?
[41] Infrastructure problems in Thames Valley causing disruption el...
[32] Reversing Beeching - bring heritage and freight lines into the...
 
News: the Great Western Coffee Shop ... keeping you up to date with travel around the South West
 
   Home   Help Search Calendar Login Register  
Pages: [1] 2 3 4
  Print  
Author Topic: The like button - what it does and does not do  (Read 35147 times)
grahame
Administrator
Hero Member
*****
Posts: 40690



View Profile WWW Email
« on: June 08, 2014, 05:27:55 »

Thus far, 28 of our members have used the "like" button on a total of 71 posts. 

The "like" button - familiar to those of us who are regular Facebook users - is a great way to acknowledge and agree with a post, or show your appreciation, without having to write a somewhat banal positive yet null message. 

The way we've implemented the button on our very mature software is to simply turn the work "like" into "yum" when someone presses the button ... and at all future views of the page the name of the liker is shown up.   And if you've liked a post and change your mind, you can "unlike" once you've refreshed and your like is gone without trace (unless I were to trawl back through backups of the database!).

User names showing up on the 'like' are current ones - if you should change your visible user name (something we strongly discourage for the most part) then it will change on posts that you have liked to reflect your new persona.

At the present time there are no facilities to compress liker lists ("and 6 others") and no facilities for our members to do anything like sent personal messages or alerts to everyone who's liked a post, or who has liked any post within a thread, and there are no plans for such facilities.

I am aware that on the end of notifications sent by email, you may be getting an extra [like] word in the text.  Sorry about that - as the software wasn't written with the thought of having the like button, the fix doesn't look trivial and I'm concentrating more on getting passengers on the TransWilts line, a good input to the DfT» (Department for Transport - about) consultation so that we can continue to get these good passenger numbers ( cos we still have an appropriate service - see http://www.railcustomer.info ), and on earning money to do the above and to feed ourselves, family and team.
« Last Edit: June 10, 2014, 11:09:20 by grahame » Logged

Coffee Shop Admin, Acting Chair of Melksham Rail User Group, Option 24/7 Melksham Rep
Red Squirrel
Administrator
Hero Member
*****
Posts: 5190


There are some who call me... Tim


View Profile
« Reply #1 on: June 08, 2014, 10:58:08 »


The way we've implemented the button on our very mature software is to simply turn the work "like" into "yum" when someone presses the button ...


Presumably that was to avoid confusion with the Yellowdog Updater, Modified?
Logged

Things take longer to happen than you think they will, and then they happen faster than you thought they could.
LiskeardRich
Transport Scholar
Hero Member
******
Posts: 3457

richardwarwicker@hotmail.co.uk
View Profile
« Reply #2 on: June 08, 2014, 14:45:54 »

Grahame, when I liked your opening post here I was redirected to a blank page. Is that meant to happen?
Logged

All posts are my own personal believes, opinions and understandings!
grahame
Administrator
Hero Member
*****
Posts: 40690



View Profile WWW Email
« Reply #3 on: June 08, 2014, 15:29:33 »

Grahame, when I liked your opening post here I was redirected to a blank page. Is that meant to happen?

Which browser are you using?   The server responds to the "like" with a 204 status code (no content) so it should not happen.
Logged

Coffee Shop Admin, Acting Chair of Melksham Rail User Group, Option 24/7 Melksham Rep
LiskeardRich
Transport Scholar
Hero Member
******
Posts: 3457

richardwarwicker@hotmail.co.uk
View Profile
« Reply #4 on: June 08, 2014, 22:13:12 »

Grahame, when I liked your opening post here I was redirected to a blank page. Is that meant to happen?

Which browser are you using?   The server responds to the "like" with a 204 status code (no content) so it should not happen.

I was on my ipad at the time, Safari of some kind

I've just liked the above post on IE10 and it goes into a load and continuously loads but going nowhere.
Logged

All posts are my own personal believes, opinions and understandings!
grahame
Administrator
Hero Member
*****
Posts: 40690



View Profile WWW Email
« Reply #5 on: June 10, 2014, 06:02:58 »

Grahame, when I liked your opening post here I was redirected to a blank page. Is that meant to happen?

Which browser are you using?   The server responds to the "like" with a 204 status code (no content) so it should not happen.

I was on my ipad at the time, Safari of some kind

I've just liked the above post on IE10 and it goes into a load and continuously loads but going nowhere.

Hmm ... Status code 204 (the one I've used) is defined as follows:

Quote
10.2.5 204 No Content

The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response MAY include new or updated metainformation in the form of entity-headers, which if present SHOULD be associated with the requested variant.

If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent's active view.

The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty line after the header fields.

Any geek-types like to advise me of a better alternative?  200 would always redraw the page ... can I write a form of "target = null" into my Javascript request to prevent display at the client end?
Logged

Coffee Shop Admin, Acting Chair of Melksham Rail User Group, Option 24/7 Melksham Rep
81F
Transport Scholar
Full Member
******
Posts: 81


View Profile Email
« Reply #6 on: June 10, 2014, 06:55:18 »

I tried to "like" Grahame's original post, and received

This page can^t be displayed
^Make sure the web address http://www.firstgreatwestern.info is correct.
^Look for the page with your search engine.
^Refresh the page in a few minutes.

My "like" does not appear to have registered.
Using IE (9?) on aol desktop
Logged
Brucey
Global Moderator
Hero Member
*****
Posts: 2260


View Profile WWW
« Reply #7 on: June 10, 2014, 07:13:15 »

Try something like this, using jQuery (untested):

In the body:
Code:
<span id="txt155611" class="likebutton"><a href="#" class="likebutton">like</a></span>

In the head:
Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).on('click', "a.likebutton", function() {
    var spanID = $(this).parent("span").attr("id");
    var targetURL = '/coffeeshop/lyke.php?id=' . spanID;
var jqxhr = $.ajax(targetURL).done(function() {
$('#'.spanID).html = 'yum!';
});
});
</script>

Get lyke.php to respond with 200.
« Last Edit: June 10, 2014, 07:39:32 by Brucey » Logged
Godfrey Tables
Full Member
***
Posts: 50


View Profile
« Reply #8 on: June 10, 2014, 20:54:25 »

Quote
Any geek-types like to advise me of a better alternative?

I can highly recommend the dojo library which has a nice API for handling AJAX requests...
http://dojotoolkit.org/
.. or more specifically:
http://dojotoolkit.org/reference-guide/1.9/dojo/_base/xhr.html#dojo-base-xhr

Alternatively, would it be possible to just use the 'target' attribute of the anchor tag to load the anything returned by the server into a hidden iframe? That should 'contain' anything returned by the server without affecting the parent document, so it would be free to return a 200. This is a slightly hacky approach but it might be quick to implement...
Logged
grahame
Administrator
Hero Member
*****
Posts: 40690



View Profile WWW Email
« Reply #9 on: June 11, 2014, 07:58:00 »

Those look like a couple of good ideas.  I'm a bit reluctant to start pulling in larger libraries although JQuery is getting to be pretty standard;  I will probably go with the "quick to implement" hack of redirecting to a hidden iFrame.   BIG pile of stuff on my plate for the next couple of days - probably a Sunday project for me to take further.
Logged

Coffee Shop Admin, Acting Chair of Melksham Rail User Group, Option 24/7 Melksham Rep
LiskeardRich
Transport Scholar
Hero Member
******
Posts: 3457

richardwarwicker@hotmail.co.uk
View Profile
« Reply #10 on: July 12, 2014, 00:59:37 »

Grahame, I'm using safari on iPad, and when clicking on like I just get a blank screen still. I couldn't gather from the above technical jargon whether this should have been rectified.
Screen print attached of what I am redirected to.
Logged

All posts are my own personal believes, opinions and understandings!
grahame
Administrator
Hero Member
*****
Posts: 40690



View Profile WWW Email
« Reply #11 on: July 14, 2014, 07:00:40 »

Grahame, I'm using safari on iPad, and when clicking on like I just get a blank screen still. I couldn't gather from the above technical jargon whether this should have been rectified.
Screen print attached of what I am redirected to.

Not yet rectified - too busy with time-dependent stuff (walking in the carnival parade) and stuff that could go badly wrong if not handled ("Reading on Train" thread and fallout).  Busy "real job" week here too, so essentially don't expect a change in the next week - sorry.

As an aside, 390 registered "like"s to date. June forum posts down last month / a pattern we saw in June 2013 and June 2012 too; Some of that might (this year) be due to people clicking "like" who would otherwise have added a little comment to acknowledge reading and approving of the post.
Logged

Coffee Shop Admin, Acting Chair of Melksham Rail User Group, Option 24/7 Melksham Rep
grahame
Administrator
Hero Member
*****
Posts: 40690



View Profile WWW Email
« Reply #12 on: August 04, 2014, 13:43:47 »

Pinging this up to the top of the pile ...

I've put in a mechanism to try and make it work nicer on other devices (a hidden iFrame) ... works on my browser, but please let me know how it works for you.

Up to 711 likes by 81 different members now ... so it's caught on a bit
Logged

Coffee Shop Admin, Acting Chair of Melksham Rail User Group, Option 24/7 Melksham Rep
TeaStew
Sr. Member
****
Posts: 148


View Profile Email
« Reply #13 on: August 04, 2014, 13:59:18 »

Seems to work fine for me using Safari on my phone!
Logged
brompton rail
Sr. Member
****
Posts: 262



View Profile
« Reply #14 on: August 04, 2014, 14:49:35 »

Yeh, works for me on my iPad!
Logged
Do you have something you would like to add to this thread, or would you like to raise a new question at the Coffee Shop? Please [register] (it is free) if you have not done so before, or login (at the top of this page) if you already have an account - we would love to read what you have to say!

You can find out more about how this forum works [here] - that will link you to a copy of the forum agreement that you can read before you join, and tell you very much more about how we operate. We are an independent forum, provided and run by customers of Great Western Railway, for customers of Great Western Railway and we welcome railway professionals as members too, in either a personal or official capacity. Views expressed in posts are not necessarily the views of the operators of the forum.

As well as posting messages onto existing threads, and starting new subjects, members can communicate with each other through personal messages if they wish. And once members have made a certain number of posts, they will automatically be admitted to the "frequent posters club", where subjects not-for-public-domain are discussed; anything from the occasional rant to meetups we may be having ...

 
Pages: [1] 2 3 4
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
This forum is provided by customers of Great Western Railway (formerly First Great Western), and the views expressed are those of the individual posters concerned. Visit www.gwr.com for the official Great Western Railway website. Please contact the administrators of this site if you feel that the content provided by one of our posters contravenes our posting rules (email link to report). Forum hosted by Well House Consultants

Jump to top of pageJump to Forum Home Page