By HMED on Thursday, 05 May 2016
Posted in General
Likes 0
Views 553
Votes 0
Hello,

We are using this module to help members finding others around them, many of them dont know that they must add a distance in addition with location, first time they get a blank list.

I think that will be great to add a default distance (10 km) and give people some search results instead of actual blank list.

Is it possible to add some lines of code and add a distance ?
Thanks for sharing Sabih

hey Jan, you can modify on this file -> JoomlaFolder\modules\mod_easysocial_dating_search\tmpl\default.php

// Line 113
value="<?php echo (isset($modUserData[$field->element]['distance'])) ? $modUserData[$field->element]['distance'] : ''?>"

// Replace with
value="<?php echo (isset($modUserData[$field->element]['distance'])) ? $modUserData[$field->element]['distance'] : '10'?>"



Or you can override this language string from your Joomla language override section to translate to "Please enter distance value e.g. 10".
MOD_EASYSOCIAL_DATING_SEARCH_DISTANCE_ENTER_VALUE="Enter distance"


Hope this help.
·
Friday, 06 May 2016 13:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Not so sure about how I did this but I try to remember. You can make a search when logged in as admin and make it a global filter. It appears at the extended search in the left bar. Therefor you can make several 'filters' like "10 miles", "20 miles" and so on. With the help of custom url menu items, you can even make menu items for each filter.
·
Friday, 06 May 2016 01:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Arlex, i used the first solution (code replace)
it would be really great if you add an option in the module to specify a default distance.

that help to avoid replacing again in future updates

thanks again
·
Friday, 06 May 2016 18:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks, we'll consider this.
·
Friday, 06 May 2016 18:45
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post