Copy Links

A Flarum extension. Ever wanted to share a link to an interesting post or discussion? This extension adds 'Copy Link' controls to posts and discussions.

Installation

Use Bazaar or install manually with composer:

composer require askvortsov/flarum-copy-links

Updating

composer update askvortsov/flarum-copy-links

Links

    I guess that moving the button to the top of posts(if it is possible) is easier to use.😃

      • [deleted]

      @askvortsov another extension I just realised I can't do without. Thanks

      Hey wloot Littlegolden!

      That could work, although I'm not sure how intuitive it'd be to click the number to copy the link. Also, keep in mind some post numbers are skipped due to deleted posts, which would be confusing. As such, to make it clear, we'd have to have text that says "copy link" in the top right corner of every post, which, tbh, would add a lot of clutter and confusion.

        askvortsov Also, keep in mind some post numbers are skipped due to deleted posts, which would be confusing.

        But #?? is directly using the post number generated by Flarum, I think deleting of a post can't effect this.

        askvortsov As such, to make it clear, we'd have to have text that says "copy link" in the top right corner of every post

        It can be disigned into two switchable modes:

        1. Display by post number.
          • The post number will always be displayed, no matter whether the mouse is hover over the post.
        2. Display with the copy button.
          • The copy button will only appear when the mouse hover over the post.

          Littlegolden But #?? is directly using the post number generated by Flarum, I think deleting of a post can't effect this.

          It is generated by Flarum, but because it represents a permalink, if a post is deleted, it's number is not reassigned.

          I would be alright with adding a "copy link" button in the top right corner when someone hovers over a post.

            I keep forgetting that not having the ability to auto-copy post links by clicking on the post timestamp was either a bug or intended feature 😂

            But in any case, this extension makes things just easier 🙇

              askvortsov It is generated by Flarum, but because it represents a permalink, if a post is deleted, it's number is not reassigned.

              Just display the data-number value of each post, and display each data-number in the upper right corner.

              Users can infer whether there are posts deleted by data-number, so just use the original data-number value. I think using data-number will not be affected by the deletion....

              image.png

              askvortsov me neither...until I broke something one time and realized the damn thing was already broken on mobile...so I thought... đŸ€”

              Only problem is that on mobile, it just redirects you to the same discussion and the post to which you click the timestamp URL from đŸ€Ł it doesn't really let you copy and paste on mobile without the auto-redirect occuring and on desktop there isn't a nifty "copied to clipboard" feature 😱

              ENACT PHASE 2, SURPREME PR FEATURE FIX đŸŠč

                Ralkage it doesn't really let you copy and paste on mobile without the auto-redirect occuring

                Sorry, I didn't get this.
                You can do this, don't you?

                  robinodds yes, I can do that, but the point I was making is that on desktop, it lets you copy the link as if it were just text in a input box whereas on mobile, if you click on the textbox, it treats it as an actual link/redirect and some users (such as myself) would expect the same functionality as the desktop view 🙂

                  Might just be a mobile thing but I would have never guessed to long-press to get the context menu up without being so focused as to doing the normal copying text method on mobile đŸ€Ł good catch though!

                  Nonetheless, I like this extension because I enjoy finding new ways of doing things with my forum software 🙂 Thank you for this extension, @askvortsov đŸ€Ÿ

                  4 months later