Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

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

Where can I find the display code for survey links? 1 Jahr 6 Monate her #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
Letzte Änderung: 1 Jahr 6 Monate her von Sirblackadder.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Aw: Where can I find the display code for survey links? 1 Jahr 5 Monate her #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.
Letzte Änderung: 1 Jahr 5 Monate her von Sirblackadder.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.230 Sekunden
Donation Image