- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How do I change the page requesting a token for authentication? (copied)
- eschneider
- Topic Author
- Offline
- New Member
Less
More
11 years 11 months ago #77979
by eschneider
How do I change the page requesting a token for authentication? (copied) was created by eschneider
I want to change how the authentication "page" works. The attached text appears to be the default. We would like to use another word other than "Token" and include an image and message that would assure the user it's us and safe to proceed. Where is that page? It does not appear to be the Welcome page but I'm new to Lime and can't say that for sure.
Thanks
I copied this from the Installation category once I saw where it went. Sorry for duplication. This was my first post - I'll know better next time.
Thanks
I copied this from the Installation category once I saw where it went. Sorry for duplication. This was my first post - I'll know better next time.
Attachments:
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
11 years 11 months ago #78001
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic How do I change the page requesting a token for authentication? (copied)
You can change the text by editing the translation file.
As for the layout, have a look at the template editor, there is a sub-file for the registration screen if I remember correctly.
As for the layout, have a look at the template editor, there is a sub-file for the registration screen if I remember correctly.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- eschneider
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
11 years 11 months ago #78049
by eschneider
Replied by eschneider on topic How do I change the page requesting a token for authentication? (copied)
Mazi,
Thanks for your reply. However I am not trying to translate the text on the page, I am trying to replace it so it matches an existing survey which combines their own English text with a field to supply the "Token" which is identified in a mail letter as the "Online Survey Identifier" and assures the recipient much like a privacy statement. I also looked at the register page and believe that the text I am trying to replace is not part of the register page. The "page" I am trying to locate has the following text -
This is a controlled survey. You need a valid token to participate.
If you have been issued a token, please enter it in the box below and click continue.
If translation is the only way to accomplish this I will look further into it. On the face of it translation does not seem appropriate.
Thanks for your reply. However I am not trying to translate the text on the page, I am trying to replace it so it matches an existing survey which combines their own English text with a field to supply the "Token" which is identified in a mail letter as the "Online Survey Identifier" and assures the recipient much like a privacy statement. I also looked at the register page and believe that the text I am trying to replace is not part of the register page. The "page" I am trying to locate has the following text -
This is a controlled survey. You need a valid token to participate.
If you have been issued a token, please enter it in the box below and click continue.
If translation is the only way to accomplish this I will look further into it. On the face of it translation does not seem appropriate.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 11 months ago #78077
by DenisChenu
You can do it in javascript, in template.js, you can do something like that:
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.
Replied by DenisChenu on topic How do I change the page requesting a token for authentication? (copied)
Hello,eschneider wrote: If translation is the only way to accomplish this I will look further into it. On the face of it translation does not seem appropriate.
You can do it in javascript, in template.js, you can do something like that:
Code:
$(document).ready(function(){ if (typeof tokenlabel === "undefined"){ tokenlabel ="YOUR TOKEN LABEL : "; } if (typeof tokentext === "undefined"){ tokentext ="YOUR TOKEN TEXT DESCRIPTION"; } if (typeof tokenerror === "undefined"){ tokenerror ="<br><br><strong class='error'>YOUR ERROR MESSAGE.</strong>"; } if ($("#tokenform").length ) { $("#tokenmessage").html(tokentext); $("label[for='token']").text(tokenlabel); } else { $("#tokenmessage").html(tokentext+tokenerror); } });
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.
- eschneider
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
11 years 11 months ago #78134
by eschneider
Replied by eschneider on topic How do I change the page requesting a token for authentication? (copied)
Denis,
Your reply was very helpful and addresses several of the issues we expected we would have to deal with to fully handle the token field.
What we also want to do is replace the text on the page in general. By experimenting we've been able to modify the text on the "Register" page but the page I'm calling the "authentication" page is not impacted by those modifications. That leads us to believe it is another page/place we would need to modify. Can you point us to it as we have been unable to find it?
Thanks
Your reply was very helpful and addresses several of the issues we expected we would have to deal with to fully handle the token field.
What we also want to do is replace the text on the page in general. By experimenting we've been able to modify the text on the "Register" page but the page I'm calling the "authentication" page is not impacted by those modifications. That leads us to believe it is another page/place we would need to modify. Can you point us to it as we have been unable to find it?
Thanks
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 11 months ago #78230
by DenisChenu
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.
Replied by DenisChenu on topic How do I change the page requesting a token for authentication? (copied)
Hello,
I don't have a look at register HTML,
But something like
But this page is awful :ohmy: , look for some otimisation on 2.0
I don't have a look at register HTML,
But something like
Code:
$('.register-message-1').html('The first line, bold in default template'); $('.register-message-2').html('The second line, use <br /> for line feed'); $('table.register td:nth-child(1)'.html('firstname replace'); $('table.register td:nth-child(3)'.html('survame replace'); $('table.register td:nth-child(5)'.html('mail adress replace');
But this page is awful :ohmy: , look for some otimisation on 2.0
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.
- eschneider
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
11 years 11 months ago #78261
by eschneider
Replied by eschneider on topic How do I change the page requesting a token for authentication? (copied)
Denis,
I agree the register page is awful. Unfortunately it appears even before the Welcome page and thus its awfulness can depress survey response just at the point when a respondent is deciding whether they really do want to respond.
The main thing we would like to do is change the verbiage on the entire page, not just the label(s) for the token. If I could force the Welcome page to appear before the register page I would not need to change very much on the register page. Failing that I would like to change the text on the register page which would make the Welcome page unnecessary. I hope that makes what are trying to do clearer.
Thanks
Ed
I agree the register page is awful. Unfortunately it appears even before the Welcome page and thus its awfulness can depress survey response just at the point when a respondent is deciding whether they really do want to respond.
The main thing we would like to do is change the verbiage on the entire page, not just the label(s) for the token. If I could force the Welcome page to appear before the register page I would not need to change very much on the register page. Failing that I would like to change the text on the register page which would make the Welcome page unnecessary. I hope that makes what are trying to do clearer.
Thanks
Ed
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1223
- Thank you received: 351
11 years 11 months ago #78265
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic How do I change the page requesting a token for authentication? (copied)
In the source of the original register page tou can copy the code corresponding to the register form
e.g:
Remember that you can copy, rename and adapt the register.php file in case of needed to get a custom filte to work on it:
Ben/
e.g:
and embed it in any basic html webpage...<form method='post' action=' yourplatform.com/register.php '>
<table class='register' summary='Registrationform'>
<tr>
<td align='right'><input type='hidden' name='sid' value='1234' id='sid' /></td>
<!-- 1234 = your survey ID -->
<td align='left'><input class='text' type='hidden' name='register_firstname' value=' ' /></td>
</tr>
<tr>
<td align='left'><input class='text' type='hidden' name='register_lastname' value=' '/></td>
</tr>....
Remember that you can copy, rename and adapt the register.php file in case of needed to get a custom filte to work on it:
<form method='post' action=' yourplatform.com/register_custom.php '>
Ben/
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- eschneider
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
11 years 11 months ago #78266
by eschneider
Replied by eschneider on topic How do I change the page requesting a token for authentication? (copied)
Benitov,
Your solution appears to focus on the register page. What I'm actually trying to modify does not seem to be the register page as far as we can tell. I've called it the "authentication" page to try and distinguish it from the register page. The source which this "page" appears to generate is copied following. What generates this and how/where can I alter it (the text parts)? Thanks
<div id="wrapper"><p id="tokenmessage">This is a controlled survey. You need a valid token to participate.<br />If you have been issued a token, please enter it in the box below and click continue.</p>
<script type='text/javascript'>var focus_element='#token';</script>
<form id='tokenform' method='get' action=' npope-1718.altarum.pri/limesurvey/index.php '>
<ul>
<li>
<label for='token'>Token</label><input class='text ' id='token' type='text' name='token' /><input type='hidden' name='sid' value='91157' id='sid' />
<input type='hidden' name='lang' value='en' id='lang' /> <input type='hidden' name='newtest' value='Y' id='newtest' /></li><li>
<input class='submit' type='submit' value='Continue' />
</li>
</ul>
</form></div> </td>
</tr>
</table>
</div>
Your solution appears to focus on the register page. What I'm actually trying to modify does not seem to be the register page as far as we can tell. I've called it the "authentication" page to try and distinguish it from the register page. The source which this "page" appears to generate is copied following. What generates this and how/where can I alter it (the text parts)? Thanks
<div id="wrapper"><p id="tokenmessage">This is a controlled survey. You need a valid token to participate.<br />If you have been issued a token, please enter it in the box below and click continue.</p>
<script type='text/javascript'>var focus_element='#token';</script>
<form id='tokenform' method='get' action=' npope-1718.altarum.pri/limesurvey/index.php '>
<ul>
<li>
<label for='token'>Token</label><input class='text ' id='token' type='text' name='token' /><input type='hidden' name='sid' value='91157' id='sid' />
<input type='hidden' name='lang' value='en' id='lang' /> <input type='hidden' name='newtest' value='Y' id='newtest' /></li><li>
<input class='submit' type='submit' value='Continue' />
</li>
</ul>
</form></div> </td>
</tr>
</table>
</div>
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 11 months ago #78279
by DenisChenu
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.
Replied by DenisChenu on topic How do I change the page requesting a token for authentication? (copied)
You can do "what you want" with accessing the core source code.
Look at index.php
Denis
Look at index.php
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.
- NetMarie
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
10 years 5 months ago #100442
by NetMarie
Replied by NetMarie on topic How do I change the page requesting a token for authentication? (copied)
I have the same question as user eschneider.
Unfortunately I do not fully understand the suggestions that have already been made.
@eschneider: Are you still reading here? How did you solve your problem?
@everyone: How can I change the text that is shown on the same page as the token-insert field?
@DenisChenu: Where can I find index.php?
Thank you very much in advance!
Unfortunately I do not fully understand the suggestions that have already been made.
@eschneider: Are you still reading here? How did you solve your problem?
@everyone: How can I change the text that is shown on the same page as the token-insert field?
@DenisChenu: Where can I find index.php?
Thank you very much in advance!
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
10 years 5 months ago #100460
by DenisChenu
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.
Replied by DenisChenu on topic How do I change the page requesting a token for authentication? (copied)
Hi,
Updating PHP file need PHP "competence". And actually it's application/controllers/RegisterController.php
Updating PHP file need PHP "competence". And actually it's application/controllers/RegisterController.php
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.