Current time: 28-03-2024, 07:29 PM
Hello There, Guest!
Login 
  • Search
  • Link Tools


    MyBB Group Developer
    #1
    Link Tools
    Extracts the links (URLs) in posts made to a forum, and then provides link previews, seamless link searching, a duplicate link warner, and link limiting

    Compatibility
    • MyBB 1.8.x.
    Requirements Features
    • Link previews. A preview box at the bottom of the post is generated for each link in a post. Different types of preview can be generated for different sites/content, as supported by a customisable Link Previewer framework.
    • 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.
    • 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.
    • 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.
     What qualifies as a link?

    Link tools considers to be a link anything that MyBB core also considers to be a link:
    • The URLs in url tags.
    • The URLs in video tags.
    • Bare URLs: those beginning with http://, https://, ftp://, ftp., and www..
    How are links determined to be identical?

    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.

    Licence
    • GPL3.
    Installing, upgrading, and customising

    Please see the plugin's README.md.

    GitHub Repository Link MyBB Extend Page Link (Download Here)
    1 user Likes Laird's post
    Like Reply
    Junior Member
    #2
    Thank you for this great plugin! I did find a small bug in the latest version 1.1.0 (dev) which causes the code below to become visible on the page.  Everything seems to function correctly still but I suspect it could cause a larger problem than what I am seeing...
     
    ';
    
    [Image: tRL3CdD.jpg]
    1 user Likes srjrol's post
    Like Reply
    MyBB Group Developer
    #3
    (09-03-2021, 05:42 PM)srjrol Wrote: Thank you for this great plugin!

    Glad you like it!
    (09-03-2021, 05:42 PM)srjrol Wrote: I did find a small bug in the latest version 1.1.0 (dev) which causes the code below to become visible on the page.  Everything seems to function correctly still but I suspect it could cause a larger problem than what I am seeing...
    ';
    

    Confirmed and fixed in dev code. Thank you for the bug report! (It shouldn't cause any other problems or side-effects, but in any case, the next release isn't far off).
    Like Reply
    MyBB Group Developer
    #4
    (10-03-2021, 06:20 AM)Laird Wrote: the next release isn't far off

    And it's now here. Changelog / release notes for version 1.2.0:
    • Support different themes by caching preview data, not the preview itself.
    • Bug fix: disabling previewers had no effect.
    • Bug fix: set preview to empty on unresolved previewer.
    • Bug fix: previewers weren't being auto-enabled on install/upgrade.
    • Bug fix: add the missing "Disable link previews" checkbox to new thread / reply pages.
    • Bug fix: only show the "Regenerate preview" links at the bottom of posts for links for which a preview is valid.
    • Bug fix: add a missing hook for post merges.
    • Bug fix: remove extraneous `';' from "new thread" output (thanks to srjrol for the bug report).
    • Improve handling on curl error.
    • Document the possibility of debugging via the supplied lkt-curl-functionality-checker.php script.

    N.B. Your inc/plugins/linktools/link-helpers-dist and inc/plugins/linktools/link-helpers-3rd-party directories, if any, can safely be removed. They have been superseded, respectively, by the inc/plugins/linktools/link-previewers-dist and inc/plugins/linktools/link-previewers-3rd-party directories.

    N.B.2. You should rebuild link previews by running the Recount & Rebuild task "Rebuild Link Previews for Link Tools" given that preview data rather than previews are now cached (see the first entry in the list above).
    Like Reply
    MyBB Group Developer
    #5
    Released version 1.3.0 with the following new features:
    • Show each preview immediately after the paragraph in which it occurs, rather than showing all previews at the end of the post.
    • New setting: exclude previews for url tags enclosing img tags (for when the image is preview enough).
    • New styling: prevent title and summary text from wrapping.

    Thank you to @vk_knight for your testing and feedback.
    1 user Likes Laird's post
    Like Reply
    MyBB Group Developer
    #6
    Released version 1.3.2 with the following features and fixes:
    • Adds two new settings, to enable link previews per forum, and to enable them for first post, replies, or both (all posts).
    • Improves link preview compatibility with other plugins which call the parser (with thanks to Omar G. for identifying the compatibility issue).
    • Adds support for configuring extra cURL options.
    • Adds global $mybb and $post variables for use in (customised) preview templates.
    • Improves detection of Twitter status URLs in the Previewer.
    • Improves the language and output of the cURL functionality checker script.
    • Fixes a MyBBFancyBox compatibility issue.
    Upgrade procedure: deactivate-copyfiles-reactive.
    Like Reply
    Junior Member
    #7
    Thanks for this plugin, please how do i fixed the error on attachment?

    Attached Files
    Thumbnail(s)
       
    Like Reply
    MyBB Group Developer
    #8
    (12-07-2021, 05:31 AM)The pwince Wrote: Thanks for this plugin, please how do i fixed the error on attachment?

    The best way is to upgrade to PHP 7.

    If you can't do that, simply commenting out or removing the function return type on that line might work OK, but I haven't tested it. If you comment it out, the line will end up looking like this:
        public static function get_instance()/*: LinkPreviewer*/ {
    
    Like Reply
    MyBB Group Developer
    #9
    Released version 1.3.4 with the following improvements:
    • Bugfix: avoids a database error on installation when STRICT_TRANS_TABLES is present in the database's sql_mode setting.
    • Bugfix: the duplicate link warner's extended warning box showed the same value for url2 in the "url as url2" message for a post even when "url" occurred multiple times in the post as different "url2"s.
    • Bugfix: the invalidation ACP tool wasn't ignoring missing previewers.
    • Improves support for PHP 8 and fixes various related issues.
    • Adds missing Peekers to the plugin's settings (hides settings dependent on the value of other settings).
    • Improves the code and comments in a variety of ways mostly invisible to end-users.
    Like Reply
    MyBB Group Developer
    #10
    Released version 1.4.0 with the following new feature:
    • Adds link limiting support. This allows for limiting of the number of links that may be posted by members of a given set of usergroups in a given set of forums over a given (rolling) period.
    Like Reply