=== Namma Neram - Tamil Panchangam & Nalla Neram Widgets ===
Contributors: nammacalendar
Tags: tamil calendar, panchangam, panchang, hindu calendar, muhurtham
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.5.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Tamil calendar widgets: today's panchangam with Nalla Neram and Rahu Kalam (in Tamil or English), muhurtham days and festival countdowns.

== Description ==

Namma Neram adds Tamil calendar widgets to any WordPress site through shortcodes. It suits Tamil blogs, temples, community sites, astrologers, schools and shops.

All data comes from nammacalendar.com: the plugin downloads one public file, https://nammacalendar.com/data/widget/feed.json, and sends nothing about your site or visitors. The panchangam follows the Vakya almanac for Indian cities and Thirukanitham for cities abroad.

### Key Features:

* **Daily panchangam card**: today's Tamil date, Nalla Neram, Rahu Kalam, Yamagandam, Kuligai, thithi and nakshatram.
* **Muhurtham dates**: upcoming wedding and ceremony dates with their lagnam times.
* **Good days for buying**: good days and hours to buy gold (Thangam Vanga Nalla Naal) or a vehicle, hold a housewarming (Griha Pravesam) or open a business.
* **Festival countdown**: a card or bar with the next festival's name and "இன்னும் N நாள்" ("நாளை" the day before, "இன்றுதான்!" on the day), with room for your own offer text.
* **Sticky announcement bar**: a slim bar with today's Tamil date, Nalla Neram and the next festival when it is 15 days away or less.
* **Daily rasi palan**: the day's verdict and focus for all 12 rasis, from the Moon's sign (Chennai).
* **Manaiyadi readings and a porutham link**: the manaiyadi card (மனையடி சாஸ்திரம்) gives the readings of the two old books on nammacalendar.com/manaiyadi/ for 1 to 60 adi; the porutham card links to the full 10-porutham check (திருமணப் பொருத்தம்) on nammacalendar.com/porutham/.
* **One design, nammacalendar.com's own**: the day card in the hour gradient, period cards, boxed date stamps and the site's Tamil fonts. It follows the visitor's light or dark setting and fits any width, from a sidebar to a full page.
* **Your colours**: two presets from the site's own hours, Day (coral) and Night (indigo), and a colour for each element: day card top, bottom and text, the Nalla Neram, Rahu Kalam and festival cards (background and icon), main and secondary text, card background, lines and buttons. Each has a colour box and a hex text box (for example #C7381A), with a live preview; they apply to every widget. One widget can use a preset on its own with `preset="day"` or `preset="night"`.
* **Tamil or English admin**: every admin screen, the dashboard widget and the documentation are in Tamil or English, one at a time. It starts from your WordPress language; the தமிழ் | English switch at the top changes it for you (and for Namma Kadai too).
* **Documentation page**: Namma Neram → Documentation explains every widget, option, the colours, the credit link and where the data comes from.
* **Caching**: feed data is cached for three hours in WordPress transients, so pages do not call the feed on every visit.

If the feed cannot be reached, the widgets hide or show "data unavailable". They never show placeholder dates.

**Credit link (your choice):** the widgets show no link to us unless you turn it on. The first time you open Namma Neram it asks once; you can change it any time on the Namma Neram Settings tab, or per widget with `credit="1"` or `credit="0"`. When on, each widget ends with a short line such as "முழு பஞ்சாங்கம் · நம்ம காலண்டர்", where only "நம்ம காலண்டர்" is a (nofollow) link to the matching page. Every feature works the same either way.

== Installation ==

1. Upload the `namma-neram` folder to `/wp-content/plugins/`, or upload the ZIP file in WordPress Admin > Plugins > Add New.
2. Activate the plugin from the Plugins menu.
3. Open **Namma Neram** in the admin sidebar to pick a widget and copy its shortcode, set your default city and language, and answer the one-time credit-link question.
4. Add the shortcodes to any page, post or widget area.

== Shortcodes ==

The widget builder on the Namma Neram page shows every widget and writes its shortcode for you. Every shortcode also accepts `credit="1"` or `credit="0"` and `preset="day"` or `preset="night"`.

* `[namma_panchangam]` - Today: the day card (Tamil date, thithi, nakshatram, sunrise, sunset), then Rahu Kalam and Nalla Neram, with a "இப்போது" mark while one is running in that city. Options: `city="chennai|bengaluru|singapore|kuala-lumpur|colombo|london|toronto|new-york"`, `city_selector="1|0"`, `lang="ta|en"`, `promo_text="…"`.
* `[namma_panchangam layout="compact"]` - Nalla Neram and Rahu Kalam only, for sidebars.
* `[namma_panchangam layout="forecast"]` - Nalla Neram for today and the next four days (Chennai).
* `[namma_panchangam layout="inline"]` - One line, for a header or under a post title.
* `[namma_festival_countdown]` - The next festival, its date and days to go. Options: `festival="auto|<slug>"`, `layout="card|bar"`, `promo_text="…"`.
* `[namma_muhurtham limit="5"]` - The next muhurtham days with their times and lagnam.
* `[namma_good_days category="gold|vehicle|grihaPravesam|business"]` - Good days and hours to buy gold or a vehicle, hold a house-warming or open a business.
* `[namma_rasi_palan]` - Today's reading for all twelve rasis.
* `[namma_manaiyadi]` - Manaiyadi readings of the two old books for 1 to 60 adi.
* `[namma_porutham]` - A button to the full 10-porutham check on nammacalendar.com.
* `[namma_sticky_bar]` - One slim line: today's Tamil date, Nalla Neram and the next festival when it is 15 days away or less.
* `[namma_promo_banner title="…" desc="…" btn_text="…" link="…"]` - Your own offer, in the same calm style. Shows nothing until it has a title or description.

