Page 3 of 4

Posted: Wed Aug 09, 2006 3:27 pm
by Weirdan
Firefox users know that using emoticons buttons on the posting.php page will add the required emoticon to the end of the textarea. This script fixes this annoying behavior (emoticons will be inserted in the current caret position)

Code: Select all

 /*Copyright (c) 2006, Bruce WeirdanAll rights reserved. Redistribution and use in source and binary forms,with or without modification, are permitted providedthat the following conditions are met:     * Redistributions of source code must retain theabove copyright notice, this list of conditions andthe following disclaimer.    * Redistributions in binary form must reproducethe above copyright notice, this list of conditionsand the following disclaimer in the documentationand/or other materials provided with the distribution.    * The name of the copyright holder may NOT be usedto endorse or promote products derived from thissoftware without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ANDCONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIEDWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR APARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALLTHE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OFUSE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHERIN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDINGNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THEUSE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE.*/ // ==UserScript==// @name           PHPBB Fix Smilies// @namespace      tag:weirdan@gmail.com,2005:greasemonkey#phpbb.fixsmilies// @description    fix smilies for phpbb in Fx// @include        *posting.php?mode=*// @exclude        *posting.php?mode=topicreview*// ==/UserScript== function storeGMCaret() {    textarea.setAttribute('GM_caretPos', textarea.selectionStart);};var textarea = document.getElementsByName('message')[0]; textarea.addEventListener('click', storeGMCaret, false); textarea.addEventListener('keyup', storeGMCaret, false); textarea.addEventListener('select', storeGMCaret, false);  unsafeWindow.emoticon = function(text) {    textarea.value = textarea.value.substr(0, textarea.getAttribute('GM_caretPos')) + text + textarea.value.substr(textarea.getAttribute('GM_caretPos'));    textarea.selectionStart = textarea.selectionEnd = (parseInt(textarea.getAttribute('GM_caretPos')) + text.length);    storeGMCaret();    textarea.focus();} 

Posted: Wed Sep 20, 2006 7:05 pm
by Ambush Commander
There's an annoying little bug with Quick Reply: it doesn't set automatic notification on when you post a topic even if it's set in your preference: i.e. it's missing an input field. Not sure how to fix: I tried manually injecting the field but it just broke the button. Alas alas.

Posted: Thu Sep 21, 2006 3:11 am
by Weirdan
I tried manually injecting the field but it just broke the button. Alas alas.
I'll try to hack something around to make that possible.

Posted: Wed Jan 17, 2007 2:57 pm
by Ollie Saunders
Is it possible to have RTM-ize for quick reply :P or is that asking too much?

Show/hide forums/sections

Posted: Thu Oct 25, 2007 5:51 pm
by VladSun
My ugly coded Greasemonkey script (but still useful for me):
http://ipclassify.relef.net/scripts/fil ... rk.user.js

It permits you to hide particular sections of this forum. After installing the script, a "Forum filter" link will appear on the center/top of the main page.
Click on it, then check/uncheck the forums you want to be visible/invisible, then click the link again. Voila! :)

Status: It work's for me (c)

Posted: Sat Oct 27, 2007 8:00 am
by VladSun
One single download?!? ... :( I thought it would be useful

PS: Thank you "Waldorf Maryland, US" ;)

Posted: Sat Oct 27, 2007 8:26 am
by feyd
VladSun wrote:One single download?!? ... :( I thought it would be useful

PS: Thank you "Waldorf Maryland, US" ;)
Considering each script is large in its own right and they each tackle different things, I doubt we'll combine them.

Re: DevNetworks useful Greasemonkey Scripts

Posted: Tue Jun 30, 2009 12:42 am
by McInfo
Since the problem with the Expand/Contract links (which I commented on in another post) still bothers me, I thought I would try my hand at a Greasemonkey script to make a temporary fix.

The script removes the max-height style for all codeholder divs and adds the max-height style to each of the codeholder divs' children. In simpler terms, this script makes the Expand/Contract links work.

https://snydev.com/greasemonkey/dnneclf.user.js

Edit 1: I appear to have released this prematurely. It doesn't work on all code blocks, but it does work on the one posted above by Weirdan. I need to track down the problem.

Edit 2: I found the problem, but not a solution. The script affects only the first codeholder on a page. Related topic: 102481

Edit 3: I have fixed the script. Thanks for the help, Weirdan.

Edit 4: Fixed broken link.

Edit: This post was recovered from search engine cache.

Edit 5: This patch is obsolete.

Re: DevNetworks useful Greasemonkey Scripts

Posted: Sat Jul 11, 2009 11:47 pm
by McInfo
I decided to tackle another issue with the forum. For those who would prefer a monospaced font for the textarea on the posting page, I wrote a new Greasemonkey script.

https://snydev.com/greasemonkey/dnnpbff.user.js

You can find all (both) of my Greasemonkey scripts at https://snydev.com/greasemonkey/.

Edit: This post was recovered from search engine cache.

Re: DevNetworks useful Greasemonkey Scripts

Posted: Tue Jan 19, 2010 2:46 pm
by Jonah Bron
Here's something I whipped up real quick. Nothing fancy, just quick and dirty. It puts in a dropdown menu on the posting page that inserts often-quoted forum rules into the post.

http://userscripts.org/scripts/show/66794

Enjoy!

Edit: Updated, works with (not so) new forum.

Re: DevNetworks useful Greasemonkey Scripts

Posted: Wed Jan 20, 2010 6:03 pm
by McInfo
Jonah Bron wrote:Here's something...
You need to change

Code: Select all

// @include        forums.devnetwork.net/posting.php
to

Code: Select all

// @include        http://forums.devnetwork.net/posting.php*
Also, I think the menu looks better with no <br> before it, but I can just change that on my copy.

Edit: This post was recovered from search engine cache.

A menu to replace the Code button on the posting page

Posted: Mon Jan 25, 2010 1:54 am
by McInfo
This is my third Greasemonkey-powered improvement for this site. It replaces the Code button on the posting page with a menu that allows you to choose what language to insert. This saves some keystrokes and I hope it will encourage people to use the

Code: Select all

lang[/b]]
syntax (although the people most likely to install the script are those least in need of encouragement).

I'm not going to link to the script directly because I spent more time than I should have on creating a customization page for it and I would appreciate if that page got some traffic:

https://snydev.com/greasemonkey/dnnmrcb.php

As always, my other Greasemonkey scripts can be found on the index page in the same directory.

Related topic: 111832 (image included)

Edit: This post was recovered from search engine cache.

Re: DevNetworks useful Greasemonkey Scripts

Posted: Fri Jan 29, 2010 2:41 pm
by Jonah Bron
Very nice, McInfo. I made the changes you suggested to the rule insert-er.

Highlight Rows in Topic Listings

Posted: Thu Feb 11, 2010 11:33 pm
by McInfo
This Greasemonkey script adds a style to change the background color of rows in topic listings to white when you mouse over them.

dnnhr.user.js

Edit: This post was recovered from search engine cache.

Re: DevNetworks useful Greasemonkey Scripts

Posted: Fri Oct 08, 2010 3:28 pm
by Jonah Bron
Another Userscript. This one creates a button labeled "WDW?". When pressed, it appends the text "What doesn't work? Do you get an error message?" to the post message. I find myself typing this a lot.

http://userscripts.org/scripts/show/87712

Edit: Updated, actually works now :mrgreen: