Ctrl Copy pulls Source BBCode

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Fischmaster
Registered User
Posts: 3
Joined: Sun Dec 03, 2023 11:22 am

Ctrl Copy pulls Source BBCode

Post by Fischmaster »

Hi all, sorry if this is the wrong forum but I wasn't sure where it fits.

Is there a setting that allows you to copy a reply without using quote/edit?

for example:

Image

I mark and Ctrl+C the image and instead of having "image" in the clipboard I have the following code clipped:

[img]https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg[/img]

Thanks a lot.
Last edited by Mick on Tue Dec 05, 2023 12:37 pm, edited 1 time in total.
Reason: Solved.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Ctrl Copy pulls Source BBCode

Post by Brf »

No. The source bbcode does not exist in the webpage. How would your webbrowser copy it?
Fischmaster
Registered User
Posts: 3
Joined: Sun Dec 03, 2023 11:22 am

Re: Ctrl Copy pulls Source BBCode

Post by Fischmaster »

Maybe Source Code is the wrong wording, I mean the content of the post, which I can see if I quote it etc.

I know phpBB boards where this works - Example: (removed)

I can mark the jersey and I have the following in my clipboard:

[img]https://cdn.discordapp.com/attachments/606064106403004416/1053018878428581918/ast_minimaillot.png[/img]

Whereas if I mark and Copy the image in my OP I jsut have "Image"
Last edited by Fischmaster on Tue Dec 05, 2023 9:02 am, edited 3 times in total.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Ctrl Copy pulls Source BBCode

Post by Brf »

I see. That board has an extension that is putting the bbcode text into the image's "Alt" tag.
Fischmaster
Registered User
Posts: 3
Joined: Sun Dec 03, 2023 11:22 am

Re: Ctrl Copy pulls Source BBCode

Post by Fischmaster »

Ah, that's how that works. Thanks a lot! Will look into that.
Fischmaster
Registered User
Posts: 3
Joined: Sun Dec 03, 2023 11:22 am

Re: Ctrl Copy pulls Source BBCode

Post by Fischmaster »

Thanks again for the pointer - loving how even as a beginner I am able to host a Forum and learn a bunch of stuff along the way.

And this is how I solved it, in case anybody finds this topic in the future:

Using my custom style I go to /template/bbcode.html

Line 76 - I changed it to the following:
<!-- BEGIN img --><img src="{URL}" class="postimage" alt="[img]{URL}[/img]" /><!-- END img -->

Now we can quickly copy+paste images as the alt-text to the clipboard is the img BBCode.
A great small QoL improvement for our closed RP community :)

Return to “[3.3.x] Support Forum”