== Frequently Asked Questions ==

= Is it free? Are there ads? =

It is free, with no ads, no paid version and no sign-up. Every feature works without an account.

= What does the plugin send to nammacalendar.com? =

Nothing about your site or your visitors. Your server downloads one public file, https://nammacalendar.com/data/widget/feed.json, and keeps a copy for three hours. Visitors' browsers never contact nammacalendar.com unless they click a link to it. See "External services" below.

= Which cities does it cover? =

Chennai, Bengaluru, Singapore, Kuala Lumpur, Colombo, London, Toronto and New York. Set a default city in the settings. On the daily panchangam card, visitors can also switch city themselves.

= Which almanac does it follow: Vakya or Thirukanitham? =

Indian cities follow the Vakya panchangam, which most Tamil Nadu temples and wall calendars use. Cities abroad follow Thirukanitham, worked out from that city's own sunrise and sunset. Festivals, muhurtham days, good days, rasi palan and the 5-day Nalla Neram are calculated for Chennai.

= Will it slow my site down? =

Very little. The data is kept for three hours in a WordPress transient, so most page views never wait for the feed. When the copy runs out, one page view fetches a fresh one. Every page loads one small stylesheet and one small script.

= Can I change the colours? =

Yes. Pick the Day (coral) or Night (indigo) preset, or set a colour for each element with a live preview. One widget can use a preset on its own with `preset="day"` or `preset="night"`.

= Does it work with the block editor and page builders? =

Yes. Paste a shortcode into a Shortcode block, a classic widget area or a page builder's shortcode element.

= Is there a link back to you? =

Only if you turn it on. The plugin asks once, and you can change your answer any time on the Namma Neram Settings tab, or per widget with `credit="1"` or `credit="0"`. Every feature works the same either way.

== Screenshots ==

1. Daily panchangam card: the Tamil date, thithi, nakshatram, sunrise and sunset for the chosen city.
2. Today's Rahu Kalam and Nalla Neram, with the day's special occasion.
3. Festival countdown card with the days to go.
4. Muhurtham days with their times and lagnam.
5. Good days and hours to buy gold.
6. Daily rasi palan for all 12 rasis.
7. Widget builder: pick a widget and copy its shortcode.
8. Colour settings with a live preview.

== External services ==

This plugin relies on one external service, Namma Calendar (nammacalendar.com), run by the same team that makes this plugin. Without it the widgets have no data to show.

* **What it is and what it is used for:** the plugin downloads one public, read-only JSON file, https://nammacalendar.com/data/widget/feed.json, which holds the panchangam, festival, muhurtham, good-day and rasi palan data the widgets display.
* **When:** your WordPress server fetches the file when a widget, the Namma Neram admin page or its dashboard widget is shown and no copy is cached, at most once every three hours (the copy is kept in a WordPress transient). If the fetch fails it retries after five minutes. "Update data now" on the settings page fetches it at once.
* **What data is sent:** nothing about your site, your visitors or your users. The request is a plain GET with the user agent `NammaNeram/<version>`, no cookies, no API key and no site address. Like any web request, it reaches our host from your server's IP address, which our host keeps in standard server logs. Your visitors' browsers never contact nammacalendar.com unless they click a link to it.
* **Links to nammacalendar.com:** the porutham button, and the optional credit link (off unless you turn it on), are plain links; following one opens nammacalendar.com in the visitor's browser.
* **Terms of service:** https://nammacalendar.com/en/terms/
* **Privacy policy:** https://nammacalendar.com/en/privacy/

== Credits ==

The admin screens and widgets use the Figtree, Newsreader, Noto Sans Tamil and Noto Serif Tamil fonts, bundled under the SIL Open Font License 1.1 (assets/fonts/OFL.txt).

== Changelog ==

= 1.5.2 =
* Security hardening: a feed reply larger than 1 MB is rejected and never parsed or stored.

= 1.5.1 =
* Admin scripts and styles now load as separate files.
* Readme: new External services section; the install steps now name the `namma-neram` folder.

= 1.5.0 =
* First version (sent for review, not released): panchangam card in detailed, compact, forecast and inline layouts, festival countdown, sticky bar, muhurtham days, good days, rasi palan, manaiyadi, porutham and promo banner widgets, colour settings and a Tamil or English admin.

== Upgrade Notice ==

= 1.5.2 =
Rejects a feed reply larger than 1 MB. Your settings stay as they are.

= 1.5.1 =
Admin scripts and styles now load as separate files. Your settings stay as they are.
