Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Changing survey admin email address in error message

  • operatorone
  • operatorone's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 8 months ago #217754 by operatorone
Hi there,
I try to place another email address in the file "application/controllers/survey/index.php" so that the displayed email in the error message will not be the admin email address, but the bounce email address or an address from a new field. I found the location of the code, but can I insert the bounce email address here? Is there any way to achieve this?

Code:
//CHECK FOR PREVIOUSLY COMPLETED COOKIE
//If cookies are being used, and this survey has been completed, a cookie called "PHPSID[sid]STATUS" will exist (ie: SID6STATUS) and will have a value of "COMPLETE"
$sCookieName="LS_".$surveyid."_STATUS";
if (isset($_COOKIE[$sCookieName]) && $_COOKIE[$sCookieName] == "COMPLETE" && $thissurvey['usecookie'] == "Y" && $tokensexist != 1 && (!isset($param['newtest']) || $param['newtest'] != "Y"))
{
$redata = compact(array_keys(get_defined_vars()));
$asMessage = array(
gT("Error"),
gT("You have already completed this survey."),
sprintf(gT("Please contact %s ( %s ) for further assistance."),$thissurvey['adminname'],$thissurvey['adminemail'])
);
$this->_niceExit($redata, __LINE__, $thissurvey['templatedir'], $asMessage);
}
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 8 months ago - 2 years 8 months ago #217824 by DenisChenu
In 3.X and up
Better to extend theme and update twig file
github.com/LimeSurvey/LimeSurvey/blob/69...yout_errors.twig#L73

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 2 years 8 months ago by DenisChenu.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 8 months ago #217846 by holch
I don't understand why this is still a fixed thing anyway. This should be just an editable page in the admin and anyone could post on this page whatever they want.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • operatorone
  • operatorone's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 8 months ago #217848 by operatorone
Yeah, you're right. I don't understand it either.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 8 months ago #217853 by DenisChenu

I don't understand why this is still a fixed thing anyway. This should be just an editable page in the admin and anyone could post on this page whatever they want.
 
LimeSurvey is already too complex …
Count all page like this with all string …

By theme is a great solution .

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 8 months ago #217864 by holch
I don't see what is more complex in a text box for this page, rather the current approach where this just is fixed text drawing from the admin email field, but OK.

By theme is a great solution .


How do you cover the different languages?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 8 months ago #217873 by DenisChenu

I don't see what is more complex in a text box for this page, rather the current approach where this just is fixed text drawing from the admin email field, but OK.
Count all the existing text to allow update. And add it somewhere in GUI …

How do you cover the different languages?
[/quote]I already ask for a locale directory by theme.

But : big majority of my client use only one language. Some exception with 2 or 3 language, rarely more.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • operatorone
  • operatorone's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 8 months ago #217950 by operatorone
Thanks for your suggestions. I have to update to do the workaround with the template.
Just because I'm interested in. Isn't there any possibility to use the bounce email address?
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 8 months ago #217951 by DenisChenu

Just because I'm interested in. Isn't there any possibility to use the bounce email address?
 
Unsure we have it , you can tryinside theme (+ debug mode if i don't make errorr)

{{ dump(aSurveyInfo) }} : it give you all var in this array.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • operatorone
  • operatorone's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 8 months ago #217953 by operatorone
Thanks for the tip. I'll try it.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose