Version: 1.00, by Admin (Coder)
Developer Last Online: Sep 2024
Version: 2.2.x
Rating:
Released: 02-26-2002
Last Update: Never
Installs: 11
No support by the author.
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
// $bbcode=str_replace("&","&",$bbcode);
$bbcode=str_replace("<","&lt;",$bbcode);
$bbcode=str_replace(">","&gt;",$bbcode);
$bbcode=str_replace("<","<",$bbcode);
$bbcode=str_replace(">",">",$bbcode);
}
$bbcode=nl2br($bbcode);
(also works inside [php] tags)
To install this hack download the attached file (linkfuncs.hack.php), upload to your /admin folder and use vbHacker.
Have fun!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
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:
If it's just one line, I might catch it, but if it's a big block of code, I might not. I shouldn't have to worry about it.
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.