|
@@ -0,0 +1,103 @@
|
|
|
+# 📖 Rural Dictionary (PHP Port)
|
|
|
+
|
|
|
+> We're rural, not urban.
|
|
|
+
|
|
|
+This is a PHP port of the [original Python-based Rural Dictionary](https://git.vern.cc/cobra/rural-dict) - a privacy-respecting, NoJS-supporting Urban Dictionary frontend.
|
|
|
+
|
|
|
+## 🔄 Port Information
|
|
|
+
|
|
|
+This PHP version maintains feature parity with the original Python implementation while offering:
|
|
|
+- Simpler deployment (just PHP + web server required)
|
|
|
+- Lower memory footprint
|
|
|
+- Native integration with common web servers
|
|
|
+- No Python dependencies needed
|
|
|
+
|
|
|
+## ✨ Features
|
|
|
+
|
|
|
+Just like the original, this frontend supports all Urban Dictionary features including:
|
|
|
+
|
|
|
+- Word definitions
|
|
|
+- Author pages
|
|
|
+- Homepage with words of the day
|
|
|
+- Random word definitions
|
|
|
+- 404 page with words similar to search
|
|
|
+- Pagination
|
|
|
+
|
|
|
+## 🚀 Deployment
|
|
|
+
|
|
|
+Clone repository:
|
|
|
+
|
|
|
+```sh
|
|
|
+git clone https://git.qunn.eu/poesty/rural-dict.git
|
|
|
+cd rural-dict
|
|
|
+git checkout php-port
|
|
|
+```
|
|
|
+
|
|
|
+### 📦 Requirements
|
|
|
+
|
|
|
+- PHP 8.0 or higher
|
|
|
+- PHP extensions:
|
|
|
+ - curl
|
|
|
+ - dom
|
|
|
+ - mbstring
|
|
|
+- Web server (Apache/Nginx)
|
|
|
+
|
|
|
+### 🌐 Web Server Configuration
|
|
|
+
|
|
|
+#### Apache
|
|
|
+Make sure mod_rewrite is enabled and use the included .htaccess file:
|
|
|
+
|
|
|
+```apache
|
|
|
+RewriteEngine On
|
|
|
+RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
+RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
+RewriteRule ^(.*)$ index.php [QSA,L]
|
|
|
+```
|
|
|
+
|
|
|
+#### Nginx
|
|
|
+Add this to your server configuration:
|
|
|
+
|
|
|
+```nginx
|
|
|
+location / {
|
|
|
+ try_files $uri $uri/ /index.php?$args;
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+### 📁 Directory Structure
|
|
|
+```
|
|
|
+.
|
|
|
+├── index.php # Main application file
|
|
|
+├── .htaccess # Apache configuration
|
|
|
+└── static/ # Static assets
|
|
|
+ ├── css/
|
|
|
+ │ └── main.css
|
|
|
+ └── img/
|
|
|
+ ├── favicon.png
|
|
|
+ └── logo.png
|
|
|
+```
|
|
|
+
|
|
|
+## 🔗 Redirection
|
|
|
+
|
|
|
+To use Rural Dictionary, simply replace an Urban Dictionary URL with a Rural Dictionary URL. You can use browser extensions like [Redirector](https://github.com/einaregilsson/Redirector) for automatic redirection.
|
|
|
+
|
|
|
+For example, change:
|
|
|
+`https://urbandictionary.com/define.php?term=kin`
|
|
|
+to:
|
|
|
+`https://your-instance.com/define.php?term=kin`
|
|
|
+
|
|
|
+## 👥 Credits
|
|
|
+
|
|
|
+- Original Rural Dictionary by [cobra](https://git.vern.cc/cobra)
|
|
|
+- [thirtysix](https://thirtysix.pw) - Modern rewrite and feature implementation
|
|
|
+- [zortazert](https://codeberg.org/zortazert) - Initial frontend development
|
|
|
+- PHP port by [poesty](https://git.qunn.eu/poesty)
|
|
|
+
|
|
|
+## 📜 License
|
|
|
+
|
|
|
+This project is licensed under the AGPLv3+ license - see the [LICENSE](LICENSE) file for details.
|
|
|
+
|
|
|
+## 🤝 Support
|
|
|
+
|
|
|
+For support and discussions about the original Rural Dictionary, join their [Matrix room](https://mto.vern.cc/#/#cobra-frontends:vern.cc).
|
|
|
+
|
|
|
+For issues specific to this PHP port, please use the [issue tracker](https://git.qunn.eu/poesty/rural-dict/issues).
|