add setting for new 'most active' algorithm
This commit is contained in:
@@ -52,6 +52,8 @@ en:
|
|||||||
place_name_description: "Name of your city"
|
place_name_description: "Name of your city"
|
||||||
related_content_score_threshold: "Related content score threshold"
|
related_content_score_threshold: "Related content score threshold"
|
||||||
related_content_score_threshold_description: "Hides content that users mark as unrelated"
|
related_content_score_threshold_description: "Hides content that users mark as unrelated"
|
||||||
|
hot_score_period_in_days: "Period (days) used by the filter 'most active'"
|
||||||
|
hot_score_period_in_days_description: "The filter 'most active' used in multiple sections will be based on the votes during the last X days"
|
||||||
map_latitude: "Latitude"
|
map_latitude: "Latitude"
|
||||||
map_latitude_description: "Latitude to show the map position"
|
map_latitude_description: "Latitude to show the map position"
|
||||||
map_longitude: "Longitude"
|
map_longitude: "Longitude"
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ es:
|
|||||||
place_name_description: "Nombre de tu ciudad"
|
place_name_description: "Nombre de tu ciudad"
|
||||||
related_content_score_threshold: "Umbral de puntuación de contenido relacionado"
|
related_content_score_threshold: "Umbral de puntuación de contenido relacionado"
|
||||||
related_content_score_threshold_description: "Oculta el contenido que los usuarios marquen como no relacionado"
|
related_content_score_threshold_description: "Oculta el contenido que los usuarios marquen como no relacionado"
|
||||||
|
hot_score_period_in_days: "Periodo (días) usado para el filtro 'Más Activos'"
|
||||||
|
hot_score_period_in_days_description: "El filtro 'Más Activos' usado en diferentes secciones se basará en los votos de los últimos X días"
|
||||||
map_latitude: "Latitud"
|
map_latitude: "Latitud"
|
||||||
map_latitude_description: "Latitud para mostrar la posición del mapa"
|
map_latitude_description: "Latitud para mostrar la posición del mapa"
|
||||||
map_longitude: "Longitud"
|
map_longitude: "Longitud"
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ section "Creating Settings" do
|
|||||||
Setting.create(key: 'featured_proposals_number', value: 3)
|
Setting.create(key: 'featured_proposals_number', value: 3)
|
||||||
|
|
||||||
Setting.create(key: 'related_content_score_threshold', value: -0.3)
|
Setting.create(key: 'related_content_score_threshold', value: -0.3)
|
||||||
|
Setting.create(key: 'hot_score_period_in_days', value: 31)
|
||||||
|
|
||||||
Setting['feature.homepage.widgets.feeds.proposals'] = true
|
Setting['feature.homepage.widgets.feeds.proposals'] = true
|
||||||
Setting['feature.homepage.widgets.feeds.debates'] = true
|
Setting['feature.homepage.widgets.feeds.debates'] = true
|
||||||
|
|||||||
@@ -136,6 +136,9 @@ Setting['feature.homepage.widgets.feeds.proposals'] = true
|
|||||||
Setting['feature.homepage.widgets.feeds.debates'] = true
|
Setting['feature.homepage.widgets.feeds.debates'] = true
|
||||||
Setting['feature.homepage.widgets.feeds.processes'] = true
|
Setting['feature.homepage.widgets.feeds.processes'] = true
|
||||||
|
|
||||||
|
# Votes hot_score configuration
|
||||||
|
Setting['hot_score_period_in_days'] = 31
|
||||||
|
|
||||||
WebSection.create(name: 'homepage')
|
WebSection.create(name: 'homepage')
|
||||||
WebSection.create(name: 'debates')
|
WebSection.create(name: 'debates')
|
||||||
WebSection.create(name: 'proposals')
|
WebSection.create(name: 'proposals')
|
||||||
|
|||||||
@@ -31,4 +31,9 @@ namespace :settings do
|
|||||||
Setting['featured_proposals_number'] = 3
|
Setting['featured_proposals_number'] = 3
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Create new period to calculate hot_score"
|
||||||
|
task create_hot_score_period_setting: :environment do
|
||||||
|
Setting['hot_score_period_in_days'] = 31
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user