Need help Moving slect conent button
4 posters
Page 1 of 1
Need help Moving slect conent button
So i followed this tutorial here
https://help.forumotion.com/t93456-select-content-button
but the only issue is that the select content button is right next the the word code how can i move it (see pic to see where i want it moved)
Can some one help me do that please and thank you!
Forum type is Phbb2
https://help.forumotion.com/t93456-select-content-button
but the only issue is that the select content button is right next the the word code how can i move it (see pic to see where i want it moved)
Can some one help me do that please and thank you!
Forum type is Phbb2
Last edited by Sir. Mayo on August 20th 2013, 9:35 pm; edited 1 time in total
Re: Need help Moving slect conent button
Hi Sir. Mayo,
Try this in your CSS and see if it works:
Try this in your CSS and see if it works:
- Code:
.code-a{
float:right;
}
Re: Need help Moving slect conent button
Nope nothing i installed it VIA Java script so yea i mean i tried lots of differnet things in CSS but nothing SO thanks but its not working :(BASE is the one who made the Tutorial so maybe he knows IDK though!
Re: Need help Moving slect conent button
- Code:
.code-a {
float: right !important;
}
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Need help Moving slect conent button
Since that doesn't work for you I've gone ahead and did what the support forum did; utilize dashes(-) to separate.
Edit the color and amount of dashes to fit what you want.
<font style="color:transparent;">----------</font> (its near the bottom of the script)
- Code:
function selectCode(a)
{
// Get ID of code block
var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
// Not IE
if (window.getSelection)
{
var s = window.getSelection();
// Safari
if (s.setBaseAndExtent)
{
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
// Firefox and Opera
else
{
// workaround for bug # 42885
if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
{
e.innerHTML = e.innerHTML + ' ';
}
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
// Some older browsers
else if (document.getSelection)
{
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
// IE
else if (document.selection)
{
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
}
if(text){}else{ var text = 'Selecionar todos';}
jQuery(document).ready(function(){
jQuery("dl.codebox dt").not("dl.spoiler > dt").html('Code: <font style="color:transparent;">----------</font><a href="#" onclick="selectCode(this); return false;" title="Select all the content" class="code-a"> Select Content </a>');
});
Edit the color and amount of dashes to fit what you want.
<font style="color:transparent;">----------</font> (its near the bottom of the script)
Re: Need help Moving slect conent button
Seth your code did not work but i read over it and the one in the tutorial and came up with this one that does the trick:
i changed the font color to transparent then added the dashed like they where in your Code thanks everyone! SOLVED
- Code:
function selectCode(a)
{
// Get ID of code block
var e = jQuery(a).closest('tr').next().find('.cont_code')[0];
// Not IE
if (window.getSelection)
{
var s = window.getSelection();
// Safari
if (s.setBaseAndExtent)
{
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
// Firefox and Opera
else
{
// workaround for bug # 42885
if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
{
e.innerHTML = e.innerHTML + ' ';
}
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
// Some older browsers
else if (document.getSelection)
{
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
// IE
else if (document.selection)
{
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
}
jQuery(function(){
jQuery('div.postbody td.code').parent().prev().find('b').html('Code:
<a href="javascript:void()" onClick="selectCode(this)"><font
face="verdana" color="transparent">---------------</font>Select Content </a>');
});
i changed the font color to transparent then added the dashed like they where in your Code thanks everyone! SOLVED
Re: Need help Moving slect conent button
Ah, okay you're welcome. You might want to place the dashes before <a> so they will not be underlined when you hover over select if you want.
Similar topics
» "Do not display again button" how to re enable(without clear cache) or use it just as a close button...?
» Banner is moving with pressing a button
» Drop Box - Jump to: Slect a forum
» Announcment, Expand forum button, Custom like button, Hover over image
» Adding a reply button next to the quote button to automatically tag users?
» Banner is moving with pressing a button
» Drop Box - Jump to: Slect a forum
» Announcment, Expand forum button, Custom like button, Hover over image
» Adding a reply button next to the quote button to automatically tag users?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum