I have installed and reinstalled Mobimap, Mobiview, MobiRate and MobiShare. There are two problems with my site. The first is that distances between articles are only shown on the 'Category List' page called 'Towns and Cities'. The distances are not shown in the Component Map called 'Map', or the list of other articles in the article view itself.
Also, the User Opinions form does not display within an article.
I must be missing something obvious, but have spent a long time trying to find the problem before shouting for help.
My setup is as follows : Joomla 2.5.1, Mobimaps 2.0.7, Mobirate 2.1.2, Mobishare 2.0.0, Mobiview 2.0.1, Mobiforms 2.0.2.
Thank you for any help you can offer!
Gavin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I could really use some help on this. Does anyone have any ideas why the distances show when articles are displayed in a Category List, but not in any other views, including the Mobimap componenet view?
Many thanks,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If true, the distances are calculated. If false they are not. I have changed the statement as follows :
if($lng >= 0 && $lat >= 0 || $haveUserPos) {
Now, the distances are shown when a user sets their location. The distances are hidden when no location is set. Everything appears to work as I would expect.
1. Can anyone tell me what I might be breaking by making this change?
2. Under what circumstances are location.base.long and location.base.lat set so that the original if statement returns true without my modification?
3. How are location.center.long and location.center.lat set and used?
Thanks to anyone who can offer help!
Gavin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
Please help!
I have installed and reinstalled Mobimap, Mobiview, MobiRate and MobiShare. There are two problems with my site. The first is that distances between articles are only shown on the 'Category List' page called 'Towns and Cities'. The distances are not shown in the Component Map called 'Map', or the list of other articles in the article view itself.
Also, the User Opinions form does not display within an article.
I must be missing something obvious, but have spent a long time trying to find the problem before shouting for help.
My setup is as follows : Joomla 2.5.1, Mobimaps 2.0.7, Mobirate 2.1.2, Mobishare 2.0.0, Mobiview 2.0.1, Mobiforms 2.0.2.
Thank you for any help you can offer!
Gavin.
…. and the website is http://highlandviews.com!
Thanks,
Hi everyone,
I could really use some help on this. Does anyone have any ideas why the distances show when articles are displayed in a Category List, but not in any other views, including the Mobimap componenet view?
Many thanks,
Hi again,
I am closer to understanding this distance problem now, but still confused.
In com_mobimaps/models/mobimap.php, there is a function defined called getListQuery(). The following variables are declared at line 230 :
$lng = $this->getState('location.base.long');
$lat = $this->getState('location.base.lat');
$lng_user = $this->getState('location.user.long');
$lat_user = $this->getState('location.user.lat');
$haveUserPos=(!empty($lng_user) && !empty($lat_user));
$lng_ctr = $this->getState('location.center.long');
$lat_ctr = $this->getState('location.center.lat');
Then at line 240, the following if statement :
if($lng >= 0 && $lat >= 0) {
If true, the distances are calculated. If false they are not. I have changed the statement as follows :
if($lng >= 0 && $lat >= 0 || $haveUserPos) {
Now, the distances are shown when a user sets their location. The distances are hidden when no location is set. Everything appears to work as I would expect.
1. Can anyone tell me what I might be breaking by making this change?
2. Under what circumstances are location.base.long and location.base.lat set so that the original if statement returns true without my modification?
3. How are location.center.long and location.center.lat set and used?
Thanks to anyone who can offer help!
Gavin.