Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Hide the Limesurvey index page when no survey specified

Hide the Limesurvey index page when no survey specified 4 years 3 months ago #79087

  • Fred
  • Fred's Avatar
  • Offline
  • Expert Lime
  • Posts: 147
  • Thank you received: 5
  • Karma: 3
Hi, I have a new user who doesn't want to see the Limesurvey index.php when there are no active surveys. This is a new one for me. How would I make Limesurvey redirect to a different page (e.g., customer's home page) when there is no survey id in the URL? Hopefully without editing the core files.
The administrator has disabled public write access.

Hide the Limesurvey index page when no survey specified 4 years 3 months ago #79094

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1798
  • Thank you received: 440
  • Karma: 110
Hi,
in the template used by your installlation as default template (the most of the time="default" template) set a redirect into surveylist.psptl file (using <meta refresh> or javascript redirect as you want)
Ben/
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Hide the Limesurvey index page when no survey specified 4 years 3 months ago #79102

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5974
  • Thank you received: 366
  • Karma: 260
Ben, this won't work because it will always redirect the user even if there are active surveys.

It should be possible to add an Ajax call at the related template page. That way you could call a script that checks for active surveys and if there are none, you can redirect the user right away.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: Ben_V

Hide the Limesurvey index page when no survey specified 4 years 3 months ago #79130

  • Fred
  • Fred's Avatar
  • Offline
  • Expert Lime
  • Posts: 147
  • Thank you received: 5
  • Karma: 3
Thanks Mazi and Ben. Actually in my case I think the redirect on survey list will be ok for this situation because all participants will be coming in via links to a survey and will never see the survey list. But this probably wouldn't work for everyone.
The administrator has disabled public write access.

Hide the Limesurvey index page when no survey specified 1 year 2 weeks ago #122721

  • samirfor
  • samirfor's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 4
  • Thank you received: 1
  • Karma: 0
Thanks. This is what I need.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.489 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form