NGS JS Salat Times

JS Salat Times WP Plugin

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 :

  1. Adhan.js (github repo)
  2. 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:

  1. NGS JS Salat Times : displays a monthly prayers times.
  2. NGS JS Daily Salat Times : displays a daily prayers times.

Screenshots

Monthly Widget preview

short_code: [ngs_js_salat_times]

Daily Widget preview

short_code: [ngs_js_daily_salat_times]

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

  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

  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.

One thought on “JS Salat Times WP Plugin”

  1. 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.

Leave a Reply to M. El w.Cancel reply