×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: different databases for different areas

different databases for different areas 13 years 3 months ago #13565

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
Hi Daniel,

Is there any way to create different databases for different areas been using the same website?

For example, once we log-in into the hotspots administration panel, we can pick which database we wanna modify (data entry).
The content of the site will be the same, and basically we will only be changing the map (the info on it)

I know we can pass variables with data between pages using URL, and to call the different maps we can use for example:
http://www.thecity.ca/index.php?database=vernon&startplacelong=-119&startplacelat=45
http://www.thecity.ca/index.php?database=kelowna&startplacelong= -125&startplacelat=33
http://www.thecity.ca/index.php?database=penticton&startplacelong=-99 &startplacelat=25

In these way, we will get from the url:
the name of the database we wanna use, and where to start the map (following the latitude and longitude)

different databases for different areas 13 years 3 months ago #13577

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
What is the use case for this? You want to simulate categories or what? I'm not exactly sure that I get it?

different databases for different areas 13 years 3 months ago #13585

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
let's say I am working with a whole province, and I wanna show the hotspots for each city (95 cities).
If someone wanna see specifically one city, they can just click in that city to see the hotspots for that city.

different databases for different areas 13 years 3 weeks ago #14344

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
any thoughts, suggestions under this topic?

where - inside hotspots - the code calls the database?

Re: different databases for different areas 12 years 8 months ago #15417

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
let me re-post the same question:

in some part of the code you are calling the database: jos_hotspots_marker, where is that?

Re: different databases for different areas 12 years 8 months ago #15421

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
The jos_hotpsots_marker is the table in which we save the coordinates + description for the hotspots.

If we have to compare this to the maps API - our table stores the information for markers + infowindow. We make the assumption that each marker is actually an infowindow.

Does this help?
Daniel

Re: different databases for different areas 12 years 8 months ago #15423

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
Yes, I already knew that.

jos_hotpsots_marker - stores information for markers
jos_hotpsots_categorie - stores information for categories


Somewhere in the code you call, read or open that specific table, something like:
mysql_query("SELECT * FROM jos_hotpsots_marker")

Basically, the categories will be the same for 2 different cities, but the markers and their info will be different.

Re: different databases for different areas 12 years 8 months ago #15427

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Eliecer,
So I see that you want to hack the component, which is all fine and I welcome this decision on your side, but you'll need to have some background knowledge first.
I advise you to get on with this tutorial:
docs.joomla.org/Developing_a_Model-View-...r_Component_-_Part_1
go trough all parts... It will take you like a day to do everything there, but by the end if you grasp the concepts you will be able to edit any component that more or less follows the joomla framework.

I try to do all requests to the database in the model (check the models folder).

Regards,
Daniel

Re: different databases for different areas 12 years 8 months ago #15435

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
When are you planning to release the new hotspots version?

Re: different databases for different areas 12 years 8 months ago #15439

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Check those screenshots of the new backend edit ;)
www.facebook.com/media/set/?set=a.179399...5077908940923&type=3

I'm trying hard to release in April...
Cheers,
Daniel
  • Page:
  • 1
Time to create page: 0.129 seconds