Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
[Release v2] Visual Basic Colour coding Details »
[Release v2] Visual Basic Colour coding
Mod Version: 1.00, by John Percival (Member) John Percival is offline
Developer Last Online: Jan 2007 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: Rating: (0 vote - 0 average) Installs: 9
Released: 02 Jun 2001 Last Update: Never Downloads: 0
Not Supported  

My first hack for vB

In functions.php, add this in at line 425, just after several lines of code about $replacearray


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And then upload visbas.php to the admin directory:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Users can then use [vbcode] tags to access this.

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.]

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 02 Jun 2001, 13:50
ThomasP
Guest
 
Thumbs up

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
Reply With Quote
  #3  
Old 27 Mar 2002, 01:20
filburt1 filburt1 is offline
 
Join Date: Feb 2002
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?
Reply With Quote
  #4  
Old 27 Mar 2002, 20:53
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Um...please?
Reply With Quote
  #5  
Old 28 Mar 2002, 09:31
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
Add the code John posted right BEFORE this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Nice hack John! Jelsoft should really hire you to work with them!
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

[email protected]
Reply With Quote
  #6  
Old 09 Apr 2002, 02:54
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Cheers, Chen, it worked Like John said though, I still had to quote his message and then copy the text. Weird. *shrug*
Reply With Quote
  #7  
Old 09 Apr 2002, 11:11
inetd inetd is offline
 
Join Date: Nov 2001
please post screenshot of this hack.
Reply With Quote
  #8  
Old 12 Jun 2002, 19:46
eiSecure's Avatar
eiSecure eiSecure is offline
 
Join Date: Dec 2001
Originally posted by inetd
please post screenshot of this hack.
You can see it in action at: http://www.vbforums.com
Reply With Quote
  #9  
Old 09 Aug 2002, 17:01
cybrcyfr cybrcyfr is offline
 
Join Date: Aug 2002
Regualr Expressions

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);
Reply With Quote
  #10  
Old 09 Aug 2002, 17:06
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
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".
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

[email protected]
Reply With Quote
  #11  
Old 09 Aug 2002, 18:20
DestyNova DestyNova is offline
 
Join Date: Jun 2002
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
__________________
Civilization did not create war.
War created Civilization.
English is not my first language. Please excuse my sloppy english
Reply With Quote
  #12  
Old 09 Aug 2002, 20:36
DestyNova DestyNova is offline
 
Join Date: Jun 2002
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.
__________________
Civilization did not create war.
War created Civilization.
English is not my first language. Please excuse my sloppy english
Reply With Quote
  #13  
Old 09 Aug 2002, 20:49
DestyNova DestyNova is offline
 
Join Date: Jun 2002
Never mind, I got it but still have double line space problem =\

double space problem:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

instead it should be like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

So how? I only wish that there is a instruction to help me and anyone to look for excat codes to put after or before instead of based on lucky guess as I did but still getting double space problem. I m going to be king of the bump on this thread until solution come up =P
__________________
Civilization did not create war.
War created Civilization.
English is not my first language. Please excuse my sloppy english

Last edited by DestyNova; 09 Aug 2002 at 21:19.
Reply With Quote
  #14  
Old 09 Aug 2002, 21:34
cybrcyfr cybrcyfr is offline
 
Join Date: Aug 2002
Highlighting issues

I have actualy noted some highlighting issues...

Even with changing the:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

See the attached screenshot. I am going t go through and make it case insensative, and allow you to specify CSS colors (and then we can extend it for other languages...)
Attached Images
File Type: gif syntax_highlight.gif (29.4 KB, 57 views)
Reply With Quote
  #15  
Old 09 Aug 2002, 21:38
DestyNova DestyNova is offline
 
Join Date: Jun 2002
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
__________________
Civilization did not create war.
War created Civilization.
English is not my first language. Please excuse my sloppy english
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 20:22.

Layout Options | Width: Wide Color: