Not A Bug User-developed Scripts for Boards.ie - boards.ie
Boards.ie uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Click here to find out more x
Post Reply  
 
 
Thread Tools Search this Thread
19-02-2012, 16:10   #1
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
User-developed Scripts for Boards.ie

I thought it would be useful to have a thread for scripts developed by users to extend the functionality of Boards.ie. I'll start off with a couple of my own, but feel free to contribute. Also, if you have any feedback or suggestions for additions, please post it here

Instructions for installing scripts
Firefox:
  1. Install the Greasemonkey extension (if you don't already have it)
  2. Go to the script homepage on userscripts.org
  3. Click Install in the top-right hand corner, then click Install on the dialog box that pops up
Chrome:
  1. Go to the script homepage on userscripts.org
  2. Click Install in the top-right hand corner, click continue on the bottom bar, then click Install on the dialog box
Opera:
  1. Scripts need to be added manually. See here: http://www.opera.com/docs/userjs/using/#writingscripts
IE/Safari/Other Browsers:
  1. Largely unsupported. Try a google search for "greasemonkey [browsername]" for further info and possible workarounds.

Disclaimer
  1. Be careful. There's nothing to stop me (or anyone else) writing a script that would grab your internet banking log-in details and send them elsewhere. Some basic safety guidelines:
    • Use common sense. If a one-post wonder adds a script, don't install it
    • Ideally, you should know how to read Javascript, then you can check the script's source manually. On the script homepage on Userscripts.org, click "Source Code" to see it
    • Even if you don't know Javascript, you can still make sure that the scripts only run on the pages you expect them to run on. If you're using Firefox+Greasemonkey, you will get told what sites the scripts will run on in the pop-up box asking you do you want to install. Otherwise, you can look at the Source Code. Near the top of the script, there will be at least one line, possibly multiple, that start with // @include. These are the sites that the script runs on (* is the wildcard character). You want to be especially wary of scripts that have // @include * or // @include http*, as these will run on every single page you visit
  2. All of these scripts are totally unsupported by Boards.ie. If something changes in the Boards.ie code, there's a good chance it could break any or all of the scripts

Index of Scripts in this thread
I'll try to keep this list up-to-date while I can still edit it, or else ask a mod to do it.
  1. Advanced In-Thread Searching: Post - Script homepage
  2. Quick Spam Reporting: Post - Script homepage
  3. Keyboard Shortcuts: Post - Script homepage
  4. Reformat Homepage: Post - Script homepage
  5. Add Social Media Links : Post - Script homepage

Last edited by 28064212; 19-02-2012 at 19:35.
28064212 is offline  
(4) thanks from:
Advertisement
19-02-2012, 16:11   #2
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Advanced In-Thread Searching

Script Summary: Allows you to use advanced search on a single thread, including search by username

Instructions for use:
  1. While on a thread, click "Search This Thread", then "Advanced Search"
  2. This brings you to the standard advanced search page, but with an extra box pre-populated with the thread number. You can then add extra search terms, including username and it will only search on that specific thread

Install: http://userscripts.org/scripts/show/125952

Last edited by 28064212; 20-02-2012 at 12:18. Reason: update
28064212 is offline  
Thanks from:
19-02-2012, 16:11   #3
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Quick Spam Reporting

Script Summary: Easily post to spammer notification thread in Feedback

Adds a "Spammer" link beside the 'report post' button:



Clicking it brings you directly to the new post screen of the "Spammer Notification" thread in Feedback. It also adds the profile link of the spammer to the URL. Just copy and paste everything after &customspamlink= into the text box and hit reply



Install: http://userscripts.org/scripts/show/126046
28064212 is offline  
Thanks from:
19-02-2012, 16:12   #4
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Keyboard Shortcuts

Script Summary: Left/right arrow keys for navigation in threads and forums, ctrl+left for parent forum, quickly switch focus to the "Find a Forum" or Search textboxes

Instructions for use:
Quick access to the Find a Forum textbox (beta skin): Ctrl + Space
Quick access to the Search textbox: Ctrl + Alt + Space
In forum view and thread view:
Previous and next pages: Left and right arrow keys
Go the parent forum of the current page (whether that's a thread or a forum): Ctrl + Left

Install: http://userscripts.org/scripts/show/126045
28064212 is offline  
Thanks from:
19-02-2012, 16:13   #5
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Reformat Homepage

Script Summary: Makes logo smaller, cuts down on whitespace

Simple script that changes some of the display on the boards.ie home page to minimize whitespace

Install: http://userscripts.org/scripts/show/126044
28064212 is offline  
Thanks from:
Advertisement
19-02-2012, 16:14   #6
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Add Social Media Links

Script Summary: Adds Google+, Twitter and Facebook share buttons to Boards.ie threads and single posts

This script adds a social media section to the bottom of every thread page, as well as the "View Single Post" screen, allowing you to share links on Facebook, Google+ and Twitter.

Screenshot:



Note that the buttons use the current url, so you may not be linking to the exact place in a thread that you think you're sharing (e.g. someone may be using a different number of posts per page to you, so a link to page 10 isn't much good). My personal recommendations for use are:
  • Sharing an entire thread: go to the parent forum, and click on the thread title. The URL in the address bar should be in the form /vbulletin/showthread.php?t=12345. You can now use the social media buttons at the bottom of the page, and anyone following the link will be brought to the first page of that thread
  • Sharing a single stand-alone post: If you want to link a post that doesn't need any context, simply click the number at the top right of the post. You will be brought to a URL ending in the form /vbulletin/showpost.php?p=123456&postcount=123. The buttons are at the bottom of the post and will link directly to that page.
  • Sharing to a particular post in a thread: In this case follow the steps for a stand-alone post, but when you're on the View Single Post page, click the thread title in the top right (not the number). This will bring you to that post within the context of the thread. The URL will be in the form /vbulletin/showthread.php?p=123456#post123456. Then go to the bottom of the page and use the buttons as you did for sharing a thread. Anyone following the links will be brought directly to that post within the thread.

Google+: Uses standard +1 functionality, shows up in your +1's on your profile. If you want to share it with your circles, click the button, then hover over it and click in the text box that appears

Twitter: Opens window allowing you to edit exactly what is posted. Defaults to thread title followed by a link

Facebook: If you are signed in to Facebook, one-click is all you need. If not, a window will pop up asking you to sign in. Your like will show up on your wall/timeline as a like, as well as in the newsfeed ticker of your friends, and possibly in their full newsfeed, it depends. If one of your Facebook friends is using this script and has liked a page on boards, it will show up beside the button.

Note: The Share button is deprecated and no longer supported by Facebook, which is why I'm using Like/Recommend instead. More details here: http://developers.facebook.com/docs/share/

Install: http://userscripts.org/scripts/show/126035
Attached Images
File Type: png socialmedia.png (19.2 KB, 821 views)

Last edited by 28064212; 20-02-2012 at 12:35. Reason: Updated screenshot
28064212 is offline  
(2) thanks from:
23-02-2012, 17:41   #7
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Total Ignore

Script Summary: Hides ignored users' posts totally, as well as text from posts that quote them (leaves option to display those posts)

Trolls getting under your skin? Can't resist that "View Post" button? Remove their posts totally from thread views. With this script installed, the "View Post" option on ignored users is gone. The only indication that an ignored user has posted is a skip in post numbers.

Someone else quoting the ignored user? No problem! The text of their posts is removed, and you can decide whether to display it or not. There's also a "Scorched Earth" option in the script, which will totally remove ignored users' posts and any posts which quote them. Just edit the script and change the SCORCHED_EARTH variable to true.

Screenshot:



Install: http://userscripts.org/scripts/show/126554
Attached Images
File Type: png ignore.png (21.1 KB, 819 views)
28064212 is offline  
27-05-2012, 01:36   #8
Eoin
Registered User
 
Eoin's Avatar
 
Join Date: Jul 2004
Posts: 17,937
28064212, I was a bit bored so I changed your spammer script slightly to pre-populate the textbox with the spammer's details so you don't have to copy and paste from the address bar. I also changed the location of the report spammer link for some reason; can't remember why.

Anyway, I've only used this on the beta theme on Chrome (i.e. no testing at all), but here it is for what it's worth:

Code:
var users = document.getElementsByClassName("bigusername");
for(var i = 0; i < users.length; i++)
{    
	var link = document.createElement("a");
	var spamusername = users[i].innerHTML;
	var regex = /(<([^>]+)>)/ig;
	spamusername = spamusername.replace(regex, "");
	var userURL = encodeURI("Spammer: " + spamusername + "");
	link.href = "http://www.boards.ie/vbulletin/newreply.php?do=newreply&t=2056491247&customspamlink=" + userURL;
	link.innerHTML = "<br/>Report Spammer";
	link.style.fontWeight = "bold";
	users[i].parentNode.parentNode.children[1].appendChild(link);
}


var url = document.location.href;
if (url.indexOf("customspamlink") > -1)
{
	var spamlink = decodeURI(url.substr(url.indexOf("customspamlink") + 15, url.length));
	document.getElementById("vB_Editor_001_textarea").value = spamlink;
}
Eoin is offline  
(2) thanks from:
28-05-2012, 11:46   #9
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Quote:
Originally Posted by Eoin View Post
28064212, I was a bit bored so I changed your spammer script slightly to pre-populate the textbox with the spammer's details so you don't have to copy and paste from the address bar. I also changed the location of the report spammer link for some reason; can't remember why.

Anyway, I've only used this on the beta theme on Chrome (i.e. no testing at all), but here it is for what it's worth:
Thanks Eoin! I've been meaning to do this for a while and kept putting it off. I left the link where it was, as I think it makes more sense to have it beside the report post button, but obviously, move it around as you see fit

Quick Spam Reporting
I've updated this script on the userscripts website here: http://userscripts.org/scripts/show/126046. It adds a "Spammer" link beside the 'report post' button:



Clicking it brings you directly to the new post screen of the "Spammer Notification" thread in Feedback and fills in the spammer's url in the reply box automatically.

I've also set it to default the subscription option to "Do Not Follow". That may not suit everyone, so there's instructions on the userscripts site on how to change that option to either a specific setting, or just to use your default option.

To update to this version, you can either use the Firefox update mechanism (Ctrl+Shift+A, click "User Scripts" on the left, right-click on the script and choose "Find Updates"), or (for either Firefox or Chrome) just go to the link above and install it from there and it will overwrite the old version.

If you have any problems or questions, feel free to PM me.

Install: http://userscripts.org/scripts/show/126046
28064212 is offline  
Thanks from:
Advertisement
27-06-2012, 14:32   #10
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
I've updated the scripts so they work with the new beta skin released today.

I've also updated the Spam Reporting script so it includes the name in the reply

EDIT: Chrome users have to update manually (by visiting the script homepages and clicking install), Firefox users can use the built-in extension update facility

Last edited by 28064212; 27-06-2012 at 14:50.
28064212 is offline  
29-06-2012, 01:15   #11
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Add Social Media Links (Update)

I've totally redesigned this script, (hopefully) making it more useful. I've also added Reddit to the share options. Fair warning, it only looks 'good' in the new beta skin. It's still perfectly functional in the "old beta" and the default skins, but uses the new design scheme.
===================================
Script Summary: Adds Google+, Twitter, Facebook and Reddit share buttons to Boards.ie threads, forums and posts.

Adds a "Share" button to the top and bottom of every thread and forum page, as well as on every post. Clicking it brings up a set of social media buttons, allowing you to share links on Facebook, Google+, Twitter and Reddit. To close the display, just click the button again.

Screenshot:

This is how the buttons work for forums, threads and posts:
  • Forums: Share buttons on each page of the forum beside the "New Thread" button. No matter which page you are on, the url shared will be of the form .../forumdisplay.php?f=XXX, meaning the link shared will bring you to the first page of that forum.
  • Threads: In a thread, the share button appears beside the "Post Reply" button at the top and bottom of the thread. Like forums, the url shared will be of the form .../showthread.php?t=XXX, meaning the link shared will bring you to the first page of that thread.
  • Posts: The Share button is beside the Quote button of every post. The url shared is of the form .../showthread.php?p=XXXXXX, meaning the link shared will bring you to the post within the context of the thread. Example (link to this post): http://www.boards.ie/vbulletin/showt...php?p=79466201

Google+: Allows you to share with your circles. Clicking opens a frame allowing you to add a description and choose which circles.

Twitter: Opens window allowing you to edit exactly what is posted. Defaults to the relevant link.

Facebook: If you are signed in to Facebook, one-click is all you need to "like" the link. If not, a window will pop up asking you to sign in. Your like will show up on your wall/timeline as a like, as well as in the newsfeed ticker of your friends, and possibly in their full newsfeed.

Reddit: Standard reddit submit functionality (I'm not a reddit user, so feel free to message me if it's not working as expected).

Note: The Share button is deprecated and no longer supported by Facebook, which is why I'm using Like/Recommend instead. More details here: http://developers.facebook.com/docs/share/

Install: http://userscripts.org/scripts/show/126035

Firefox users who previously had the script installed can just install updates in their Add-on manager. Chrome users have to go to the link above and install it, but it can be installed over the old version, no need to uninstall first
Attached Images
File Type: png share.png (10.0 KB, 706 views)
28064212 is offline  
(4) thanks from:
20-07-2012, 11:01   #12
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Notification in Title/Tab

Script Summary: Display notification count in page/tab title

Want to easily see whether you have new notifications on Boards? This script adds the count to the start of the page title, and automatically updates it if the count changes, without needing to refresh the page, making it easier to keep an eye on your notifications without having to switch to the Boards tab

Screenshot:


Install: http://userscripts.org/scripts/show/138772
Attached Images
File Type: png notification.png (14.7 KB, 553 views)
28064212 is offline  
(4) thanks from:
24-07-2012, 21:08   #13
Boards.ie: Paddy
Boards.ie Employee
 
Boards.ie: Paddy's Avatar
 
Join Date: Oct 2011
Location: /dev/null
Posts: 523
Quote:
Originally Posted by 28064212 View Post
Script Summary: Display notification count in page/tab title

Want to easily see whether you have new notifications on Boards? This script adds the count to the start of the page title, and automatically updates it if the count changes, without needing to refresh the page, making it easier to keep an eye on your notifications without having to switch to the Boards tab

Screenshot:


Install: http://userscripts.org/scripts/show/138772
We're totally stealing that
Boards.ie: Paddy is offline  
(2) thanks from:
24-07-2012, 22:20   #14
28064212
Registered User
 
28064212's Avatar
 
Join Date: May 2005
Location: Here
Posts: 6,626
Quote:
Originally Posted by Boards.ie: Paddy View Post
We're totally stealing that
Go nuts, but DomSubtreeModified is deprecated, and I don't think the replacement has been written yet

#joysofsinglebrowserdevelopment
28064212 is offline  
01-08-2012, 01:51   #15
Eoin
Registered User
 
Eoin's Avatar
 
Join Date: Jul 2004
Posts: 17,937
Replace quoted images with a link

I've only tested this on Chrome, and very briefly at that.

It finds posts containing another quoted post and will replace any images that have been quoted with a link to the image. It shouldn't affect smilies. If you're a regular on forums where people tend to quote large images, it might be useful.

I'm trying to get a configurable max height/width and resize option, but I'm having problems with that so far.

It's pretty rough, but let me know if it can be cleaned up.

Code:
// ==UserScript==
// @name           Boards.ie - hide quoted images
// @description    Change quoted pictures to links. Shouldn't change smilies etc.
// @version        4.6
// @include        http://www.boards.ie/vbulletin/showthread.php*
// @include 	   http://www.boards.ie/vbulletin/newreply.php*
// @include        https://www.boards.ie/vbulletin/showthread.php*
// ==/UserScript==


var quotes = document.getElementsByClassName("smallfont");

for(var i = 0; i < quotes.length; i++)
{
	if (quotes[i].innerHTML == "Quote:")
	{
		var quotetable = quotes[i].nextSibling.nextSibling;
		var imgs = quotetable.getElementsByTagName("img");
		
		for (var x = 0; x < imgs.length; x++)
		{
			if (imgs[x].src.indexOf("vbulletin/images") < 0)
			{

				var newlink = document.createElement("a");
				newlink.innerHTML = "quoted image";
				newlink.href = imgs[x].src;
				newlink.target = "_blank";					
				imgs[x].parentNode.insertBefore(newlink,imgs[x]);	
				imgs[x].style.display = "none";						
			}
		}
	}
}
Eoin is offline  
(2) thanks from:
Post Reply

Quick Reply
Message:
Remove Text Formatting
Bold
Italic
Underline

Insert Image
Wrap [QUOTE] tags around selected text
 
Decrease Size
Increase Size
Please sign up or log in to join the discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Share Tweet