frab / frab

conference management system
https://frab.github.io/frab/
Other
715 stars 151 forks source link

Add frab base_url to schedule.xml/json header #338

Closed saerdnaer closed 7 years ago

saerdnaer commented 7 years ago

If one wants to resolve the file attachments referenced inside a schedule xml one has to prefix the path with an hostname/base-url.

For example:

<attachment href="/system/event_attachments/attachments/000/003/131/original/talk_33c3_netzpolitik.pdf?1482965202">Sldies</attachment>

one needs to add https://frab.cccv.de/ to get the full URL https://frab.cccv.de/system/event_attachments/attachments/000/003/131/original/talk_33c3_netzpolitik.pdf

I propose a new child element named base_url directly below the root node:

<schedule>
  <version>1.3</version>
  <base_url>https://frab.cccv.de/</base_url>
  <conference>
    <acronym>33c3</acronym>
    <title>33. Chaos Communication Congress</title>
    <start>2016-12-27</start>
    <end>2016-12-30</end>
    <days>4</days>
    <timeslot_duration>00:15</timeslot_duration>
  </conference>
…
{
"schedule": {
  "version": "1.3",
  "base_url": "https://frab.cccv.de/",
  "conference": {
    "acronym": "33c3",
    "title": "33. Chaos Communication Congress",
    "start": "2016-12-27",
    "end": "2016-12-30",
    "daysCount": 4,
    "timeslot_duration": "00:15",
manno commented 7 years ago

Indeed, do you think the base url should be there, or should we just prepend the base url to all the links? I think with the QR Code in the public schedule the base_url is already mandatory.

saerdnaer commented 7 years ago

We also could do both. But when we change from a (server) relative URL an absolute URL, the current consumers of this data have to be modified. By just adding an additional header field we stay backwards compatible.

There are also other use cases for a base_url, e.g. generation of URLs to the event/speaker pages or images. And there are similar caes with the event logo, c.f. https://c3voc.de/wiki/schedule#full_example

manno commented 7 years ago

Quick note: