There is an idea plugin which will increase amount of the users of your elgg site in some times.

Good afternoon!

There is an idea plugin which will increase amount of the users of your elgg site in some times.

To make search of the users on the country, region, city and who now of the users of city online.

For this purpose it is necessary:

To output in registration in a file register.php the interconnected lists a file of the countries, regions, cities.

In a structure of the user to output the country, region, city.

In the menu the users to add search of the users on the country, region, city and

Who now online in this city.

 

The complete algorithm how it to make is necessary?

Variants1

The foolproof way to do this (though it requires much more coding) is to save each city/country etc as their own entities. That way you can model a heirarchy (this city is in this country etc) and have the users select them with an autocomplete which will reduce spelling errors. The entities selected by the users will have relationships created between the user and that entity, so searching for a user in a certain city then becomes a simple elgg_get_entities_from_relationship () call (idea Matt Beckett)

 

Variant 2

 To create a three-dimensional File of the countries $location [country] [state] [city] = array ('USA' = > array ('California' = > array (' San Diege ', 'Socramento'), ' New York ' = > array (' New York ')), 'Ukraine' = > array (' Dnipropetrovskiy reg. ' = > array (' Kriviy Rih ', ' Zoltiy Vody '))),

Then by serialization would transform a file to the text and would keep as a textual file in cash, if necessary would read out a file in global variable, also would write a pair экшин for a call through ajax for a dynamic choice of region depending on a choice of the country, and choice of city depending on the chosen region.(idea Sergiy Kamolov)

Interest all variants of the decision except for metadata and profilemanager