![]() |
Highlight and link function names inside code
Here's a nice idea I got from another site, which highlights all function names in PHP code and links to their documentary. In this hack the functions are linked to PHP.NET's docs.
Needless to add this is perfect for sites that deal with PHP coding. :) Demo: Code:
if(!$dohtml) { // kill any rogue html code To install this hack download the attached file (linkfuncs.hack.php), upload to your /admin folder and use vbHacker. Have fun! :D |
Thats great, i saw it on evilwalrusdotcom. Great addition, thanks :up:
|
Yup, that's where I saw it too! Although they are using their own docs for the functions.
|
Well I see you're using it here. I have a complaint about this hack being used here.
Sometimes people post code here that is part of a hack. I like to keep local text files of hack instructions so that I can have a record of everything I've done, and can quickly re-apply each hack after a vB upgrade without having to search all over the forums for every hack I want. So when someone posts code directly in a message, I have to copy that and put it in a text file myself. The problem is that some editors, if you copy a hyperlink into it, will spell out the full URL of the link. For example, WordPad. I normally use Notepad on my Win2k computer, but for reasons which don't matter here, lately I've been having to access the Internet from my parents' computer, which only has WinMe on it, and the Notepad on WinMe sucks (it doesn't recognize any of the standard keyboard shortcuts and the search feature is limited, too). So I'm kind of forced to use WordPad here as my text editor, and even if you start a new document in text mode, if you paste anything with formatting into the window it still keeps the formatting, it just takes the formatting away when you save it as a text file. The problem is that if I try to copy, for example, this: PHP Code:
PHP Code:
Aside from all that, your hack didn't even work right for the example I just posted. I guess it just saw date( and assumed it was a PHP function? But it's not. It's vbdate(, a custom vB-only function. Perhaps there should be a way for a user (like me) to turn this feature off. I don't need it and won't use it, and it's just going to get in my way. I don't really see it being used very much in general, anyway; at least for me, when I'm getting code out of these forums is not the time I want to know what a specific function does. It's when I'm editing code later on that I might want to know what something does. Just my 2?. :) |
I just installed it with no problems, great hack firefly!
|
Quote:
|
a) The bug where vbdate() is parsed as date() and unlink() is parsed as link() should be fixed now.
Code:
unlink($bob); |
Done. Feel free to turn this off in your options.
|
Uploaded a vbHacker version. :)
|
nice hack!
|
All times are GMT. The time now is 10:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|