- Posts: 40
- Thank you received: 6
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to get limesurvey base url? like http://example.com/limesurvey/
- vkuzmin
- Topic Author
- Offline
- Senior Member
Less
More
7 years 7 months ago - 7 years 7 months ago #141548
by vkuzmin
How to get limesurvey base url? like http://example.com/limesurvey/ was created by vkuzmin
I'm use "/limesurvey/" in links but its not so good. For example, when i want to show a link to start survey again i'l type
Is there any replacement for base url? To do something like {BASEURL}/index.php/survey/index/sid/{SID}/newest/Y/lang/en
Closest one i've found in replacements_helper.php is
Code:
<a href="/limesurvey/index.php/survey/index/sid/{SID}/newtest/Y/lang/en">Start again</a>
Closest one i've found in replacements_helper.php is
Code:
href="{SURVEYRESOURCESURL}../../../../"
Last edit: 7 years 7 months ago by vkuzmin.
The topic has been locked.
- socius
- Offline
- Premium Member
Less
More
- Posts: 103
- Thank you received: 5
6 years 4 months ago - 6 years 4 months ago #161399
by socius
Replied by socius on topic How to get limesurvey base url?
Hi all,
@vkuzmin, did you finally find a solution to this, i.e. a placeholder that returns the base url?
I would like to use the base url in a survey question (not in the mails). I use LS Version 2.6.4.
I just searched the documentation ( manual.limesurvey.org/URL_fields , manual.limesurvey.org/Email_templates , ) and the forum and did not find a solution.
{SURVEYRESOURCESURL} gives back the correct URL for .../upload/surveys/241618
{TEMPLATEURL} gives back the correct URL to the template, but
neither entering
{SURVEYURL} nor
@@SURVEYURL@@
in the question text gave back the link, just errors
Did I overlook anything?
Thanks a lot for any hint!
Best,
G
@vkuzmin, did you finally find a solution to this, i.e. a placeholder that returns the base url?
I would like to use the base url in a survey question (not in the mails). I use LS Version 2.6.4.
I just searched the documentation ( manual.limesurvey.org/URL_fields , manual.limesurvey.org/Email_templates , ) and the forum and did not find a solution.
{SURVEYRESOURCESURL} gives back the correct URL for .../upload/surveys/241618
{TEMPLATEURL} gives back the correct URL to the template, but
neither entering
{SURVEYURL} nor
@@SURVEYURL@@
in the question text gave back the link, just errors
Did I overlook anything?
Thanks a lot for any hint!
Best,
G
Attachments:
Last edit: 6 years 4 months ago by socius.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
6 years 4 months ago - 6 years 4 months ago #161434
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to get limesurvey base url?
You can try something like this (but I'm not sure whether it will return the absolute or relative path):
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 4 months ago by tpartner.
The following user(s) said Thank You: socius
The topic has been locked.
- socius
- Offline
- Premium Member
Less
More
- Posts: 103
- Thank you received: 5
6 years 4 months ago - 6 years 4 months ago #161597
by socius
Replied by socius on topic How to get limesurvey base url?
Thanks @tpartner! (and sorry for my late response!)
This works!
I have my webspace at my university, in the form
www.university.edu/mywebspace/lsinstallationdir
and in my case this code returns the relative path:
/mywebspace/lsinstallationdir
Thanks!
Best
G
This works!
I have my webspace at my university, in the form
www.university.edu/mywebspace/lsinstallationdir
and in my case this code returns the relative path:
/mywebspace/lsinstallationdir
Thanks!
Best
G
Last edit: 6 years 4 months ago by socius.
The topic has been locked.