Support

  1. winsston
  2. Support
  3. Saturday, April 13 2019, 11:26 PM
Hello!

Is it somehow possible to set 3 different colors for PINS on the map, depending on the user group, or field (Type:select) chosen during the registration?

Thanks!
Accepted Answer
admin Accepted Answer
Admin
Hi,
sorry for late reply, it was a weekend.

This is not supported natively but it is possible with Joomla Template override feature:
- Copy file from /modules/mod_jsnmap/tmpl/default.php in folder /templates/your-theme-folder/html/mod_jsnmap/default.php (Read Note 2 below)
- Open the new new file anche change at line 117 this code (Read Note 3 below):
url: '<?php echo JURI::root(true).'/'.$user->getValue('avatar_mini'); ?>',
with something like this
url: '<?php 
if( $user->getValue('alias_of_select_field') == 'option1' ) echo 'http://domain.com/url_of_the_first_image';
if( $user->getValue('alias_of_select_field') == 'option2' ) echo 'http://domain.com/url_of_the_second_image';
if( $user->getValue('alias_of_select_field') == 'option3' ) echo 'http://domain.com/url_of_the_third_image';
?>',


NOTE 1: this code is not tested and not supported, it is only for example purpose.
NOTE 2: you can use another name instead "default.php", for example "custom.php", in the module options you can choose the layout to use (see image 1)
NOTE 3: this code will change the image from avatar to something else based on the value of your select field, so to work you should set the module to show "Avatar" in "User Icon" setting.
Attachments (1)
  1. more than a month ago
  2. Support
  3. # Permalink
winsston Accepted Answer
Pro
Marvelous! 10 000 thanks!
  1. more than a month ago
  2. Support
  3. # 1
admin Accepted Answer
Admin
Hi,
in file /templates/your-theme-folder/html/mod_jsnmap/default.php at line 178 (Read Note Below) remove following CSS code
#markerLayer<?php echo $module->id; ?> img {
border: 2px solid <?php echo ($mapstyle=='dark' ? '#555' : 'white'); ?> !important;
border-radius: 4px;
}


NOTE: 178 is the line of the original file, probably in your file it will be something like line 183 due to your previous added code.
  1. more than a month ago
  2. Support
  3. # 2
winsston Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Support
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.