Template talk:Queensland Timetables

Latest comment: 4 years ago by Kerry Raymond in topic Blank links

Reworked bus route timetables

edit

Currently the template individually checks each route and displays a personalised timetable for it. This makes it ineffiecent for use with routes.

In the sandbox I have reworked it. It now dynamically fills in the route. This requires a different parameter however. Regards, User:TheDragonFire300. (Contact me | Contributions). This message was left at 01:48, 16 May 2019 (UTC)Reply

edit

@Frietjes:Like Template:Cite New South Wales transport timetables which you developed for me a couple of years ago, this provides the facility to look up Queensland timetables. Both templates can be used wrapped in ref tags to provide references for the timetables requested such as

  • In the case of External links the New South Wales version can also be used to provide such links by not using the ref tags.
  • "Transdev NSW route 969". Transport for NSW.

However in the case of the Queensland one the information is also displayed but about 40 blank lines appear before the link is shown and then about 60 blank lines afterwards - for furher information see after the 60 blank lines.

  • "Route 500 timetable". Translink.
  • Looking at the created html those lines are all made up of </p><p><br /> Do you know where this code come from and can you get rid of it?
  • There is an entry [3] the equivalent of which appears in the External Links of every Queensland rail line such as the Doomben railway line so it would be handy to use this template so that it only needs to be changed once and not in every line article. They all need to be updated now to the 1 May 2020 version. If the template is used only one change would be needed in future.Fleet Lists (talk) 05:33, 21 June 2020 (UTC)Reply

References

Fleet Lists, I fixed the blank lines, but it looks like there is two different input syntax? one which uses |route= and one which doesn't? Frietjes (talk) 13:27, 22 June 2020 (UTC)Reply

@Kerry Raymond:I had a problem with this template in that in some cases it inserted a number of blank lines both before and after the correct data it displayed which I showed here but has since gone since Frietjes fixed the problem. But she does ask a question as to why there is two different syntax - see above. I had noticed that when I was trying to solve the problem myself without any luck. But I had no idea why the two different syntax. Can you explain why that happened when this template was created and are both really needed? I have just updated the 13 trains lines which had the problem but can now use the template.Fleet Lists (talk) 03:55, 23 June 2020 (UTC)Reply
Yes, I knew the blank lines were a problem but I didn't know what the syntax was to fix it, so thank you @Frietjes: for fixing it. I am not quite sure what the question about the 2 syntaxes relates to. I created the template but it has grown considerably since then. Kerry (talk) 04:31, 23 June 2020 (UTC)Reply
@Frietjes and Kerry Raymond:I think I see a potential problem. In Parameters it states that for bus routes "route=xxx""should be used but in examples it just shows the route number without the word "route". In the problem definition above I changed one of the entries to "route=500" and both still work BUT with different results in that where the "route=" is used, the retrieved date is not shown. My interpretation of this now is that if "route=" is used each time the template is used for bus routes, all the entries for individual routes could be deleted and the group entry at the end would always be the one which would be used. The retrieve date is pretty useless anyway so if that is now shown should not worry anyone. In fact one editor did delete some retrieve dates. On the other hand I think it would be handy to show the actual dates of the timetables but would also not be possible if using the bulk entry at the end. Should we go through and add "route=' to all bus route requests and get rid of the individual entries?Fleet Lists (talk) 05:24, 23 June 2020 (UTC)Reply
It looks like someone added route as a explicit parameter in the documentation here this edit without edit summary but it appears to be linked to the introduction of bus timetables into the template itself. No sure why the person did this, but I agree that having it with two syntaxes seems pretty confusion. I think we ought to standardise one way or the other (named or unnamed). It's probably easy enough to change over the uses of the template (one way or the other) using AWB (famous last words). Kerry (talk) 06:25, 23 June 2020 (UTC)Reply
It was added by the same editor on 18 May 2019 in [1] well after the introduction of bus timetables and he appears to be the only one who has used it in two or three locations including one article he is drafting as an update to an existing one. I would suggest the following
  • Redirect the route option to the general list of entries.
  • have individual entries for routes which have special conditions such as route 891 which is not Translink or where an accessdate or date is required. Others can be deleted at a later date.
  • Trap all other routes in a default using the general format which was added, at the end of the list as we have in some New South Wales templates which saves a lot of extra entries.

Pity this discussion started in my sandbox as I will want to use it for something else shortly.Fleet Lists (talk) 07:28, 23 June 2020 (UTC)Reply

Fleet Lists, User:Kerry Raymond, I have moved the discussion here. I have simplified the switch statement to leverage the common pattern (which also showed a few cut-and-paste errors with the wrong links). I have also added some tracking to show places where the more recently added |route= is being used vs. the older un-named parameter syntax. I have also added some tracking to find places where an unknown value is being passed. we should be able to make the two syntax formats equivalent. Frietjes (talk) 20:11, 23 June 2020 (UTC)Reply
okay, you can now use either syntax and get the same result. for routes which are not in the list, it falls back to the pattern used by most routes, but adds the page to a tracking category for checking. Frietjes (talk) 00:31, 24 June 2020 (UTC)Reply
@Frietjes and Kerry Raymond:That is fantastic - I have since split route 891 from the common group to its own entry as it links to Qconnect instead of TransLink. I will try to update the documentation later today. Also I think we will need to delete the access date from the common group as it seems somewhat stupid to show the same retrieve date for every route. Unless someone objects to that, I will delete that tomorrow. If an access date is required for a particular route a separate entry (or group entry if there is more than one - but I think that is most unlikely) would need to be created.Fleet Lists (talk) 01:46, 24 June 2020 (UTC)Reply
@Kerry Raymond:The documentation has now been updated. Please feel free to further improve it.Fleet Lists (talk) 04:00, 24 June 2020 (UTC)Reply
@Frietjes and Fleet Lists: Great work everyone! Proof of the benefits of collaboration! Kerry (talk) 07:42, 24 June 2020 (UTC)Reply