Results 1 to 2 of 2
-
10th Jan 2011, 04:47 PM #1OPMemberWebsite's:
droidrelease.co warezmalaysia.orgHow To Make Select All In BB Code
-
10th Jan 2011, 05:22 PM #2Member
1- Open the headinclude template and add in the end :
PHP Code:<script type="text/javascript">
function selectCode(a)
{
var e = a.parentNode.parentNode.getElementsByTagName('p')[0];
if (window.getSelection)
{
var s = window.getSelection();
if (s.setBaseAndExtent)
{
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
else
{
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
else if (document.getSelection)
{
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
else if (document.selection)
{
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
}
</script>
PHP Code:<div class="bbcode_container" >
<div class="bbcode_description" style="padding-bottom:2px">{vb:rawphrase code}: <a href="#" onclick="selectCode(this); return false;" style="font-size:11px">(Click Here to Select All)</a></div>
<pre class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']">style="height:<vb:if condition="$blockheight<$vboptions['codemaxlines']">{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2}<vb:else />{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>><p>{vb:raw code}</p></pre>
</div>
PHP Code:<div class="bbcode_container">
<div class="bbcode_description" style="padding-bottom:2px">{vb:rawphrase html_code}: <a href="#" onclick="selectCode(this); return false;" style="font-size:11px">(Click Here to Select All)</a></div>
<pre class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']"> style="height:<vb:if condition="$blockheight<=$vboptions['codemaxlines']">{vb:math {vb:math {vb:raw blockheight}+2}}*{vb:stylevar mid_fontSize}}<vb:else />{vb:math {vb:math {vb:raw blockheight}+1}*{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>><p>{vb:raw code}</p></pre>
</div>
PHP Code:<div class="bbcode_container">
<div class="bbcode_description" style="padding-bottom:2px">{vb:rawphrase php_code}: <a href="#" onclick="selectCode(this); return false;" style="font-size:11px">(Click Here to Select All)</a></div>
<div class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']">style="height:<vb:if condition="$blockheight<$vboptions['codemaxlines']">{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2}<vb:else />{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>><code><p>{vb:raw code}</p></code></div>
</div>
* If you want to add button instead of text :-
Open the bbcode_code template and find :
PHP Code:<a href="#" onclick="selectCode(this); return false;" style="font-size:11px">(Click Here to Select All)</a>
PHP Code:<a href="#" onclick="selectCode(this); return false;"><input type="button" value="Select All" /></a>
Done !!!Im sory for my english, i hope all users can understand me
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to make all my download links in a code box?
By jiefangjun in forum Webmaster DiscussionReplies: 2Last Post: 10th Apr 2012, 01:53 PM -
Make Links clickable in Code. in vBulletin 4.1.7
By Th3KiNG in forum vBulletinReplies: 2Last Post: 15th Nov 2011, 09:04 AM -
Pls ! Help me select building code forum (vBulletin - ipb - mybb) ????
By fileserve4u in forum Webmaster DiscussionReplies: 2Last Post: 14th Jul 2011, 03:11 PM -
Make Any Links Clickable in WordPress with One-Line Code
By ThreeNF in forum Webmaster ResourcesReplies: 8Last Post: 13th May 2011, 02:46 PM -
How to make clickable links in code
By SarMa in forum vBulletinReplies: 5Last Post: 28th Oct 2009, 01:10 PM
themaCreator - create posts from...
Version 3.18 released. Open older version (or...