Change trailing slash in Cards Path

  1. 4 years ago

    Quick question. My host path is different from most host paths. Where as most are like blah/blah/blah etc, mine is like blah\blah\blah. The trailing slash that is automatically entered at the end therefore goes the opposite way, so I'm not able to pull cards from the TCGs. What do I need to edit to change the direction of the trailing slash?

  2. mamori

    20 Mar 2015 Moderator 0

    Did you try 'Cards Path' under 'TCG Settings'? Just make sure the last slash is included so the forward slash won't automatically be added for you. For example, in my 'Cards Path', the end bit looks like

  3. Edited 4 years ago by Dite

    I did some testing, and it looks like it might not work-- the code used is:if ( substr($cardspath, -1) != '/' ) { $cardspath = "$cardspath/"; }
    It's line 36 of manage.php. Removing it would be the easiest thing, but to be safe, I'd probably just change it to:

    if ( substr($cardspath, -1) != '/' && substr($cardspath, -1)!='\\') { $cardspath = "$cardspath/"; }

    But, in PHP \ is usually used as an escape. I'm not sure if you'll run into any issues, but if you do, you may need to add double backslashes to the Cards Path entry as well (ex: ...\\champion\\cards\\)

or Sign Up to reply!