Link Tools

by Laird 5 Stars 711 Downloads

Keeps track of links (URLs) in posts and provides nine link-related features.

Project Details

Link Tools extracts the links (URLs) in posts made to your forum, and then provides you with nine new features:
  1. Link previews. A preview box is generated for each link in a post, just below the paragraph in which the link occurs. Different types of preview can be generated for different sites/content, as supported by a customisable Link Previewer framework.

  2. Seamless link searching. Just type a link (URL) into the default field ("Keyword") of the standard MyBB search form and Link Tools will intercept the search and provide accurate results: only posts which contain the link or its equivalent will be listed. The default MyBB search when set to Full Text does not handle links at all well and typically returns results completely unrelated to the link for which you searched.

  3. A duplicate link warner. When a member is starting a new thread, s/he will be warned if any links (URLs) that s/he includes in the thread-starter have already been posted to the board. This feature is especially useful when your board is heavily resource-based and there is a risk of members starting duplicate discussions about resources (links and videos) that have already been discussed.

  4. Link limiting. This allows for limiting of the number of links that may be posted by each member in each of a given set of usergroups in a given set of forums over a given (rolling) period. The administrative interface is at Forums & Posts ยป Link Posting Limits, and supports in-page editing, deletion, and addition of limit rules.

  5. Link posting moderation. Admins can set forum and usergroup permissions such that new posts containing a link and/or existing posts into which a new link is edited are subjected to moderation.

  6. Anti-link spam protection. Admins can classify links as spam, and set an action to occur when a spam link is posted under qualifying conditions. The possible actions in increasing order of severity are to moderate the post, delete the post, and purge the link spammer either by a ban or deletion. The qualifying conditions relate to usergroup, account age, post count, and submission type (new post, edited post, or either).

  7. Automatic spam classification of links. When posts or threads are deleted via the moderation queue, either in the ModCP or ACP, and when a spammer is purged, the moderator/admin can choose to have any links in the deleted posts/threads auto-classified as spam.

  8. Link listing. Admins can view all links in the database. The listing can be filtered by spam classification, and searched by (partial) link. Links can individually or en masse be (re)classified as spam or not spam.

  9. Link importing. Admins can import links into the database as plain text with one link per line, having them classified as spam (or not spam). This feature is expected to be most used for importing spam links for use by the anti-link spam protection functionality described above.
Link Tools considers to be a link anything that MyBB core also considers to be a link:
  1. The URLs in url tags.

  2. The URLs in video tags.

  3. Bare URLs: those beginning with http://, https://, ftp://, ftp., and www..
Link Tools handles all of the different ways in which two links can look different but be the same (resolve to the same page):
  1. When they are the same except for their protocol: http:// versus https://.

  2. When one has a www. prefix and the other does not.

  3. When they have the same query parameters but in a different order.

  4. When one has a redundant query parameter - e.g., the fbclid query parameter added by Facebook - and the other does not.

  5. When their domains are capitalised differently.

  6. When one redirects (potentially via multiple redirects) to the other, e.g., when a URL shortening service like https://bitly.com/ is used to create a short URL which redirects to the target URL.

  7. When both redirect (potentially via multiple redirects) to the same final link, e.g., when two different "shortened" URLs redirect to the same target URL.
Note that the redirects recognised by Link Tools are: HTTP redirects, HTML meta tag redirects, and "canonical" HTML link tags.

The first five differences are eliminated via "normalisation" of URLs.

The final two are eliminated by querying the URLs until the terminating URL is found. This is done using the cURL PHP functions.

Requirements
Licence

Link Tools is licensed under the GPL version 3.

Installing
  1. Download. Download an archive of the plugin's files.

  2. Copy files. Extract the files in that archive to a temporary location, and then copy the files in "root" into the root of your MyBB installation. That is to say that "root/linktools.php" should be copied to your MyBB root directory, "root/inc/languages/english/linktools.lang.php" should be copied to your MyBB root's "inc/languages/english/" directory, etc.

  3. Install via the ACP. In a web browser, open the "Plugins" module in the ACP of your MyBB installation. You should see "Link Tools" under "Inactive Plugins". Click "Install & Activate" next to it. You should then see the plugin listed under "Active Plugins" on the reloaded page.

  4. Extract links from existing posts, if any. In the plugin's listing, if your board contains any posts, you will see a warning prompt to run link extraction on those posts. Click the "here" button (styled as a plain text link) to do this.

  5. Resolve terminating redirects for extracted links, if any. Return to the plugin's listing, and if any links were extracted in the last step, you will see a warning prompt to run terminating link resolution on them. Again, click the "here" button (again, styled as a plain text link) to do this.
Optionally, you may then want to configure settings (by navigating in the ACP to "Settings" -> "Plugin Settings" -> "Link Tools Settings"), and/or edit the plugin's templates and/or its stylesheet.

Upgrading
  1. Deactivate. In a web browser, open the "Plugins" module in the ACP of your MyBB installation and click "Deactivate" beside the "Link Tools" plugin.

  2. Download and Copy files. As in steps one and two for installing above.

  3. Reactivate. As for step one but clicking "Activate" rather than "Deactivate".
This will maintain any settings and template changes that you've made, although if you've made template changes, you may after upgrading need to navigate in the ACP to "Templates & Style" -> "Templates" -> "Find Updated Templates" to properly integrate/update this plugin's templates.

Previews