Show latest posts outside of forum
I tried for the last few days unsuccessfully to find a way to do this and it was very frustrating. I worked out something, I'm pretty new at coding so might be a terrible method but it works.
Access-Control-Allow-Origin must be set in Apache if the site you are pushing to is not hosted on the localhost:
LoadModule headers_module modules/mod_headers.so
<Directory /> Header set Access-Control-Allow-Origin "*" </Directory>
Im showing time and discussion title, you can look at the json file in your browser and choose the strings you wish to pull.
the .replace is there because there were html styling arguments in the returned strings.
Loads on dom ready and refreshed every 60000 ms.