Redirecting api to local files

Hi guys,

I’m using this code https://github.com/GlobalQuran/site/tree/v3.4.0 on my site. I have downloaded the Site-3.40 files im using the dynamic-html https://github.com/GlobalQuran/site/tree/v3.4.0/dynamic-html folder right now and which i want to use on my own site. Is there any possible way i don’t have to use the API but my local files instead like the audio, Quran scripts and translations. The code uses apiURL: ‘http://api.globalquran.com/’,

now my question is what java script file and lines should i be editing to redirect the api to my local files. and how to set up the structure of my data folder

thanks in advance

You could try replacing var gq={apiURL:"http://api.globalquran.com/" with var gq={apiURL:"/audio/"} in GlobalQuran.js

If that’s only used for fetching the audio it might work.
You’ll then need to copy all of the audio files into that directory.

thanks for the reply

that api url it not only fetching audio its fetching translations, and the scripts.
i’m stuck how the data structure has to be like in folders.
like i said before i do have all the offline files downloaded, i just dont know how to place them inside the data folder.

and what should the api url be like if its fetching more then only audio.

I’ve tried to answer those questions above, you should follow up with the author of the package directly and ask him how to host certain files on your own site rather than using the api.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.