Conversation
dgw
approved these changes
Feb 16, 2026
Member
dgw
left a comment
There was a problem hiding this comment.
This is pretty neat. The PR description reads like LLM output, so I skipped that and went to look at the repo instead.
Your live demo of the visitor-facing bits works fine, but it's always nice if a project's readme includes screenshots. A random visitor can't get a sense of how the plugin's admin area works before installing it themselves.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why this is a true YOURLS plugin (and not a standalone frontend)
This is a fair question: why manage a link page from a URL shortener? The answer is integration.
It lives inside the YOURLS ecosystem
user/plugins/, activated from "Manage Plugins", tables created automatically on activation viayourls_add_action('activated_*')plugins_loaded,loader_failed,redirect_shorturl, filtersshorturl,yourls_link, actionhtml_head— no hacks, only official extension pointsyourls_get_db()(Aura.SQL/PDO), readsYOURLS_DB_TABLE_URLto resolve keywords, and creates its own tables with the standard prefixyourls_register_plugin_page(), the AJAX endpoint verifies nonces withyourls_verify_nonce()yourls_load_custom_textdomain(), all strings go throughyourls__()/yourls_e()It builds on what YOURLS already does
The plugin doesn't reinvent the wheel — it extends YOURLS:
gitin the URL field creates a link toexample.com/gitthat goes through YOURLS resolution. Clicks are tracked, stats work out of the boxredirect_shorturlhook to add a branded interstitial with OG metadata — the YOURLS redirect remains the underlying mechanismindex.phpthat loads YOURLS (load-yourls.php) and uses YOURLS functions to resolve keywords. It's not a separate server — it's YOURLS running from the document root.htaccesslets YOURLS handle its own subdirectory (RewriteRule ^-/ - [L]) while routing everything else to the plugin handlerWhy not a separate frontend?
A standalone frontend (Next.js, static site, etc.) consuming the YOURLS API would be:
The plugin uses YOURLS as a platform, not just an API. The link page, the redirect, the 404, the admin — everything runs through the same PHP process, the same session, the same database. One system to maintain.