Results 1 to 10 of 17
-
15th Oct 2009, 10:00 PM #1OPMember
Sellect All (code/Hack)?
I want to be able to do this in a forum :
Can anyone help me on this?
The "Select All" code, I know the Link Checker is from TubeNow witch ;I'll be installing soon as well.
Thanks in advance.PUMA Reviewed by PUMA on . Sellect All (code/Hack)? I want to be able to do this in a forum : http://www.besthostingforums.com/images/cdn/besthostingforums.com/2009/10/9s5nw5-1.png http://www.besthostingforums.com/images/cdn/besthostingforums.com/2009/10/sfhqp3-1.png Can anyone help me on this? The "Select All" code, I know the Link Checker is from TubeNow witch ;I'll be installing soon as well. Thanks in advance. Rating: 5
-
15th Oct 2009, 10:12 PM #2Member
phpBB code for the select all:
Code:<a href="#" onclick="selectCode(this); return false;">Select All</a>
Code:<script type="text/javascript"> <!-- 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(); } } //--> </script>
If you're going to use this, you'll need to modify the code a bit, or you can just create your own JS function, which would be easier/better than using phpBB's.
-
15th Oct 2009, 10:15 PM #3Member
you do realize we are in the vbulletin section right. or will the code also work in vbulletin?
-
15th Oct 2009, 10:57 PM #4Member
i use it on vbulletn
-
15th Oct 2009, 10:57 PM #5MemberWebsite's:
WareztheDDL.com GTFO.wsyou put that <script></script> in the header include template,
then add
<a href="#" onclick="selectCode(this); return false;">Select All</a>
where you want it.
-
17th Oct 2009, 04:49 PM #6OPMember
So, I put all that in my Header? ..Sorry, but I didn't understand
-
17th Oct 2009, 04:59 PM #7Member
create a new file something_select_all.js >paste all the code> upload to your server
edit header_include template and call that jsCoding Horror Fan
I don't read PM's frequently .
-
17th Oct 2009, 05:04 PM #8MemberWebsite's:
google.baYou can call it from SHOWTHREAD template.
Dont need it on index, etc.
-
31st Oct 2009, 04:44 PM #9MemberWebsite's:
CysForum.com 3tivi.com CysForum.infoDoes this actually work?
In the shadows of the warez scene since 2007...
-
15th Nov 2009, 03:19 PM #10Member
The code above didn't worked for me:
I used this:
Put this in your notepad and save it as selectall.js
Code:function selectCode(a) { var e = a.parentNode.parentNode.getElementsByTagName('PRE')[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(); }
Template Edits
================================================== ====
Edit:headerinclude:
Add:
Code:<script type="text/javascript" src="clientscript/selectall.js"></script>
Edit: bbcode_code
After:
PHP Code:$vbphrase[code]:
Code:<a href="#" onclick="selectCode(this); return false;">Select All</a>
Edit: bbcode_html
After:
PHP Code:$vbphrase[code]:
Code:<a href="#" onclick="selectCode(this); return false;">Select All</a>
Edit: bbcode_php
After:
PHP Code:$vbphrase[code]:
Code:<a href="#" onclick="selectCode(this); return false;">Select All</a>
Code:$code
Code:<pre>$code</pre>
Hope it was helpfull!
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Help With Letitbit Js To BB Code aka Embedding streaming code in forums
By JoomlaZ in forum Web Development AreaReplies: 1Last Post: 3rd Apr 2012, 09:50 AM -
Someone has tried to hack me. ;D
By M.D.House in forum General DiscussionReplies: 12Last Post: 16th Oct 2011, 02:06 PM -
Need a good coder to code a skin, I will show you what I need, you just code it
By Nickk96 in forum Web Development AreaReplies: 1Last Post: 27th Aug 2011, 01:45 PM -
is it hack??? pls help...
By subha86 in forum Webmaster DiscussionReplies: 13Last Post: 30th Nov 2010, 01:36 AM -
[vBulletin BB Code] Moderated Message: (Like W-BB's Staff BB Code!)
By Ghost Dog 13 in forum Webmaster ResourcesReplies: 13Last Post: 26th Sep 2009, 06:19 PM
themaLeecher - leech and manage...
Version 5.02 released. Open older version (or...