Advertisement:

Author Topic: India Theme : Still the Problem Not Resolved - Unable to Assign Region - Solved  (Read 1974 times)

Lokesh K S

  • Newbie
  • *
  • Posts: 9
The India Theme has a problem which is not rectified since an year...  :-[

There is an area representing the Region "Pondicherry" on the India Map.
The "Assign Region" dialogue is not appearing when we click this particular region on the MAP..

All other areas on the Map can be assigned to their respective regions except the Area corresponding to Pondicherry ...

The image showing the region can be viewed at http://forums.osclass.org/general-help/indian-theme-problem/msg48663/#msg48663

This problem is not rectified even after one year...

Please Check the previous Reporting listed Here:

1. Dated: October 2012.
http://forums.osclass.org/general-help/indian-theme-problem/msg36961/#msg36961

2. August 2013.
http://forums.osclass.org/general-help/india-theme-assign-issue/msg64044/#msg64044 Dated:

3. Dated: September 2013.
http://forums.osclass.org/themes/india-theme-problem/msg69655/#msg69655

osclass Theme Developers, Please Rectify this issue...  :-\
« Last Edit: November 01, 2013, 02:04:17 pm by Lokesh K S »

Lokesh K S

  • Newbie
  • *
  • Posts: 9
India Theme : Problem Now Resolved - Unable to a Assign Region
« Reply #1 on: November 01, 2013, 02:01:09 pm »
I just figured out one method to correct this...

I really dont know whether this was the reason for the Region corresponding to Pondicherry was unable to assign with any of the names.

When I went through the map_settings.php in the directory \oc-content\themes\india\admin, I found that the regions in India Map were divided into "Individual Regions" and "Grouped Regions" (for Andaman, Lakshwadeep etc. where the regions are not continuous geographically).

There are 30 Individual Regions and 5 Grouped Regions.. If you look at the source of the rendered html file from Map Settings page in osclass Admin, we find 30 Individual Regions but only 4 Grouped Regions.

I thought this may be the result of a mistake in the array or loops..

When you look into the code, it will generate individual html form on each area on the image map. Clicking the region will activate the form to display the assign region box.

Line No: 140. Look for "$i<5;".

Original Code:
for($i=1;$i<5;$i++){
    ?>
    <form id="region-group-<?php echo $i; ?>" class="region-dialog has-form-actions">


This For Loop can generate only 4 grouped regions as it will run only if its <5. But we need 5 grouped regions. So we are short of 1 grouped region.

How to Correct this:

Create a backup file by copying the map_settings.php to map_settings_1.php to be on a safer side so that you can restore if anything goes wrong.

Now Replace "<5"with "<=5".

New Code:
for($i=1;$i<=5;$i++){
    ?>
    <form id="region-group-<?php echo $i; ?>" class="region-dialog has-form-actions">


Save the file. Now the array can generate upto 5 grouped regions. This will generate all the individual html forms for the 5 grouped regions.

Login to your osclass Admin and now you can assign the region corresponding to Pondicherry.

This is working correctly in my local installation of the script.. I have not installed this script online...

Please reply if this is working or not-working with your installations of the script and India Map Theme...


Lokesh K S

  • Newbie
  • *
  • Posts: 9

Some suggestions (feature requests) for the code developers of India Map Theme:

1) you can assign same region name to 2 or more regions on the Map.. (This is a BUG)
2) the name of already assigned region appears again in the list when you click on other region.
3) drag drop assignment of the region names to the areas on the Map will be good.
4) Implementing Latitude and Longitude Layer so that a Pin Mark appears on the places corresponding to the Cities on the Map indicating the presence of active listings for that particular city.


garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Hi,

Thanks for reporting and sorry for the late response and fix.

New versions of India theme has not issues with group-regions because It's already fixed.

Right now we have no intention to add new features, because we don't have time for all, but of course we need to fix all the bugs.

Please can you verify what version are you using ? Anyway , today I have planed to release a new version with bugfixes.
Regards

Lokesh K S

  • Newbie
  • *
  • Posts: 9
Sorry for Late Reply...

I think I was using the old version downloaded in March and August 2013 ...

The new version 1.1.1 (20131014104049_47_theme_india_1.1.1.zip) has fixed this issue...

I will check out the latest 1.1.2 (2013-12-12) version...

Thanks...