Results for the site category: desarrollo

Diego Gallardo How to filter unwanted users with Spam Filter Login

The following text was translated by Google Translate Technology

In this post I will talk about how to block unwanted user registration (spammers) to a Social Networking Elgg.

We recently, some intrusions of spammers to one of our sites in Elgg. The first thing we did was upgrade to the latest version of Elgg, after seeing the problem persists, look if there was any solution in the community and we found the plugin "Log Spam Filter".

This plugin allows us to block registrations using external services or ip block emails as " stopforumspam "or" fassim ". You can also use an internal blacklist social network: domains or emails, which are checked when the user registers. You can configure some of these solutions individually or all at once.

We will install and explain some of these features.

You can download this plugin from the community of the following location:

This plugin requires:

  • plugin " plugin IP address tracker , "which captures the ip registered user.
  • be enabled CURL
  • CRON be enabled, for cleaning the cache of ip.

After downloading and decompressing both mod plugins folder, we must activate the 2 plugins.

1. Let the administration section of Elgg:

2. After the administration section of tools:

3. We will activate the plugins:

4. After enabling both plugins, plugin must set the login spam filter.

5. You can enable and Fassim Stopforumspam, the latter requires an API key, you get it from: . As we can see have many locking options. Both ip and email support, but has other options Fassim lock code as countries or regions.

6. The last settings are blacklisted domains or emails specific emails. You can configure to send us an email if there is a blockage of a user when it is recorded.

The 5 validations can be enabled or disabled, the order of checks is as follows:

  • Check the user's IP against a blacklist of IP that is cached. (The cache is cleaned 1 time a week).
  • If false, it checks the user's email domain to the blacklist of domain emails.
  • If false, the email is checked against the blacklist of emails.
  • If false, is checked against the external service
  • If false, is checked against the external service


As a last step, we can do to a spammer already registered user on the network. We go to the profile of the deletion and report you as spammer.

I hope you liked this post.

Elgg Happy Coding.

Diego Gallardo

read more

Diego Gallardo Elgg Data Model

The following text was translated by Google Translate Technology

Elgg provides a data model that allows us to abstract away completely from the database.

Provides a unified data model called the Entity-Attribute-Value (EAV), which is based on atomic units of data called "Entities".

As you can see in the picture, everything is based on Elgg Entity (ElggEntity).

Users are entities, the groups also are entities, including the site itself, is an entity.

There are 4 types of entities that are specialization of the principal ElggEntity are:

  • ElggUser (Users): All users on the site are ElggUser an entity type.
  • ElggSite (Site): The site is an object with its properties.
  • ElggGroup (Groups): In an entity that contains / groups other entities. One group is made up of members which are users. May contain different entities, such as blogs, files, forums, which are created within the group.
  • ElggObject (objects) in any other social network content is generated by an object. Example objects are blogs, files, bookmarks.

Through these 4 entities can model any type of functionality in Elgg. These specific entities, have their class and related functions.

These entities can be extended to add information to them in 2 ways:

  • Metadata (Metadata): Metadata are properties that can be assigned to an entity. Adding additional information to it. For example, if a user can be date of birth or nationality.
  • Annotations (annotations): annotations are used for feedback on an entity. For example, when talking about a blog, comments and ratings to the blog, are annotations.

A clear example between annotations and metadata are:

  • Metadata are unique properties of an entity, in this case, only the creator of that entity has the ability to assign.
  • The annotations are the feedback provided to the entity, any user can perform. The notes also have defined roles for the sum, amount, or their average.

Entities can also relate to each other and relations are directional. To create a relationship requires a relation name and two entities.

An example of one-way relationship is when a user is a member of a group, establishing the relationship, 'member' between user and group.

An example is two-way relationship is friendship, which creates a relationship of friendship from the user 1 and user 2 and vice versa.

Any new functionality we will be modeled by these entities. The methods and functions which include persistence and access to data from the database. Means that it is more necessary queries manually, or having to create new tables when we need a new feature on the site.

I hope you liked this post.

Happy Coding Elgg


Diego Gallardo

read more

Diego Gallardo How to test Elgg features with different users in an easy way

The following text was translated by Google Translate Technology

Many times in Elgg we test different features of the plugins with different users, whether performing tests of content from friends, permits content or simply try a multi-user functionality.

It is sometimes difficult, as we should have open multiple instances of the social network in different browsers with different users, or logearnos and offline all the time.

A quick and simple to accomplish this is to install the plugin Login as developed by Brett Profitt. This plugin allows, when you're logged in as administrator, can login with other users, and then get back to the administrator. All this without logout of the site.

