PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Oct 19, 2017 6:56 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 47 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Sun Jan 01, 2006 9:18 pm 
Offline
Breakbeat Nuttzer
User avatar

Joined: Wed Mar 24, 2004 8:57 am
Posts: 13098
Location: Melbourne, Australia
Latest GM version (at last edit): 0.6.6
--------------------------------------------------------------

Any Greasemonkey scripts posted in this thread should be intended for use on this forum only. Please post in Code Snippets for anything else

For those who don't know, Greasemonkey is an extension for Firefox which allows you to manipulate web pages whilst viewing in your browser, using your own JavaScript.

To use any scripts posted here we strongly reccommend you use the lastest version of Greasemonkey with its recommended version of Firefox.


Last edited by Chris Corbyn on Sun Jan 01, 2006 9:26 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: RTM Conversion
PostPosted: Sun Jan 01, 2006 9:22 pm 
Offline
Breakbeat Nuttzer
User avatar

Joined: Wed Mar 24, 2004 8:57 am
Posts: 13098
Location: Melbourne, Australia
http://w3style.co.uk/devnet/function_highlight.user.js

Tested with GM 0.6.4 and FF 1.5

Adds a button labeled "RTM-ize" to the Reply, New Post, Quote and Edit forms. Upon clicking the button the message box is scanned for PHP functions and links are generated to point to the manual pages at PHP.net

Functions are expected to have the trailing parens on them and are permitted to contain the argument list.

Example:

Syntax: [ Download ] [ Hide ]
mysql_connect($server, $user, $pass)

mysql_connect($server, $user, $pass)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 01, 2006 9:43 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 23, 2003 3:10 am
Posts: 11470
Location: Toronto
Tested on GM 0.6.2 and it fails, so make sure you upgrade.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 01, 2006 10:40 pm 
Offline
DevNet Master

Joined: Tue Jan 20, 2004 12:11 am
Posts: 4897
Location: Leuven, Belgium
It doesn't seem to work on the examples below... (using 0.6.4)

Syntax: [ Download ] [ Hide ]
 
print substr(htmlentities("foo"), 5);
 


print substr(htmlentities("foo"), 5);


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 01, 2006 10:46 pm 
Offline
Breakbeat Nuttzer
User avatar

Joined: Wed Mar 24, 2004 8:57 am
Posts: 13098
Location: Melbourne, Australia
Testing....

====================

It doesn't seem to work on the examples below... (using 0.6.4)

Syntax: [ Download ] [ Hide ]
 
print substr(htmlentities("foo"), 5);
 


print substr(htmlentities("foo"), 5);
=====================

-- Note that it does deliberately evade the [php ] tags... (and some other BBCode tags). What version of FF are you using so I can try it with other versions? Clicking EDIT on your post then clicking RTM-ize worked for me with 1.5.

EDIT | Minor bug just spotted.... it stops at the first paren when nesting functions... will be fixed.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 8:49 am 
Offline
PHP Evangelist
User avatar

Joined: Tue Aug 13, 2002 3:35 pm
Posts: 3547
Location: Calgary, Canada
testing...


foreach() fwrite() madeupfuncname() mysql_connect() ereg()


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 4:06 am 
Offline
DevNet Master
User avatar

Joined: Tue Nov 02, 2004 6:43 am
Posts: 2704
Location: Ireland
Works fine - very cool ;)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 3:06 am 
Offline
PHP Evangelist
User avatar

Joined: Tue Aug 13, 2002 3:35 pm
Posts: 3547
Location: Calgary, Canada
Here is a GM script I found thanks to Weirdan: http://userscripts.org/scripts/show/1667

It automatically places a quickreply button so you don't need to load a page just to reply.

It's great if it's just a quick message and you aren't going to utilize any of the extras such as emoticon inserter, bbcode tag inserters and etc.

Another is: http://userscripts.org/scripts/show/2277

Removes the redirect page and automatically forwards you to your reply on the thread.

It works in conjunction with the quickreply GM script so those two are a great time saver together.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 6:58 am 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine
Sami wrote:
Removes the redirect page and automatically forwards you to your reply on the thread.

Unfortunately, it breaks the "back" button :(


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 8:03 am 
Offline
Breakbeat Nuttzer
User avatar

Joined: Wed Mar 24, 2004 8:57 am
Posts: 13098
Location: Melbourne, Australia
Hehe... nice one guys :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 3:29 pm 
Offline
PHP Evangelist
User avatar

Joined: Tue Aug 13, 2002 3:35 pm
Posts: 3547
Location: Calgary, Canada
Weirdan wrote:
Sami wrote:
Removes the redirect page and automatically forwards you to your reply on the thread.

Unfortunately, it breaks the "back" button :(


It's a sacrifice I'm willing to make.. hehe :)

All I need now is some sort of script to copy something like....

Quote:
[quote="Weirdan"]
Unfortunately, it breaks the "back" button :(
[/quote]


...into the clipboard automatically so you can paste it into the quickreply. :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 6:28 pm 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine
or "quick quote" button :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 6:31 pm 
Offline
PHP Evangelist
User avatar

Joined: Tue Aug 13, 2002 3:35 pm
Posts: 3547
Location: Calgary, Canada
Exactly!

I guess for now I'll keep dreaming... I'm no GM developer. =P


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 03, 2006 4:27 am 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine
this extension may come in handy - not as powerfull as BBCode extension, but this one is compatible with Fx 1.5.0.x :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 03, 2006 4:39 am 
Offline
PHP Evangelist
User avatar

Joined: Tue Aug 13, 2002 3:35 pm
Posts: 3547
Location: Calgary, Canada
Quote:
this extension may come in handy - not as powerfull as BBCode extension, but this one is compatible with Fx 1.5.0.x


test


...oh wow... man, I'm lovin' this!


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: Exabot [Bot] and 9 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