![]() |
My first hack for vB :D
In functions.php, add this in at line 425, just after several lines of code about $replacearray PHP Code:
PHP Code:
I know that this is not very useful for many people, but it could be easily modified for other programming languages. John [edit - there's something funny going on with the slashes in the PHP code. Quote this message, and use the code straight from the reply window to get it accurately within any escaping problems.] |
Wow, this is amazing!!!
Together with the big amount of "wordfiles" at http://www.ultraedit.com/downloads/additional.html this is very helpful, Thanks & cheers, -Tom |
Anybody know how to install this on vB 2.2.4? I don't see anything about $replacearray on 425, so would somebody please quote a few lines of code I can search for?
|
Um...please? :(
|
Add the code John posted right BEFORE this:
Code:
} // end version check |
Cheers, Chen, it worked :) Like John said though, I still had to quote his message and then copy the text. Weird. *shrug*
|
please post screenshot of this hack. :)
|
Quote:
|
I'm not so good at reg exp... Here you are only replacing if the keyword is found in the exact case it is in the $kw array. How can you change that? We have a ton of developers and they never follow standards.
What would be really nice is if it could find them in ANY case, and format them to the right case (and add color colding). codebit=ereg_replace("([\r\n\\(\\)>, .])$keyword([\r\n <,.$\\(\\)])","\\1<font color=\"#FF0000\">$keyword</font>\\2",$codebit); |
I haven't looked at the code, but from what you posted I think you will need to replace all calls to "ereg_replace" with calls to "eregi_replace".
|
wow I m not aware there is hack like this! :thumbup:
John or Firefly I d like to get some of your hints or tips for this. Since John stated that I can modify this hack to change to C/C++ codes so what and which do you suggest me to change this hack to C/C++? You dont have to do all of that but just tell me which codes that I should change and input C/C++ codes? thanks |
Sorry for double post but I didnt see how.. perhaps 2.2.6 have different lines, I try everything to get it work but no luck. Can anyone give me excat codes to look for to put it above codes to get it work.
|
Never mind, I got it but still have double line space problem =\
double space problem: Code:
Option Explicit Code:
Option Explicit |
I have actualy noted some highlighting issues...
Even with changing the: PHP Code:
PHP Code:
|
cybrcyfr
how do you do that without having double space? can you provide which codes to look for to put after or before John's codes? Pls? thanks |
I used the code that he posted above. Where are you pulling the code from? I pulled my from the Klient Script Editor. You might have issues with the chr(10) and chr(13) from your source application.
Are you on unix/mac/pc? Unix line breaks are different, I dont think they would carry over though... Copy your code to notepad, how does it look? Then copy it from notepad into your forums, and see how it looks. What ver of vB are you using? If you still have issues, pase the code from visbas.php here.... |
I used the code that he posted above. Where are you pulling the code from? I pulled my from the Klient Script Editor. You might have issues with the chr(10) and chr(13) from your source application.
Are you on unix/mac/pc? Unix line breaks are different, I dont think they would carry over though... Copy your code to notepad, how does it look? Then copy it from notepad into your forums, and see how it looks. What ver of vB are you using? If you still have issues, pase the code from visbas.php here.... |
Edit: never mind, I got it work! It is for only UNIX, not PC that s what it does to me so far =P
|
It looks right to me.... I don't know man. :rolleyes:
|
cybrcyfr
I got it work, it seem work only for UNIX, I use that hack on my local server on my laptop (PC) Anyway thanks for offer your help =) |
Quote:
|
Love your hack John
|
All times are GMT. The time now is 04:44 PM. |
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:
|