These are chat archives for ushahidi/Community

13th
Nov 2017
F1ko
@F1ko
Nov 13 2017 08:25
hey guys
i am running 2.7. and would like to insert a SQL statement next to the dashboard
it works just fine for mysql, but how i can i insert it for every admin to see it in his dashboard?
i want to display every user and a total sum of his submitted reports for the day
what i found out so far is that i would have to insert it somewhere at ushahidi/application/views/admin/dashboard/main.php
however, i only worked with plain PHP and u are using kohana, so i am a little bit confused how to input a sql statement there
got some hints?
thanks in advance
hydrosIII
@hydrosIII
Nov 13 2017 10:02
@ushbot , how was it ? for the custom deployment and the mobile app. ? It doest not seems to work. Despite all the instructiosn. Maybe because im using caddy as a server. Maybe configure it with apache or nginx. Since it is what the document says. It should work i just dont understand why it isnt.
Ushbot
@ushbot
Nov 13 2017 10:03
[Angela Oduor Lungati, Ushahidi] Hi folks
[Angela Oduor Lungati, Ushahidi] @INTJ_Ape_twitter - we haven't created a data source for instagram yet unfortunately
[Angela Oduor Lungati, Ushahidi] i'm tagging the rest of the dev team here to answer the rest of your questions shortly :)
[Angela Oduor Lungati, Ushahidi] cc @davidlosada @will
[David Losada, Ushahidi] @TechnoDexx I’m not sure how an Apache and Nginx setup would work.. it sounds a bit redundant. What are you trying to accomplish exactly?
[David Losada, Ushahidi] @hydrosIII a usual pitfall is the requirement of returning CORS headers with config.json , the specific headers and their values are listed in the install documentation
Ushbot
@ushbot
Nov 13 2017 10:08
[David Losada, Ushahidi] @F1ko unfortunately Kohana is also not actively maintained. You can fully expect the usual hardships associated with working on legacy tech. There’s some documentation here : https://v2docs.kohanaframework.org/documentation . I think v2.7 uses Kohana 2.x

[David Losada, Ushahidi] re CORS headers, pasting here the detail:

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
Access-Control-Expose-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range

Igor Golov
@TechnoDexx
Nov 13 2017 10:16
@ushbot Hi, David! I want split site content beetween Nginx and Apache. Static for Nginx and dynamic for Apache. In this conf sites work more quickly.
Ushbot
@ushbot
Nov 13 2017 10:18
[David Losada, Ushahidi] mm the biggest challenge with doing that in a single server is probably that both nginx and apache would want the same ports open . One would have to reverse proxy to the other.
Ushbot
@ushbot
Nov 13 2017 11:02
[Brad] @Ang if there's a template to follow I'll look into have my team create one.
Igor Golov
@TechnoDexx
Nov 13 2017 11:37
@ushbot You can transplant Apache and its virtual hosts to another port, for example 8080, and in the settings of the virtual Nginx virtual host, specify the proxy directives
@ushbot Like this:
location / { proxy_pass http://127.0.0.1:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_connect_timeout 120; proxy_send_timeout 120; proxy_read_timeout 180; }
Igor Golov
@TechnoDexx
Nov 13 2017 11:48
@ushbot Also need RPAF module for Apache (libapache2-mod-rpaf) with config RPAFenable On RPAFsethostname Off RPAFproxy_ips 127.0.0.1 RPAFheader X-Real-IP
hydrosIII
@hydrosIII
Nov 13 2017 12:34
@ushbot, Ok, done that, I have seen the documentation. But it has some issues, for example there is not a confi.json in the V3.7.1, at least in the complied code after gulp. Does uit means that i have to modify this before passing it trough gulp?
hydrosIII
@hydrosIII
Nov 13 2017 12:42
Here the conf in Caddyfile using Caddy, Im suspecting of this server doing something strange with Cors Headers, i post it here to see if anyone has some experience 'cors /config.json {
origin *
methods GET,POST,OPTIONS
allowed_headers DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
exposed_headers DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
}'
hydrosIII
@hydrosIII
Nov 13 2017 12:56
@ushbot, Waht woud it be the command to debug that the server is giving the right headers? For example: https://stackoverflow.com/questions/12173990/how-can-you-debug-a-cors-request-with-curl, What would it be with the specific case of ushahidi and the config.json file?
Ushbot
@ushbot
Nov 13 2017 12:57
[David Losada, Ushahidi] you can use curl and compare the output with the execution of `curl -vvv https://quakemap.ushahidi.io/config.json`
[David Losada, Ushahidi] ah sorry, that URL doesn’t apply, one sec
[David Losada, Ushahidi] `curl -vvv https://sandbox.uchaguzi.or.ke/config.json`
hydrosIII
@hydrosIII
Nov 13 2017 13:01
Mmm that is what i needed
@ushbot , Thanks, i think now i get an idea and i can debug this.
Ushbot
@ushbot
Nov 13 2017 14:35
[Lawal] hi
[Lawal] i am having issues setting up smssync
Ushbot
@ushbot
Nov 13 2017 16:37
[David Losada, Ushahidi] hi, please detail your issues
Sareh
@Sareh88_twitter
Nov 13 2017 18:28

Hello! I recently heard of Ushahidi. As you might have heard in the news, there was an earthquake close to the Iran-Iraq border yesterday and hundreds are dead, with many thousands injured, awaiting rescue. (http://www.bbc.co.uk/news/world-middle-east-41972338).

I'm really interested in making Ushahidi localised in Persian, since I want it to be able to be used by locals in Iran. Does anyone here have pointers of where to start?

I've had a look at the Nepalese case study, but it's a little light on practical details of what to start to get set up first. https://www.ushahidi.com/case-studies/quakemap