Welcome, Guest
Username: Password: Remember me

TOPIC: Where can I find the display code for survey links?

Where can I find the display code for survey links? 1 year 7 months ago #91733

Hi All,

my limesurvey installation is of the http variant. However, I use mod-rewrite in .htaccess to force https for the admin subdirectory.

Unfortunately, this has limesurvey display the client link to a survey with "https", too. Such a link is displayed on the overview page for a survey, for example (./admin/survey/sa/view/surveyid/).

Where is this link generated? I'd like to add a preg_replace() to the code but don't know where to find it. Can you help?

Best wishes,
Malte
Last Edit: 1 year 7 months ago by Sirblackadder.
The administrator has disabled public write access.

Aw: Where can I find the display code for survey links? 1 year 7 months ago #91836

Ok, solved it. The survey summary display code is in /application/views/admin/survey/surveySummary_view.php

There are two lines in the file where survey links are generated. Both go like
<?php $tmp_url = ...?>

To change https links into http links, you can insert the statements
if (strcasecmp(substr($tmp_url, 0, 8), "https://") == 0)
{
  $tmp_url = "http://" . substr($tmp_url, 8);
}

before the trailing "?>" of said two lines.


One could shorten this by using preg_replace() but I tend to avoid regexes whenever possible.
Last Edit: 1 year 7 months ago by Sirblackadder.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.193 seconds
Donation Image