Mini-Me 24 Report post Posted September 2, 2009 (edited) Hi guys, I was a bit bored some time ago and started a Greasemonkey script that changes some things here at the board to my preferences and just decided to share it with you. So what does this all do now? I think "images say more than words", so here they are with some explanations: This part will hide the - to my mind - unneeded buttons next to the text entry field of the shoutbox and enlarges the textfield to nearly fill the whole row. The link to the SpillOver is back with links to the old (probably unknown) archives. These four links appear in an own section that also is collapsible and remembers its state. As a next step I took a look at the Lo-Fi link and decided to move it where it also is in IP.B 3, as a new skin in the skinselector. Also I added a neat function there, that converts all links to topics and forums to be displayed in a new tab in Lo-Fi style, I added that 'cause it is quite useful for my slow Laptop. Finally I got annoyed by the empty cells in the profile information next to each post and removed them. Hiding these rows when there is no content (or the one you see in the image) in them. Last thing is that I added a link to my TableCreator in style of the BBcodes buttons, look closely at this picture and compare : So that you read all this information, I think you already forgot again why I posted all this stuff, well, I want to share it with you, so that you can use it if you want, to enhance your experience on the forums . So what do you need to run this? > Not a lot, only Greasemonkey. Oh and since Greasemonkey is a plugin for FireFox, you'll also need this. > Alternatively you can use Google Chrome/Chromium, as they support embedding such scripts whereas the special Greasemonkey functions (GM_*) are not supported. I avoided this by defining own functions for them, if they aren't already. Now having fulfilled these requirements, simply click the following button and confirm: Finally, to customize the settings, I have coded a control panel: Go to the UCP of the board, e.g. by using the "My Controls" link, scroll the page down till you find "Options" and in this category click on "Board customization settings". There you can turn on and off what you want. Finally click the save button. I am open to add new things or fix any bug I've built in, so give me your suggestions . Changelog: Legend: [+] Added feature, [-] Removed feature, [*] Fixed bug v1.0 01-09-2009: (Initial release) - [+] Enlarging textarea and removing buttons from shoutbox - [+] Moving SpillOver to a new section with other links - [-] Toggle show/hide from new section, was causing too much probblems - [+] Changing selection of the Lo-Fi version - [+] Remove empty profile cells on topic view v1.1 03-09-2009: - [*] Disabling adding the new section when answering in a topic - [+] Hiding birthday and calender notice when "empty". v1.2 17-11-2009: - [+] Added a settings page to make configuration easier - [+] Stress the "New Messages" link (idea from IPB 1.x). - [+] Add a link to my Table-Creator when posting - [*] Adding the new sections reverted to old idea; They now appear under the SpillOver link (fixes: ShoutBox been rendered useless after addition at the bottom) - [*] Adding the Lo-Fi links to the Skin Selector wont overwrite other skins, (if any, Admin feature ) v1.3 19-11-2009: - [+] possibility to change link targets - [*] one of many possible cases in that the link to the settings does not appear v1.4 23-02-2010: - [*] wrong usage of string.match(); function - [*] Went back to old style of adding the new section but with a new hopefully bugfree method - [*] further code optimizations v1.5 23-02-2010: - [+] Script made compatible with Google Chrome/Chromium - [*] Further optimizations to size down some parts v1.6 27-02-2010: - [+] function to add sounds to the TCs (Chrome seems to be too slow with loading sound & plugin, it takes more than the two seconds you stay at the "turning on/off" site, so there probably wont be sounds) - [*] a probable error came up when using !unsafeWindow to check if it is defined - [*] Yet again I optimized some parts, to remove repetitive code v1.7 07-03-2010: - [+] Emoticons in the shoutbox can now be parsed, regardless to the administrator's settings Big thanks to RG for listing up all smilies tokens plus their respective image filenames - [*] a bug came up when the messages link wasn't the sixth in the userbar row v1.8 07-03-2010: - [+] shouted Links can automatically be parsed - [*] it was checked if unsafeWindow existed before checking if unsafeWindow.shoutbox.emoticon_url also is, but the step unsafeWindow.shoutbox was forgotten - [*] other optimizations that removed the limitation to the hostname www.bttfhillvalley.co.uk Edited March 7, 2010 by Mini-Me Updated! Share this post Link to post Share on other sites
♠Grim♂ Reaper 1666◙ 17 Report post Posted September 3, 2009 i like this makes it eaiser for me to get around the board. Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted September 3, 2009 Lol, this is how it looks on the forum frontpage when the board pops an error: It once says undefined 'cause it can't read the info for the spillover and once 'cause it's missing the code that comes after where it normally gets inserted. This won't happen anymore in the next update. Updated, was random and wrote a changelog for fun xD. Waiting for suggestions . EDIT: Just discovered that the shoutbox doesn't work properly anymore when you choose to enable the new sections, I forgot that this happens when I re-write its HTML codes (not changing anything of them) what the mentioned part (not the part for shoutbox itself xD) does... Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted November 17, 2009 Finally again updated! See the first post for further information, especially the changelog . EDIT: Fixed a mistake I did relating to the shoutbox (that is disabled atm) as well as the spillover now also will need to be added. Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted November 19, 2009 Yet an other update. The archives and the link to the SpillOver will be placed under the Off Topic section now, also there is a new setting available now, that allows you to set how links shall be opened, possible settings are: - Open all external links (links that do not guide to a sub site of "http://www.bttfhillvalley.co.uk/") in a new window/tab - Open all links in the same window - Leave links untouched. Also I noticed that there are other ways to reach the UCP, e.g. the Message link (act=Msg), so I added this. Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted February 23, 2010 Updated! With this update I fixed my "wrong" usage of the string.replace(); function (it is more liked to use // as delimiters than ''), again changed the way how the 4 external links are added and did other code optimizations. I would have waited for more ideas to come into my mind, but as Ashley reported a bug that maybe occurs due to the mentioned wrong usage of the string.replace(); function, I decided to upload this updated script. Enjoy . Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted February 23, 2010 Time for an other update today . This time I made the whole thing Google Chrome/Chromium compatible by adding own functions for these (using cookies) if they're undefined. Also, I Have fun with it, and please report bugs you might encounter . Share this post Link to post Share on other sites
Orgcon 11 Report post Posted February 23, 2010 Whats all that about 'Board customisation settings'? It doesn't exist in mine! Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted February 23, 2010 Probably because you don't have the userscript installed ? Imagine them as lightweight addons/extensions that only come with Java-Script. Share this post Link to post Share on other sites
Orgcon 11 Report post Posted February 24, 2010 Wha? O_o What userscript would that be? Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted February 24, 2010 Read the first post? The one I'm talking about all the time . Can be installed clicking the install button, if you fulfill the requirements. Share this post Link to post Share on other sites
Orgcon 11 Report post Posted February 24, 2010 I've had the GM script for the past 6 months + updates, where have you been? I was the one who reqested highlighted hyperlinks! 'Board customisation settings' does not work for me! Share this post Link to post Share on other sites
♠Grim♂ Reaper 1666◙ 17 Report post Posted February 24, 2010 nor me Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted February 24, 2010 Oh, I'm sorry then . So the following link doesn't work (ergo ir brings you to the UCP index with "Welcome to your control panel", "Recently Read Topics" and "Your personal note pad"a.s.o.)? http://www.bttfhillvalley.co.uk/forum/inde...amp;CODE=custom It should sit under Change Password in Options titled with "Board customization settings". Share this post Link to post Share on other sites
♠Grim♂ Reaper 1666◙ 17 Report post Posted February 24, 2010 theres nothing under change password Share this post Link to post Share on other sites
Ashley+ 0 Report post Posted February 24, 2010 nope nothing Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted February 27, 2010 Ok, please try this now. See first post for changes. Share this post Link to post Share on other sites
Orgcon 11 Report post Posted February 27, 2010 Still nothing :/ Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted February 27, 2010 How can that be . Is there any error in the (JavaScript) Error console (Tools->Console)? What is the link you have opened when you're in the UCP (please post the full link)? Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted March 6, 2010 The errors are undefined 'userlinks', 'p' and 'a' line 198 theres also this one Error: uncaught exception: [Exception... "The container of an boundary-point of a range is being set to either a node of an invalid type or a node with an ancestor of an invalid type." code: "2" nsresult: "0x805c0002 (NS_ERROR_DOM_RANGE_INVALID_NODE_TYPE_ERR)" location: "chrome://google-toolbar-lib/content/toolbar.js Line: 1974"] theres many of the one I said first; Error: document.getElementById("userlinks").getElementsByTagName("p")[1].getElementsByTagName("a")[5] is undefined Source File: file:///C:/Documents%20and%20Settings/Chris/Application%20Data/Mozilla/Firefox/Profiles/t0d2cbjk.default/gm_scripts/bttfhillvalley_forum_goo/bttfhillvalley_forum_goo.user.js Line: 198 Theres a third one too;Error: [Exception... "'' when calling method: [nsIContentHandler::handleContent]" nsresult: "0x805d0001 ()" location: "" data: no] Thats all of them I cleared the error list then clicked on 'my controls' and I got the line 198 error. First and third should be fixed in my next upload, thanks for the reporting . The second and fourth is something that's wrong with google's toolbar... Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted March 6, 2010 Thanks to Orgcon who has helped me with fixing a bug by posting error messages, and thanks to RG by listing up all emoticons we currently have installed (which I was too lazy to), I can release a new version right now. So many thanks to these to. For changes, please see the first post. Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted March 7, 2010 chrome-extension://jbcboinhkbjinjffeclekacabnjjhmbi/script.js:186 Uncaught TypeError: Cannot read property 'emoticon_url' of undefined Hm, looks as if that version of Chrome knows unsafeWindow, since it wouldn't to line 186 otherwise. But still it fails to read that property, what FF/GreaseMonkey doesn't. Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted March 7, 2010 That's because window/unsafeWindow (which are the same in Chrome) don't seem to have any children variables. I uploaded a fix for that, but don't call it a new version as RG most likely is the only one who is affected and because it's just a minor mistake. Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted March 7, 2010 OK, as I have a new smaller feature, I decided it's time for a real update. You now can choose whether to automatically parse links in the shoutbox. Share this post Link to post Share on other sites