PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Jun 29, 2017 2:15 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Wed Aug 09, 2006 3:27 pm 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5975
Location: Odessa, Ukraine
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)
Syntax: [ Download ] [ Hide ]
 /*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();} 


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 20, 2006 7:05 pm 
Offline
DevNet Master
User avatar

Joined: Mon Oct 25, 2004 9:29 pm
Posts: 3698
Location: New Jersey, US
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 3:11 am 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5975
Location: Odessa, Ukraine
Quote:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 3:57 pm 
Offline
DevNet Master
User avatar

Joined: Tue May 24, 2005 6:01 pm
Posts: 3179
Location: UK
Is it possible to have RTM-ize for quick reply :P or is that asking too much?


Top
 Profile  
 
PostPosted: Thu Oct 25, 2007 5:51 pm 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4294
Location: Sofia, Bulgaria
My ugly coded Greasemonkey script (but still useful for me):
http://ipclassify.relef.net/scripts/filter.forums.devnetwork.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)

_________________
Image
http://openfmi.net/projects/flattc/ Linux is better :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 27, 2007 8:00 am 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4294
Location: Sofia, Bulgaria
One single download?!? ... :( I thought it would be useful

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

_________________
Image
http://openfmi.net/projects/flattc/ Linux is better :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 27, 2007 8:26 am 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA
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.


Top
 Profile  
 
PostPosted: Tue Jun 30, 2009 12:42 am 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1531
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.


Last edited by McInfo on Fri Nov 05, 2010 4:58 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Sat Jul 11, 2009 11:47 pm 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1531
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.


Last edited by McInfo on Mon Jun 14, 2010 11:10 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue Jan 19, 2010 3:46 pm 
Offline
DevNet Master
User avatar

Joined: Thu Mar 15, 2007 6:28 pm
Posts: 2765
Location: Redding, California
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.


Last edited by Jonah Bron on Wed Nov 03, 2010 7:52 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Jan 20, 2010 7:03 pm 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1531
Jonah Bron wrote:
Here's something...

You need to change
Code:
// @include        forums.devnetwork.net/posting.php

to
Code:
// @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.


Last edited by McInfo on Mon Jun 14, 2010 11:11 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Jan 25, 2010 2:54 am 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1531
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=lang][/code] 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.


Last edited by McInfo on Mon Jun 14, 2010 11:12 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 3:41 pm 
Offline
DevNet Master
User avatar

Joined: Thu Mar 15, 2007 6:28 pm
Posts: 2765
Location: Redding, California
Very nice, McInfo. I made the changes you suggested to the rule insert-er.


Top
 Profile  
 
PostPosted: Fri Feb 12, 2010 12:33 am 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1531
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.


Top
 Profile  
 
PostPosted: Fri Oct 08, 2010 3:28 pm 
Offline
DevNet Master
User avatar

Joined: Thu Mar 15, 2007 6:28 pm
Posts: 2765
Location: Redding, California
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:


Last edited by Jonah Bron on Wed Nov 03, 2010 7:41 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group