Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Fix for replacement code problem in vB Code
Steve Machol
Join Date: Nov 2001
Posts: 1,896

by Steve Machol Steve Machol is offline 09 Mar 2002

I'm almost embarrassed to call this a 'hack', particularly sincve it's not even mine! :stupid: Actually the code came from FireFly who PM'd me with the answer to this problem I posted on vb.com:

http://www.vbulletin.com/forum/showt...threadid=41430

The problem arises if you try to use replacement variables in vB Code. Beginning with 2.2.3, this no longer works. However the fix (thanks to Chen!) is simple. Just remove or comment out this line from admin/functions.php:


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

Of course remving this line will cause the problem of people using replacement variables in posts. However in my case it's a good trade-off.

Last edited by Chen; 09 Mar 2002 at 06:34..
Views: 13124
Reply With Quote
Comments
  #2  
Old 09 Mar 2002, 06:33
neal neal is offline
 
Join Date: Feb 2002
isn't this corrected in 2.2.3?
Reply With Quote
  #3  
Old 09 Mar 2002, 06:33
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
No, this is caused by v2.2.3.
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

chen@avinadav.com
Reply With Quote
  #4  
Old 09 Mar 2002, 06:36
neal neal is offline
 
Join Date: Feb 2002
oh, ok. Thanks then, I'm installing
Reply With Quote
  #5  
Old 09 Mar 2002, 06:39
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Excellent. The quote looks great now, however Im still confused as to how do do this with PHP and list code.
__________________
website: pcfx.cc
forums: http://www.pcfx.cc/vb
music: neurologik
New Admin CP colors right HERE

Last edited by Mr. X; 09 Mar 2002 at 06:43.
Reply With Quote
  #6  
Old 09 Mar 2002, 15:56
Scrub's Avatar
Scrub Scrub is offline
 
Join Date: Oct 2001
I do not understand this!?
Reply With Quote
  #7  
Old 09 Mar 2002, 16:43
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Originally posted by Mr. X
Excellent. The quote looks great now, however Im still confused as to how do do this with PHP and list code.
Those are hardcoded into the script and cannot be altered by vB Code. To change them would require further hacking.
__________________
Steve Machol, vBulletin Moderator

Please do not email or PM me for vBulletin support. I will try to answer all questions on the vB Forums. Thank you for respecting this request!
Reply With Quote
  #8  
Old 09 Mar 2002, 19:52
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
so it only works on vb.org?
__________________
website: pcfx.cc
forums: http://www.pcfx.cc/vb
music: neurologik
New Admin CP colors right HERE
Reply With Quote
  #9  
Old 09 Mar 2002, 23:01
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
 
Join Date: Jan 2002
Real name: Wayne
I think that line of code is part of the cross-site scripting issue that was plugged in 2.2.3. While I don't think it will expose you to the entire problem it does present a weakness.
__________________
Wayne Luke
Get started with your own social network. Purchase and download vBulletin today.
Reply With Quote
  #10  
Old 10 Mar 2002, 00:38
TECK's Avatar
TECK TECK is offline
 
Join Date: Dec 2001
Real name: Floren Munteanu
this is not changed in 223b grrrr...
lol i got it now.. damn i'm slow sometimes.. this line must be removed only if you installed firefly's hack
__________________
Floren Munteanu
Axivo Inc.
Axivo Community - Visit the forums to find out more about us
Why Queued - My personal blog

Last edited by TECK; 10 Mar 2002 at 00:44.
Reply With Quote
  #11  
Old 10 Mar 2002, 01:21
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
It just stops things like {firstaltcolor} from being converted when you type them into a post.
Reply With Quote
  #12  
Old 10 Mar 2002, 07:06
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Originally posted by smachol
Those are hardcoded into the script and cannot be altered by vB Code. To change them would require further hacking.
Im still confused here. Is this a hack that ONLY changes the Quote code, or is there something Im missing? Afterall its entitled "New code, PHP and quote boxes!". Im so very tired right now..
__________________
website: pcfx.cc
forums: http://www.pcfx.cc/vb
music: neurologik
New Admin CP colors right HERE
Reply With Quote
  #13  
Old 10 Mar 2002, 11:26
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
You should be able to move the line we told you to delete a bit up, before the parsing of vB codes, and then it'll also solve the problem. I don't have the code in front of me right now though
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

chen@avinadav.com
Reply With Quote
  #14  
Old 10 Mar 2002, 14:15
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Please post that when you have a change FireFly.
__________________
Steve Machol, vBulletin Moderator

Please do not email or PM me for vBulletin support. I will try to answer all questions on the vB Forums. Thank you for respecting this request!
Reply With Quote
  #15  
Old 10 Mar 2002, 17:47
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
Nah, if you do this it'll screw PHP code, because every left bracket will be replaced with its HTML entity and the code will be unreadable.
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

chen@avinadav.com
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article 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 05:11.

Layout Options | Width: Wide Color: