vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Fix for replacement code problem in vB Code (https://vborg.vbsupport.ru/showthread.php?t=35894)

Freddie Bingham 03-10-2002 12:21 AM

It just stops things like {firstaltcolor} from being converted when you type them into a post.

Mr. X 03-10-2002 06:06 AM

Quote:

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.. :)

Admin 03-10-2002 10:26 AM

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

Steve Machol 03-10-2002 01:15 PM

Please post that when you have a change FireFly.

Admin 03-10-2002 04:47 PM

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.

Mr. X 03-10-2002 08:28 PM

Quote:

Originally posted by FireFly
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
Were you referring to my post or someone elses?

Radon3k 03-10-2002 10:00 PM

Quote:

Originally posted by smachol
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:

PHP Code:

$bbcode=str_replace("{""{"$bbcode); // stop people posting replacements in their posts[color=Radon3k][/color] 

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.

What do you mean by "Of course removing this line will cause the problem of people using replacement variables in posts."??

What are replacement variables? Do you need to install this hack, or just comment that line out? I'm a bit confused. Please explain (?)

Steve Machol 03-10-2002 11:21 PM

You cvan find out what replacement variable are by looking at the Replacement sets in your Admin CP. And what I meant was if someone uses a replacement variable in a post (like {firstaltcolor} ) this will automatically translate into the color in question if you remove this line.

I'm not sure if it's fixed here or not. If not, then this will show the hex code: {firstaltcolor}

Radon3k 03-10-2002 11:25 PM

I'm still confused....I'm tryin to understand...My mind is going crazy....

X-Fan 03-11-2002 06:30 AM

Is this fixed in v2.2.4?


All times are GMT. The time now is 10:56 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
  • Page Generation 0.02329 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete