A simple plugin to refetch poorly defined titles in YOURLS
Sometimes YOURLS does not fetch the title of a url that is being processed, this happens frequently when using the api with certain 3rd party applications (which need attention from their developers). When this occures YOURLS uses the url itself as the title in the databse, which is less than desireable.
Also, sometimes a website will update the title of an article or post. When displaying a preview page it would be desireable to have the most up-to-date titles of pages on display.
This plugin adds a new
key->value pair to
action=shorturl, and if it is present will check the title of the new link and attempt to repair it if it is malformed.
title-refetch folder in this repo into the
YOURLS/user/plugins/ directory and enable it in the admin interface.
- Send the
refetch=truealong with a typical API shorturl call. Ex:
- This plugin also creates a new api action:
action=refetchwhich will trigger a refetch check according to one of the following required conditions:
target=titlewhich will check a single link and requires
shorturl=EX. The short url can be a keyword or a full short url.
target=title-forceskips the malformed url check and just looks for an updated title. Requires
target=allwhich will run a check on the entire database and requires a valid log in (eg. signature or user/pass)
- There is an action button in the admin section to force-update single links at a a time.
Note: This button is filtered by AuthMgrPlus with the
EditURLcapability, if installed.
While this doesn't cause the developers of third party applications to give attetnion to their code, it does make integration more flexible and provides an immediate working solution on YOURLS's end, akin to the api-concurrence-fix plugin.