This makes it much simpler to perform this task.

We can download from the community the following location:

After downloading and unzip the mod folder, we must activate it.

1. Let the administration section of Elgg:

2. After the administration section of tools:

3. We will activate the plugin:

4. Then we entered the list of site members to login with a user.

5. By clicking on the shortcut menu, a user can see the "Login as" allowing that user login.

6. Also when entering the user profile that is the option "Login as".

7. Once we make the "login as" that user, we see that we will not have more management options in red, the user profile:

8. Also in the topbar of elgg appear 2 icons of users, to the left of the user that performed the "Login as", then an arrow and the admin user logged-in we were before. To return to the admin user, simply make one click on the icon of this person.


I hope you liked this post, and have been used this plugin simple but very effective in developing new features in Elgg and can test them with different users.

Elgg Happy Coding.

Diego Gallardo

read more

Diego Gallardo Elgg site path and database configuration

The following text was translated by Google Translate Technology

In this post we will learn how to manually configure an installation of Elgg. This type of configuration can be realized, when you migrate an elgg site, when you install a site where there is already configured with the db users and data, or when there is a problem with the installation and we work our site Elgg.

I will go on to explain where you set up an elgg installation through the configuration file to access the database and also the path and url of the site in the database.

This type of configuration in the elgg installation page, but it's always good to know where these settings.

In this example we will set up a site called "elggbase."

The base configuration file located in elgg "elgg / engine / settings.php"

If you do not have the settings.php file, you can copy the template file "elgg / engine / settings.example.php" and rename it to settings.php in the same folder.

Editing the settings.php file, copy recently, I find as follows:

In this file we will set up data access to the database (user, password, db name, host, prefix), changing the values ​​contained in braces "{} {}" which would be as follows:

Once we make the configuration of access to the database, we will set the path of elgg in the database, for this we should have access to phpmyadmin on the database. Assuming you already have the database installed and the name elggbase.

Once we access the database, we have set the path where the installation of Elgg and Elgg data path, this is the path where you installed the site. It depends on each server, but usually in "/ var / www" or / home / myuser / public_html "elgg_datalist access the table:

We must change the path and dataroot values, in this case I locate the installation of elgg on the path "/ web /"

Something very important, always add at the end of the url / path the slash "/" as in the case that we forget it, our elgg site, it will not work.

Now we must configure the URL of our site, accessing the table elgg_sites_entity:

Now we must change the value of the url that will take our place.

I hope you liked the post, and have learned how to manually configure an installation of Elgg.

Elgg Happy Coding!


Diego Gallardo

read more

Diego Gallardo SEO Optimization of your Elgg site with Metatags Manager

The following text was translated by Google Translate Technology

In this post we will learn how to improve SEO (Search Engine Optimization) of our Elgg Social Networking.

SEO is important for our social network is found in the search engines for any user to enter a keyword or text that define it, without it, our site would not be found unless we have almost the exact url. Enabling this plugin will not guarantee that searches positioned us among the top results, but if you are making improvements to our site.

For that we will install the plugin called "Metatag Manager", by downloading from the Commonwealth of Elgg from the following link:

After downloading and unzip the mod folder, we must activate it.

1. Let the administration section of Elgg:

2. After the administration tools section:

3. We will activate the plugin:

4. After activating the plugin have to go to site management, which is located in the left section, top management tools to configure the metatags of our site to our liking.

5. Then go to the end of the administration section of the site and we will see the configuration section of metatags.

6. The plugin gives us the ability to upload the following meta tags: keywords, description, robots, author.

Some recommendations to enter into the metatags are:

  • keyword: must have keywords that are on the page, and should not exceed 10 words.
  • description: the description should reflect the content of this page may contain the keyword, and must not exceed 150 words.
  • robots: a robot show the route, usually adding 'index, follow'.
  • author: The author of the site.

Here are some recommendations, I suggest you read more about it in the links detailed below in references.

7. In the end, if we right click, view source, we will do with the metatags we set:

Before enabling metatags manager:

After configuring metatags manager:

I hope this post will be helpful and were able to successfully install this plugin.

Elgg Happy Coding!


Diego Gallardo

Some references:

read more


Pedro Prez

Pedro Prez

Co-founder, Developer and Technical Advisor on Elgg

Gustavo Bellino

Gustavo Bellino

Co-founder and Project leader

Leandro Rivero

Leandro Rivero

Advisor and Community Manager




Follow us in twitter


We Sponsor

Barcamp Litoral Elggcampba Santa Fe Valley

Keetup Development