=== CSV to Search ===
Contributors: ccmshightech
Donate link: https://www.ccmssolutions.com/
Tags: csv, search, data, table, import
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Upload a CSV file and let visitors search, filter, and browse the data through a customizable shortcode.

== Description ==

**CSV to Search** lets you upload a CSV file and display its data as a searchable, filterable table or list on any page or post using a simple shortcode. Developed by **Complete Content Management Services™** ([ccmssolutions.com](https://www.ccmssolutions.com/)).

= How it works =

1. Upload a CSV file (or download the provided template).
2. Configure your display preferences — table or list view, colors, pagination, and tabs.
3. Drop the `[csv_to_search]` shortcode onto any page or post.
4. Visitors search by any column — company name, address, city, state, zip code, phone, and more.

= Features =

* **CSV upload** — upload a .csv or .txt file from the admin settings. The first row is treated as column headers.
* **Full-text search** — visitors can search across all columns simultaneously.
* **Table or list display** — choose how results appear; both are responsive and mobile-friendly.
* **Customizable tabs** — create up to 2 tabs that filter results by a "Type" column.
* **Pagination** — configurable results per page with fully customizable colors.
* **Color customization** — button colors, tab colors, text colors, and pagination colors are all adjustable.
* **CSV template download** — a ready-made template helps users structure their data correctly.
* **Shortcode** — one shortcode, any page: `[csv_to_search]`.
* **Clean uninstall** — all plugin data is removed when the plugin is deleted.
* **Translation ready** — fully internationalized with a .pot file included.

= Free version limits =

* One CSV file.
* The first 250 rows of the file are searched.
* Up to 2 filter tabs.

= CSV to Search Pro =

[CSV to Search Pro](https://www.ccmssolutions.com/plugins/csv-to-search-pro/) is a separate paid add-on plugin from CCMS. It needs this plugin and adds:

* Unlimited rows.
* Up to 8 filter tabs.
* Multiple CSV files, each shown with `[csv_to_search source="name"]`.
* CSV import from a URL, with hourly or daily refresh.
* Export of search results to CSV.

This plugin works fully on its own. Nothing is unlocked by a key, and it never contacts a licensing server.

== Installation ==

1. Upload the plugin ZIP via **Plugins → Add New → Upload Plugin**, or copy the `csv-to-search` folder to `wp-content/plugins/`.
2. Activate **CSV to Search**.
3. Go to **CSV to Search** in the admin menu and upload your CSV file.
4. Configure display, pagination, and tab settings.
5. Add `[csv_to_search]` to any page or post.

== Frequently Asked Questions ==

= What format should my CSV file be in? =

The first row must contain column headers. Use commas as delimiters. You can download a template from the Getting Started tab in the plugin settings.

= Can I filter results into different tabs? =

Yes. Add a "Type" column to your CSV, then create tabs in the plugin settings and assign each tab a type value. Rows are filtered to the matching tab.

= What columns can visitors search? =

Visitors can search across all columns simultaneously. The search is case-insensitive and matches partial text.

= Is there a limit on how many rows I can upload? =

The free version searches the first 250 rows of your file. The separate CSV to Search Pro add-on removes the limit.

= Does this plugin create database tables? =

No. The CSV file is stored in a private folder and read on each search. No custom database tables are created.

= Where is my CSV file stored, and can visitors download it? =

Uploaded files are kept in `wp-content/uploads/cts-data/`, not in the media library. Each file gets a random 32-character name, nothing on your site links to it, and the folder is set to deny direct access on Apache and IIS. Visitors can see the rows a search returns, but they cannot download the raw file.

If your server runs NGINX, add this rule to your server configuration to block the folder outright:

`location ^~ /wp-content/uploads/cts-data/ { deny all; }`

Adjust the path if your uploads folder is elsewhere.

= Will the plugin tell me if the folder is exposed? =

Yes. On its own screens the plugin puts a small marker file in the folder and requests it from your own site's uploads address. If the marker can be downloaded, a warning appears with the exact rule for your site, and a Check again button. This is a request from your server to itself, cached for 12 hours, and nothing is sent to any other site. If your server cannot reach its own address, the plugin stays quiet rather than guessing.

= Will it slow down my site? =

The CSV is only parsed when a visitor performs a search (via AJAX), so it does not affect page load time. Very large files take longer to search because the file is read on each search.

== External services ==

This plugin is fully functional without contacting any external service. It connects to one external service, and only when you explicitly choose to use it:

**CCMS newsletter opt-in (optional).** The plugin includes an optional newsletter sign-up on the **CSV to Search → About CCMS** screen. Nothing is sent unless a logged-in administrator types an email address, ticks the consent checkbox, and clicks **Subscribe**. When (and only when) that happens, the plugin sends the following to CCMS to record the subscription:

* the email address you entered;
* a consent flag indicating you agreed to receive email;
* a fixed source label (`csv-to-search`); and
* your site's address (the result of `home_url()`), so CCMS can associate the request with your site.

The data is sent to Complete Content Management Services (CCMS) at `https://www.ccmssolutions.com/api/newsletter-subscribe.php`. No data is sent at any other time, and no search, visitor, or site data is ever transmitted.

Service provider: Complete Content Management Services — https://www.ccmssolutions.com/
Terms of service: https://www.ccmssolutions.com/terms/
Privacy policy: https://www.ccmssolutions.com/privacy-policy/

== Screenshots ==

1. Getting Started tab — quick-start instructions, shortcode copy button, and CSV template download.
2. General settings — upload a CSV file, set button colors and height, configure category filter.
3. Display settings — choose between table and list view, set heading text color.
4. Pagination settings — enable/disable pagination, set results per page, customize all pagination colors.
5. Tab settings — configure up to 2 filter tabs with custom titles, type filters, and colors.
6. Frontend search page — clean layout with tab buttons and search bar before a query.
7. Search results in table view — all 10 results displayed with column headers and data rows.
8. Filtered search results — Retail tab active, showing only matching rows.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
