feat: add falah-shortcodes WP plugin and Falah Mobile deploy script
Implements all missing shortcodes for ummah.falahos.my: - [prayer_times] — Aladhan API, no auth required - [dhikr_counter] — localStorage-backed, works offline - [qibla_compass] — browser Geolocation + DeviceOrientation - [daily_verse] — AlQuran.cloud API, no auth required - [nur_ai_chat], [falah_wallet], [souq_marketplace] — iframe Falah Mobile - [falah_dashboard] — auto-injects dashboard content into empty page Also adds deploy-falah-mobile.sh to build and run the Next.js app on 13.140.161.244:4013, and Nginx reverse proxy config for falahos.my/mobile.
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Falah Shortcodes — WordPress Plugin
|
||||
|
||||
Implements all missing shortcodes for ummah.falahos.my.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Upload the `falah-shortcodes/` folder to `/wp-content/plugins/`
|
||||
2. Activate in **Plugins → Installed Plugins**
|
||||
3. Configure in **Settings → Falah Shortcodes**:
|
||||
- Set **Falah Mobile URL** (default: `https://falahos.my/mobile`)
|
||||
- Set default prayer city/country
|
||||
|
||||
## Shortcodes
|
||||
|
||||
| Shortcode | Page | Notes |
|
||||
|-----------|------|-------|
|
||||
| `[prayer_times]` | /tools | Calls Aladhan API — no key needed |
|
||||
| `[dhikr_counter]` | /tools | localStorage — works offline |
|
||||
| `[qibla_compass]` | /tools | Requires browser geolocation permission |
|
||||
| `[daily_verse]` | /tools | Calls Al-Quran Cloud API — no key needed |
|
||||
| `[nur_ai_chat]` | /nur | Iframes Falah Mobile `/nur` |
|
||||
| `[falah_wallet]` | /wallet | Iframes Falah Mobile `/wallet` |
|
||||
| `[souq_marketplace]` | /souq | Iframes Falah Mobile `/souq` |
|
||||
| `[falah_dashboard]` | /dashboard | Auto-injected if dashboard page is empty |
|
||||
|
||||
## Deploying Falah Mobile (required for nur/wallet/souq)
|
||||
|
||||
Run from the falah-os-ce directory:
|
||||
|
||||
```bash
|
||||
bash deploy-falah-mobile.sh 13.140.161.244 root
|
||||
```
|
||||
|
||||
Then add this to the Nginx vhost for falahos.my:
|
||||
|
||||
```nginx
|
||||
location /mobile {
|
||||
proxy_pass http://127.0.0.1:4013;
|
||||
proxy_set_header Host $host;
|
||||
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;
|
||||
}
|
||||
```
|
||||
|
||||
Update **Settings → Falah Shortcodes → Falah Mobile URL** to `https://falahos.my/mobile`.
|
||||
|
||||
## What each standalone feature uses
|
||||
|
||||
- **Prayer Times** — [Aladhan API](https://aladhan.com/prayer-times-api) (free, no auth)
|
||||
- **Daily Verse** — [AlQuran.cloud API](https://alquran.cloud/api) (free, no auth)
|
||||
- **Dhikr Counter** — browser localStorage (no network call)
|
||||
- **Qibla Compass** — browser Geolocation + DeviceOrientation APIs (no network call)
|
||||
Reference in New Issue
Block a user