Welcome, Guest
Username: Password: Remember me

TOPIC: different databases for different areas

different databases for different areas 2 years 8 months ago #13565

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)
  • Eliecer Marchante
  • Eliecer Marchante's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 493
  • Thank you received: 11
  • Karma: 10
The administrator has disabled public write access.

different databases for different areas 2 years 8 months ago #13577

What is the use case for this? You want to simulate categories or what? I'm not exactly sure that I get it?
  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • OFFLINE
  • Administrator
  • Posts: 7616
  • Thank you received: 326
  • Karma: 93
If you are using our extension please leave a review at the JED: CComment | Hotspots | CMigrator | Matukio | Tiles | CMC
Follow us on Twitter! | Facebook | Joomla Development Master Class
The administrator has disabled public write access.

different databases for different areas 2 years 8 months ago #13585

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.
  • Eliecer Marchante
  • Eliecer Marchante's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 493
  • Thank you received: 11
  • Karma: 10
The administrator has disabled public write access.

different databases for different areas 2 years 5 months ago #14344

any thoughts, suggestions under this topic?

where - inside hotspots - the code calls the database?
  • Eliecer Marchante
  • Eliecer Marchante's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 493
  • Thank you received: 11
  • Karma: 10
The administrator has disabled public write access.

Re: different databases for different areas 2 years 1 month ago #15417

let me re-post the same question:

in some part of the code you are calling the database: jos_hotspots_marker, where is that?
  • Eliecer Marchante
  • Eliecer Marchante's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 493
  • Thank you received: 11
  • Karma: 10
The administrator has disabled public write access.

Re: different databases for different areas 2 years 1 month ago #15421

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
  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • OFFLINE
  • Administrator
  • Posts: 7616
  • Thank you received: 326
  • Karma: 93
If you are using our extension please leave a review at the JED: CComment | Hotspots | CMigrator | Matukio | Tiles | CMC
Follow us on Twitter! | Facebook | Joomla Development Master Class
The administrator has disabled public write access.

Re: different databases for different areas 2 years 1 month ago #15423

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.
  • Eliecer Marchante
  • Eliecer Marchante's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 493
  • Thank you received: 11
  • Karma: 10
The administrator has disabled public write access.

Re: different databases for different areas 2 years 1 month ago #15427

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
  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • OFFLINE
  • Administrator
  • Posts: 7616
  • Thank you received: 326
  • Karma: 93
If you are using our extension please leave a review at the JED: CComment | Hotspots | CMigrator | Matukio | Tiles | CMC
Follow us on Twitter! | Facebook | Joomla Development Master Class
The administrator has disabled public write access.

Re: different databases for different areas 2 years 1 month ago #15435

When are you planning to release the new hotspots version?
  • Eliecer Marchante
  • Eliecer Marchante's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 493
  • Thank you received: 11
  • Karma: 10
The administrator has disabled public write access.

Re: different databases for different areas 2 years 1 month ago #15439

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
  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • OFFLINE
  • Administrator
  • Posts: 7616
  • Thank you received: 326
  • Karma: 93
If you are using our extension please leave a review at the JED: CComment | Hotspots | CMigrator | Matukio | Tiles | CMC
Follow us on Twitter! | Facebook | Joomla Development Master Class
The administrator has disabled public write access.
Time to create page: 0.408 seconds
Powered by Kunena Forum