Yet Another Salat Times WordPress plugin.
The origin
I decided to write this plugin in order to move the computation and design logic on client side rather than server side, as I can found in other existing plugins in the same field.
This project take it source for the mosque of Maizières-Lès-Metz in France.
I found 2 great JavaScript libraries for that job :
- Adhan.js (github repo)
- moment-hijri (github fork repo)
I used an existing WordPress plugin as a starting point: Salat Times from M.A. Imran.
How to use this plugin
- Install and activate the “NGS JS Salat Times” plugin.
- Go to: Settings > NGS JS Salat Times
- Customize the location, calculation and locales settings.
- Use widget or shortcode.
There is two widgets:
- NGS JS Salat Times : displays a monthly prayers times.
- NGS JS Daily Salat Times : displays a daily prayers times.
Screenshots
Monthly Widget preview
Daily Widget preview
Settings – Location, Calculation
Settings – Calculation
Settings – Locales Settings
Settings – Hijri Date Adjustments, Widget Style
Customization
From v1.3, it is possible to customize the widgets rendering using the underscore templating system.
Just add your template in the folder “wp-content/plugins/ngs-js-salat-times/templates”, give it the extension “.tmpl” and in the plugin settings, on the bottom section, select your template and save.
To help editing your template with vscode, I recommend to install the extension “Underscore Template Colorizer”.
Source code repository
You can browse, clone or fork this plugin from this URL: https://github.com/xlat/ngs-js-salat-times.git
Logo featured by Oum Nuage
License – MIT
Copyright 2020 Nicolas Georges
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Alsalamualikum
Thank you very much for the great job Brother. (Gazakum Allah Khairan)
I hope you will continue updating it.
some suggestions would be great if you can add in the next release:
– a Botton to print the monthly praying time
– a GUI setting to change the background and Fonts colors
– possibility to add the Mosque Name
– adding the Iqama time then make it 2 columns for ( Adhan – Iqama )
again, thank you so much for this work and hope we will have the updated version soon.