Cracked it! I had all this nonsense in my nginx from googling around. here is what worked.
location /forum { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-AUTHENTICATION, X-IP, Accept'; add_header 'Access-Control-Max-Age' 1728000; add_header 'Content-Type' 'text/plain charset=UTF-8'; add_header 'Content-Length' 0; return 204; } if ($request_method = 'POST') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-AUTHENTICATION, X-IP, Accept'; } if ($request_method = 'GET') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-AUTHENTICATION, X-IP, Accept'; } add_header 'Access-Control-Allow-Credentials' 'true'; add_header X-Frame-Options "SAMEORIGIN"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; # proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_pass http://127.0.0.1:4567; # no subfolder defined here proxy_set_header Host $host; # MAGIC proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }Show accumulated child category topics and posts on categories page
-
We have only four categories which hold all other subcategories and have no own topics or posts. Due to this, guests coming to the homepage, they get the impression we have no content yet. Is there a way to show accumulated counters on each category?
Like this:- Cat A (88 topics, 2.316 posts)
- Cat A.1 (51 topics, 754 posts)
- Cat A.2 (29 topics, 1.242 posts)
- Cat A.3 (8 topics, 320 posts)
- Cat A (88 topics, 2.316 posts)
-
This is commited to master now, it will only work for 1 level deep, since we don't recursively retrieve children categories.
- Cat A (88 topics, 2.316 posts)
- Cat A.1 (51 topics, 754 posts)
- Cat A.2 (29 topics, 1.242 posts)
- Cat A.3 (8 topics, 320 posts)
Will work, but
- Cat A (88 topics, 2.316 posts)
- Cat A.1 (51 topics, 754 posts)
- Cat A.1.1 (1 topics, 1 posts) //this wont be included on categories page
- Cat A.2 (29 topics, 1.242 posts)
- Cat A.3 (8 topics, 320 posts)
- Cat A.1 (51 topics, 754 posts)
- Cat A (88 topics, 2.316 posts)
-
Thats fantastico, thank you baris!
-
@baris you have any solution for the Cat A.1.1 ?