UPDATE: V3.1 I know they're misplaced... deal with it for a bit.
UPDATE: V2.0
V2.0 (PMs)
UPDATE: V1.1
V1.1 (PM version)
UPDATE: PM script.
UPDATE: Uploaded to userscripts.org. Click here for script.
Great news! I've had Greasemonkey for a few months now... I got it for the Live Search Club script that removes the search frame. Understanding its endless possibilities, I figured I'd try to create my first script... and I did!
This is a very short script that replaces the
icon. Unfortunately, you can't just type
and have it show up when you post. The characters that represent an emoticon in the post window are interpreted by a script in the depths of the phpBB folder on this website that I can't access. For example, when you type: :-lol-: (except without the hyphens), the server automatically replaces that with an image from the server; in this example, "http://forums.benheck.com/images/smiles/icon_lol.gif".Since I can't add instructions to this script, all I can do is make it insert a URL in IMG tags when you click on the new icon... but it's still much quicker than typing the full path to a
icon! The good news is that, with some very simple editing, any icon can be replaced with any image. If I worked on it harder, I could create another row for additional emoticons, rather than replace the ones already there. But, I wanted to show this off as soon as possible.
Alright, here's the script:
Code: Select all
// ==UserScript==
// @name BenHeck [img]http://www.tredonox.com/emoticons/icon_wtf.gif[/img] Icon
// @namespace Electric Rain
// @description Inserts a [img]http://www.tredonox.com/emoticons/icon_wtf.gif[/img] Icon (or other icon of your choice with a little editing) overtop of the never-used "Arrow" icon (also, or other icon of your choice with a little editing) on the BenHeck forums!
// @include http://forums.benheck.com/posting.php*
// ==/UserScript==
var allRows = document.getElementsByTagName('tr');
var theRowColumns = allRows[18].getElementsByTagName('td');
theRowColumns[3].innerHTML = "<a href='javascript:emoticon(\"[img]http://skytroniks.com/images/database/smilies/wtf.gif[/img]\")'><img src='http://skytroniks.com/images/database/smilies/wtf.gif' border='0' alt='WTF' title='WTF'></a>";(
Code: Select all
http://skytroniks.com/images/database/smilies/wtf.gifTo change which emoticon is replaced, you need to change the following values:
Code: Select all
allrows[18]Code: Select all
theRowColumns[3]So, if we wanted to replace the
This works the same for rows. If you wanted to move it up one and replace the
Do as you wish with my script. All I ask is that if you improve it, please post the revised script here for all of us to benefit off of!
Also, I need people to test this script and make sure it works for you. It works for me, but that doesn't mean it will work for everyone...!
Also, this doesn't seem to work in preview mode... any insights as to why that might be, fellow coders? I also only made it to include this script on http://forums.benheck.com, since that's what we're supposed to be using now anyway. It will NOT work for http://benheck.com/phpBB.
To install the script (until someone hosts the script online for me somewhere):
1. Open Notepad.
2. Copy and paste the full script (posted above) into Notepad.
3. Save the Notepad document as benheckwtficon.user.js, making sure it ends in .js and not .txt.
4. Open the newly created file in Firefox, and from there, it's just like installing any other Greasemonkey script!
Enjoy!


