Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Link Tools 1.3.2
#1
Link Tools extracts the links (URLs) in posts made to your forum, and then provides you with three new features:
  1. 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.

  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 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.

[Image: preview_116662_1613785965_0994b70ad563fe...5ab03b.png]

[Image: preview_116662_1605018239_4a1e09d665486c...718b1c.png]

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.

GitHub Repository

https://github.com/mybbgroup/Link-tools

Collaboration and maintenance

Link Tools is a project of the unofficial MyBB Group.

Its MyBB Group thread is:

https://mybb.group/Thread-Link-Tools

Feel free to report bugs and issues there, on GitHub, or here on the community forums.
Reply
#2
Looks nice one.
Will it show dropmenu for search items as we type the letters?
Reply
#3
(2020-11-10, 04:54 AM)Dr_The_One Wrote: Looks nice one.

Thanks.

(2020-11-10, 04:54 AM)Dr_The_One Wrote: Will it show dropmenu for search items as we type the letters?

No - just like the default search, it doesn't support that.

Released version 1.0.1, with the following update:
  • Fixes a bug in which sometimes URLs were shown twice in warnings.
Reply
#4
Hi, there seems to be a major flaw, which doesn't seem to be caused by this plugin, but ultimately affects this plugin greatly.

When searching for URLs, MyBB adds a highlight input to the url of posts, resulting into something like:
https://community.mybb.com/thread-230118.html&highlight=https%3A%2F%2Fi.imgur.com%2FcJRh07J.png

Which turns into a 404 Not Found error because slashes are being added to the URL.

This doesn't happens if not using core SEO or Google SEO urls.

As far as the plugin goes, it seems to be working, at least I was able to find posts by link that I couldn't before installing it.

It seems like a useful plugin specially for forums where content is more important more than user interaction or other possible forum usages.

I will keep testing it on a 100k posts board to see how it works.
Reply
#5
Hey Omar,

Thanks for checking out the plugin and testing on your 100k-post board. Glad it's working for you so far.

Re the flaw you point out, I'm confused for a couple of reasons.

Firstly, I am confused because (1) the plugin deliberately sets the "keywords" search array entry to an empty string (on line 2685 of inc/plugins/linktools.php), such that the "highlight" query parameter should never be added to any results URLs for searches intercepted by the plugin (given lines 154-165 of search.php) but (2) the URL you use as an example *should* be intercepted by the plugin. Is it possible that you had temporarily deactivated the plugin when testing that search?

Before getting to the second bit of confusion, I think you've misdiagnosed the cause of the 404 error for the URL you provide: as best I can tell, the problem is that the ampersand should be a question mark. So, my second confusion is that I am not sure how this error has occurred, because it looks like you have core SEO enabled, and line 159 of search.php should correctly ensure a question mark rather than an ampersand.

Would be interested to know what you make of all that...
Reply
#6
Hi, I did test today and it seems the issue is no longer present.

I think it might be possible that once I did install the plugin this change (not to include the highlight parameter) was not included somehow at the begin, but after rebuilding the tables data (took a while) it works fine. Maybe it was something different, I won't be sure.

I will keep testing this further to see how it goes and give feedback when and if possible.

Quote:problem is that the ampersand should be a question mark

The URL in my last post was added by me to test if the same happened here and it did, but as you said it was my mistake so I can't guarantee the issue is present if using core SEO at all. I can only assure the issue appeared in my board where I use Google SEO at first, not more.

Regards and thank you for your contribution once again!
Reply
#7
As shared in the Link Highlighter Plugin thread, I've been working on adding link previews to Link Tools. I've just uploaded a bunch of commits to the Link Tools GitHub repository which do this. The current code is not quite ready for a development release, mostly because it's lacking documentation, but if you want to try it out, it should be functional. It probably shouldn't be used on a production site just yet though.

Additions to note:
  • New plugin settings related to link previews.
  • A new ACP module Configuration » Link Helpers. To enable/disable each helper, and install/uninstall its template. ("Link Helpers" are classes which generate link previews. Their name is subject to change though - arguably, "Link Previewers" would be more appropriate).
  • A new ACP Recount & Rebuild entry: Rebuild Link Previews for Link Tools.
If you've got any questions, feel free to ask. Comments, suggestions, criticism, bug reports, and other feedback welcome.
Reply
#8
I will try today and let you know, good job! It was faster that I expected! Thank you!
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#9
Hi, how does it handle updates? If not so messy I could try in my live (but no users) forum.
Reply
#10
Updates are handled via the usual procedure of deactivate, update files, reactivate - hopefully it's a smooth and not-at-all-messy procedure. I'd be grateful if you did manage to give it a try on your live forum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)