Welcome to the LimeSurvey Community Forum

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

require_once files in LS 2.05

More
8 years 7 months ago #123265 by itcom
require_once files in LS 2.05 was created by itcom
In previous version of LimeSurvey (1.92), I used to pull answers to html, by calling those LS files in php file:
require_once(dirname(__FILE__).'/../classes/core/startup.php');
require_once(dirname(__FILE__).'/../config-defaults.php');
require_once(dirname(__FILE__).'/../common.php');
require_once(dirname(__FILE__).'/../classes/core/language.php');

Since updated to LS 2.05, I had trouble to find which files i need to call in order to make it work again.
The only thing i have found is:
require_once(dirname(__FILE__).'/../application/config/config-defaults.php');

Any thoughts?

Thanks
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #123272 by DenisChenu
Replied by DenisChenu on topic require_once files in LS 2.05
I don't understand what you need to do.

But in 2.05 : you can surely use manual.limesurvey.org/NewDirectRequest

Denis

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.
More
8 years 7 months ago #123275 by itcom
Replied by itcom on topic require_once files in LS 2.05
Hi Denis,
Let me try to rephrase it.
I'm using my own php file to take data from LS, generate a simple html table with costume calculations (nps, average, etc).
I'm using it for a while and it working really good. The files that used to connect me to the database in version LS 1.92 were:
require_once(dirname(__FILE__).'/../classes/core/startup.php');
require_once(dirname(__FILE__).'/../config-defaults.php');
require_once(dirname(__FILE__).'/../common.php');
require_once(dirname(__FILE__).'/../classes/core/language.php');

As i understood, there is a different way to fetch data from survey in LS 2.05.
My question is what files i need to call in LS 2.05? And how should i do it?

Hope i made myself clear and i will kindly wait for your advise,

Thanks
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #123276 by DenisChenu
Replied by DenisChenu on topic require_once files in LS 2.05
1 to 2 : completely different system.

Best solution seems to use a plugin with newDirectRequest event.

Denis

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.
More
8 years 5 months ago #127438 by bbacke
Replied by bbacke on topic require_once files in LS 2.05
Hi DenisChenu,

I seem to have stumbled upon the same problem.
I try to get 'newtoken.php' working(see bugs.limesurvey.org/view.php?id=2982#bugnotes )
It uses just the require_once commands itcom is mentioning.

I am new to LineSurvey and unfortunately quite new to php as well.
Could you give me an example please, on how to access for example the sanitize function in line 30?

Thank you.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose