Feature Request Change urls to use ID numbers instead of title

Discussion in 'Suggestions & Bug Reports' started by jacobpaige, Jan 11, 2017.

  1. jacobpaige

    jacobpaige Well-Known Member

    Joined:
    Dec 22, 2015
    Messages:
    10,104
    Likes Received:
    3,732
    Reading List:
    Link
    This is mainly to deal with series that either have the same name as another series or whose "official" name changes (ATTE -> AWE for example). In the first case, it prevents people from being directed to the wrong series, in the second case, it prevents dead links. I assume that there would also be other benefits from a back-end perspective, but not really sure.

    The biggest downside I can see for this is that the site would need to receive and interpret both types of urls for any currently existing series, but something like that should only take about 2-4 lines of code.
     
  2. Sosseres

    Sosseres Well-Known Member

    Joined:
    Dec 30, 2015
    Messages:
    988
    Likes Received:
    284
    Reading List:
    Link
    You would also need some sort of translation table for those codes to look things up in if you want to keep the old and new at the same time. (Maybe just a column to check in the new series table.)

    Another downside to having numbers is that it can be a tad harder to know where you end up with a link to the site. A number or name is a big difference at the end. I personally don't care either way though.
     
  3. jacobpaige

    jacobpaige Well-Known Member

    Joined:
    Dec 22, 2015
    Messages:
    10,104
    Likes Received:
    3,732
    Reading List:
    Link
    Assuming that it's stored in SQL or something similar, that table already exists. The new urls would simply refer to a different part of it.
     
  4. Ral

    Ral Not a Well-Known Member ¯\_(ツ)_/¯

    Joined:
    Dec 5, 2016
    Messages:
    1,214
    Likes Received:
    923
    Reading List:
    Link
    So you want to change:
    novelupdates[dot]com/series/i-shall-seal-the-heavens/
    Into just:
    novelupdates[dot]com/series/15/ ?

    That wouldn't be very user friendly...

    If anything, it should rather change to the "domain/series/id/title" format instead.

    So we'd have:
    novelupdates[dot]com/series/15/i-shall-seal-the-heavens/

    And to make title changes irrelevant, the "title" part should be adjustable on connect.
    What I mean is that whatever was written after the "id" wouldn't matter. Be it either:
    novelupdates[dot]com/series/15/
    novelupdates[dot]com/series/15/issth

    or novelupdates[dot]com/series/15/whatever
    It would still "redirect" to:
    novelupdates[dot]com/series/15/i-shall-seal-the-heavens/

    If you're worried about causing additional strain on the server, then I guess you could omit checking the "title" on connect. But the links should still work without the title at the end. This way anybody that comes across a "dead" link in the future would be able to just remove the title part of the link to reach their destination.

    The minimal post count needed for posting links is really a drag :p
     
    Last edited: Jan 11, 2017
    jacobpaige and noisypixy like this.
  5. Tony

    Tony Well-Known Member Staff Member

    Joined:
    Oct 20, 2015
    Messages:
    5,021
    Likes Received:
    44,797
    Reading List:
    Link
    It already uses ID instead of the title:

    http://www.novelupdates.com/?p=5844 (real url)
    http://www.novelupdates.com/series/a-thought-through-eternity/ (old url)
    http://www.novelupdates.com/series/a-will-eternal/ (new renamed url)

    Even if I rename the title, it'll get redirected to the same page. If a novel ever has the same name, I'll add the author's name to it. I think it's only happened once so far.
     
    AliceShiki likes this.
  6. jacobpaige

    jacobpaige Well-Known Member

    Joined:
    Dec 22, 2015
    Messages:
    10,104
    Likes Received:
    3,732
    Reading List:
    Link
    http://www.novelupdates.com/series/space-speedstar-hen leads to a 404, even though its a listed alternate title for http://www.novelupdates.com/series/space-speed-xing-hen/ so I just assumed that wasn't the case. I suppose this would be better in the Bug category then?
     
  7. Tony

    Tony Well-Known Member Staff Member

    Joined:
    Oct 20, 2015
    Messages:
    5,021
    Likes Received:
    44,797
    Reading List:
    Link
  8. jacobpaige

    jacobpaige Well-Known Member

    Joined:
    Dec 22, 2015
    Messages:
    10,104
    Likes Received:
    3,732
    Reading List:
    Link
  9. Tony

    Tony Well-Known Member Staff Member

    Joined:
    Oct 20, 2015
    Messages:
    5,021
    Likes Received:
    44,797
    Reading List:
    Link
    Nope, it doesn't work that way. It's using the ID (not the name). Those two have different IDs

    I can rename http://www.novelupdates.com/series/space-speed-xing-hen/ to whatever I want and It'll redirect to the new name though
     
  10. jacobpaige

    jacobpaige Well-Known Member

    Joined:
    Dec 22, 2015
    Messages:
    10,104
    Likes Received:
    3,732
    Reading List:
    Link
    So how does it distinguish between A Thought Through Eternity and A Will Eternal if its not referencing the alternate name list? Do you just keep a separate list of the past 'official' names or something?