wakabayashi Posted June 10, 2017 Share Posted June 10, 2017 Hello Is it true, that we have two differnt variables for base dir? {$basedir} and {basedir_ssl}? Isn't that problematic? If I want to use it in my theme, I don't know which I should chose. On some I may have ssl on some not... Shouldn't we just have one and check in php, if ssl is activated? Link to comment Share on other sites More sharing options...
0 Havouza Posted June 10, 2017 Share Posted June 10, 2017 But when you set shop url you set the same to both with and without ssl. Or you mean something else? Link to comment Share on other sites More sharing options...
0 wakabayashi Posted June 10, 2017 Author Share Posted June 10, 2017 This variable is can be used in tpl files and it gives back the full url of the tb installation. From my opinion it makes no sense to have two. But I could be wrong... Link to comment Share on other sites More sharing options...
0 Traumflug Posted June 10, 2017 Share Posted June 10, 2017 Many examples on how to solve this in the default template. For example in 404.tpl: html <a href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Home'}">← {l s='Home page'}</a> Link to comment Share on other sites More sharing options...
0 wakabayashi Posted June 10, 2017 Author Share Posted June 10, 2017 Oh yeah this does the job. But still from a technical point of view: Is it needed like that? Can't we add this if else in the php method? Link to comment Share on other sites More sharing options...
0 Traumflug Posted June 10, 2017 Share Posted June 10, 2017 Is it needed like that? One of them starts with http://, the other one with https://. There might be usecases like a link "switch to SSL" or a redirection page automatically redirecting to the SSL-version. Or redirecting to non-SSL for picture links. Such stuff. Even if they make not much sense today, they might have had value a few years back. Link to comment Share on other sites More sharing options...
Question
wakabayashi
Hello
Is it true, that we have two differnt variables for base dir? {$basedir} and {basedir_ssl}?
Isn't that problematic? If I want to use it in my theme, I don't know which I should chose. On some I may have ssl on some not...
Shouldn't we just have one and check in php, if ssl is activated?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now