Emistry Posted November 10, 2011 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted November 10, 2011 (edited) erm..i got some little suggestion for the CODE / Quote Wrap features... hope you can consider this also in the future after you have done the rest important stuffs in Forum ^^ since from the past eA ( eAthena.ws ) there are alot users ( Include me ) alway posting the Script in CODE / CODEBOX Wrapping So, i was wondering could the Forum install a "Select All" Features ? which work to Copy all the Content inside a CODE / CODEBOX ? Here is a Picture so that i hope you all can understand what i am saying since my language is kinda poor..>.< The Select Button is used for Users to click on it and then all the Content in the CODEBOX will be copied just like what we do usually ( Highligh All and Copy ) but now it come to a more easier way... Edited November 10, 2011 by Emistry Link to comment Share on other sites More sharing options...
Z3R0 Posted November 10, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 10, 2011 agreed, Brian and I can look into it, if it doesn't exist as an add-on feature, we can probably code one ourselves... chances are, it's just a bit of javascript Link to comment Share on other sites More sharing options...
Mercurial Posted November 10, 2011 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 241 Reputation: 46 Joined: 11/08/11 Last Seen: January 5, 2019 Share Posted November 10, 2011 (edited) yep seems to be easy but how about copy all instead of select all since your gonna copy it all anyway just my opinion Edited November 10, 2011 by Mercurial Link to comment Share on other sites More sharing options...
Z3R0 Posted November 10, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 10, 2011 I would call it "Auto Copy" or "Copy to Clipboard" since that's what it's obviously going to do when you click it Link to comment Share on other sites More sharing options...
Ziu Posted November 10, 2011 Group: Members Topic Count: 178 Topics Per Day: 0.04 Content Count: 909 Reputation: 247 Joined: 11/08/11 Last Seen: Wednesday at 10:10 AM Share Posted November 10, 2011 (edited) I like the idea ..... Edited November 10, 2011 by Ziu Link to comment Share on other sites More sharing options...
Emistry Posted November 10, 2011 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Author Share Posted November 10, 2011 Yes..this features work just like what Z3R0 has mentioned.... all the content inside the CODEBOX / CODE will be Copied upon we click on the "Select" *and sorry for those other who didnt fully get my idea due to my poor explaination* Link to comment Share on other sites More sharing options...
Mystery Posted November 11, 2011 Group: Members Topic Count: 94 Topics Per Day: 0.02 Content Count: 2192 Reputation: 253 Joined: 11/11/11 Last Seen: June 24, 2020 Share Posted November 11, 2011 I don't believe a feature like that is already encoded into IPB's java script. I believe you're gonna have to manually add it =/ Link to comment Share on other sites More sharing options...
Z3R0 Posted November 11, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 11, 2011 Thats an easy javascript code hell i could write that tonight Link to comment Share on other sites More sharing options...
Mercurial Posted November 13, 2011 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 241 Reputation: 46 Joined: 11/08/11 Last Seen: January 5, 2019 Share Posted November 13, 2011 test Link to comment Share on other sites More sharing options...
Z3R0 Posted November 14, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 14, 2011 I'm currently in the process of attempting to create the code... apparently it does not like javascript very much but I am almost there I think Link to comment Share on other sites More sharing options...
Yuki Posted November 14, 2011 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 318 Reputation: 68 Joined: 11/13/11 Last Seen: October 29, 2017 Share Posted November 14, 2011 Awesome. This is a great and necessary suggestion to implement <3. Link to comment Share on other sites More sharing options...
Z3R0 Posted November 14, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 14, 2011 I have given the code to Brian for "Select All" the reason being is that "copy" apparently is a lot harder than it looks... Many people resort to using "Flash" which I do not want to do... I'll have to look into a library feature that may enable this... the ckeditor has it, but I have no earthly idea how to depict it's clipboard usage... I've tried Link to comment Share on other sites More sharing options...
KeyWorld Posted November 14, 2011 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted November 14, 2011 Yeah there is no clipboard stuff in javascript yet, you can select the text, but can't copy it. I know you can do it on IE and maybe on firefox/netscape with some privileges but that's all. There is a new HTML5 feature in progress to work with but it seems to be oncopy/onpaste/oncut event, nothing to setting data. The only cross-browser way as far I know is to use a plugin : flash or java or silverlight... Link to comment Share on other sites More sharing options...
Mercurial Posted November 14, 2011 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 241 Reputation: 46 Joined: 11/08/11 Last Seen: January 5, 2019 Share Posted November 14, 2011 (edited) yep, mostly use a flash / silverlight addon to do this , if anyone is interested start here : http://code.google.c.../zeroclipboard/ Edited November 14, 2011 by Mercurial Link to comment Share on other sites More sharing options...
Z3R0 Posted November 14, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 14, 2011 ya, I'm looking into integrating zeroclipboard into my own local version... apparently Brian attempted to install the information in the files and failed... lol Link to comment Share on other sites More sharing options...
Mercurial Posted November 14, 2011 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 241 Reputation: 46 Joined: 11/08/11 Last Seen: January 5, 2019 Share Posted November 14, 2011 I was wondering what javascript framework that IPB uses? jQuery , Prototype , Dojo? Link to comment Share on other sites More sharing options...
Z3R0 Posted November 14, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 14, 2011 a little bit of both, jquery and pure js I'm talking with JGuy right now, about getting ftp access to fix the files that brian accidently messed up lol Link to comment Share on other sites More sharing options...
KeyWorld Posted November 14, 2011 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted November 14, 2011 selectCode function isn't defined (missing included javascript file ?) You can try with this for moment: function selectCode(btn) { //Don't know why btn send (this) in arg ? var code = btn.parentNode.lastChild, range, selection; if (document.body.createTextRange) { range = document.body.createTextRange(); range.moveToElementText(code); range.select(); } else if (window.getSelection) { selection = window.getSelection(); if (selection.setBaseAndExtent) { selection.setBaseAndExtent(code, 0, code, 1); } else { range = document.createRange(); range.selectNodeContents(code); selection.removeAllRanges(); selection.addRange(range); } } } Link to comment Share on other sites More sharing options...
simplynice Posted November 14, 2011 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 128 Reputation: 4 Joined: 11/14/11 Last Seen: April 13, 2016 Share Posted November 14, 2011 (edited) I'd like to add this up if ever this has been made via javascript or w.e. not .swf. Darn, cant paste the html. Just CSS. Just to be suitable for this forum's theme. Preview: .button{ cursor: pointer; text-decoration: none; box-shadow:inset 0 1px 0 #528cbc; font: normal 11px/16px "lucida grande",tahoma,verdana,arial,sans-serif; color: #ffffff; font-weight: bold; border: 1px solid #316897; text-align: center; background: #416d9b; width: 120px; height: 28px; -moz-border-radius: 10px;-webkit-border-radius: 2px;border-radius: 2px;-khtml-border-radius: 2px;} .button:active { background:#2d5885;} Edited November 14, 2011 by simplynice Link to comment Share on other sites More sharing options...
GodLesZ Posted November 14, 2011 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 186 Reputation: 51 Joined: 11/14/11 Last Seen: January 21, 2015 Share Posted November 14, 2011 [...] You can try with this for moment[...] Confirmed, worked for me also in some private projects long time ago.It's a nice cross-browser solution for selecting the text in the node. Link to comment Share on other sites More sharing options...
Toshiro Posted November 14, 2011 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 106 Reputation: 29 Joined: 11/08/11 Last Seen: 4 hours ago Share Posted November 14, 2011 (edited) There's still one problem (that has also been on the other forums) once the select-all button works. The forum automatically converts tabs to spaces, so if you'd post an eA script (or anything else that relies on tabs), you still had to adjust the file to make it valid. This is (at least in the new forum versions) caused by the PrettyPrint javascript function the board uses. To remove the functionality that tabs are converted, the following piece needs to be removed from the http://eathena.sourc...ify/prettify.js file. http://toshiro.skylinero.net/eatab.txt (code piece linked, because.. well the tab would have been removed) Also right now there's a piece (lines 83, 92, 4251, 4260) of javascript that breaks the complete functionality of the javascript components of the board.http://eathena.sourc...ublic/js/ipb.js: s.addRange®; That's probably also the reason why the select-all-button is not working yet. Edited November 14, 2011 by Toshiro Link to comment Share on other sites More sharing options...
Z3R0 Posted November 14, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 14, 2011 I will take a look at preserving tabs... didn't realize it did that... (select text) works though Link to comment Share on other sites More sharing options...
Brian Posted November 14, 2011 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted November 14, 2011 Thanks Toshiro, I removed the line so tabs aren't converted to spaces. Should be updated in about 5 mins (because that's how long Varnish caches for). Link to comment Share on other sites More sharing options...
Z3R0 Posted November 14, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 14, 2011 Awesome! If anyone can make a nice button bg image or something for the button, I can get that modified current Link to comment Share on other sites More sharing options...
Recommended Posts