by TheCrow October 25th 2019, 11:53 am
Hello
@Amadeus,
This is the easiest way to do this without going in the templates. Even though your forum is
#phpbb2 and it's usually difficult to code your way out of this version of forum, here's what you can do:
Create one javascript, placed
In the topics only:
- Code:
// CREATION OF THE BUTTON NEXT TO THE TITLE
$(function(){
$('<input type="text" value="" id="myInput" style="position:Fixed;top:-40px"><button id="copyButton" onclick="myFunction()">Copy Link</button>').insertAfter('.cattitle:eq(0)');
});
Then you have to create an other javascript placed again
In the topics only using this code:
- Code:
//FUNCTION FOR THE COPYING OF THE URL OF THE TOPIC
function myFunction() {
var copyText = document.getElementById('myInput'),
buttonToCopy = document.getElementById('copyButton');
copyText.value=location.href;
copyText.select();
copyText.setSelectionRange(0, 99999)
document.execCommand("copy");
buttonToCopy.innerText = "Copied";
}
This should do what you are wanting to do.
Regards,
TC.