Welcome to the LimeSurvey Community Forum

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

clickable image that stores all mouse clicks

  • heeringa
  • heeringa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago #233084 by heeringa
I found a perfect implementation of a clickable image at:
forums.limesurvey.org/forum/can-i-do-thi...-heatmap-integration

provided by tPartner.

However, I would like to keep the coordinates of all mouse clicks. How can this be achieved? What should be changed in the code?
I am using LimeSurvey version 
[url=https://localhost/index.php/admin/index#modalSystemInformation]3.28.2+220308[/url].
 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #233086 by tpartner
Replied by tpartner on topic clickable image that stores all mouse clicks
Modify the code in this question theme - github.com/tpartner/LimeSurvey-Image-Interest-Points-3x

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: heeringa

Please Log in to join the conversation.

  • heeringa
  • heeringa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago - 2 years 1 month ago #233516 by heeringa
Replied by heeringa on topic clickable image that stores all mouse clicks
I am currently using a modified version of the JavaScript code earlier provided by tPartner. See the file attached. It works well, except  that the coordinates that are obtained differ per device (desktop, smartphone) and screen shape/size. Is there a way to get a kind of absolute coordinates that are not affected by the device or screen shape/size?

 

File Attachment:

File Name: limesurvey..._map.lss
File Size:17 KB
Last edit: 2 years 1 month ago by heeringa. Reason: something went wrong with the positioning of the attachment

Please Log in to join the conversation.

  • heeringa
  • heeringa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago #233572 by heeringa
Replied by heeringa on topic clickable image that stores all mouse clicks
This is wonderful.
I am using LimeSurvey Community Edition Versie 3.28.36+221102 on Xubuntu 20.04.
I copied the \interestPoints folder to /var/www/html/limesurvey/themes/question.
I created a multiple-short-text question.
Under Question theme I can choose from 'Standard' and 'inputondemand'.
But alas, 'interestPoints' does not show up there.
Do I need to do anything special in order to get 'interestPoint' to become available?

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago - 2 years 1 month ago #233574 by Joffm
Hm,
shouldn't it be in upload/themes/question?
 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 1 month ago by Joffm.

Please Log in to join the conversation.

  • heeringa
  • heeringa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago #233575 by heeringa
Replied by heeringa on topic clickable image that stores all mouse clicks
There is no folder 'question' in: /var/www/html/limesurvey/upload/themes.
So I created the folder myself and copied the folder interestPoints/ in it.
But the theme is still not found by LimeSurvey.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #233588 by tpartner
Replied by tpartner on topic clickable image that stores all mouse clicks
Can you give a screenshot of the complete directory path to the config.xml file in interestPoints.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • heeringa
  • heeringa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago - 2 years 1 month ago #233590 by heeringa
Replied by heeringa on topic clickable image that stores all mouse clicks
The complete path is:
/var/www/html/limesurvey/themes/question/interestPoints

When figuring this out I found that the folder interestPoints and its subfolders were not readable. I changed this with 'sudo chmod a+r+x ...', and subsequently 'Interest Points' showed up in LimeSurvey. Your task brought me on the right track, thanks!
Last edit: 2 years 1 month ago by heeringa.

Please Log in to join the conversation.

  • heeringa
  • heeringa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago #233593 by heeringa
Replied by heeringa on topic clickable image that stores all mouse clicks
How can I set "AJAX mode" to "No"?
In the survey I went to the theme options, then in the right screen I choose 'simple options' and choose 'no' at 'inherit everything'. Then you get a lot more options, but there is no option for 'AJAX mode'. I could also not find that option under 'advanced options'.
 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #233594 by tpartner
Replied by tpartner on topic clickable image that stores all mouse clicks
In later 3.x versions, this is not necessary, AJAX mode was removed.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: heeringa

Please Log in to join the conversation.

  • heeringa
  • heeringa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago - 2 years 1 month ago #233600 by heeringa
Replied by heeringa on topic clickable image that stores all mouse clicks
I added three subquestions for sign, coordinates and comment. It looks like in the attached screenshot, for each of them is an input field.
If I click on the map, nothing happens. Do I have to do anything special in addition?
 
Attachments:
Last edit: 2 years 1 month ago by heeringa.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #233605 by tpartner
Replied by tpartner on topic clickable image that stores all mouse clicks
Look for JavaScript errors in the console.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose