Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Fix for replacement code problem in vB Code
Steve Machol's Avatar
Steve Machol
Join Date: Nov 2001
Posts: 1,896

 

Show Printable Version Email this Page Subscription
Steve Machol Steve Machol is offline 03-08-2002, 10:00 PM

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 
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.
Reply With Quote
  #52  
Old 06-27-2002, 01:50 AM
Sinecure's Avatar
Sinecure Sinecure is offline
 
Join Date: Oct 2001
Location: Victoria, BC, Canada
Posts: 407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, i had this problem with 2.2.6, worked well, thanks
Reply With Quote
  #53  
Old 07-15-2002, 05:13 PM
cbn cbn is offline
 
Join Date: Jun 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I've been directed to this thread from this thread...

however, I'm still confused.

I need to be able to use a [tag] of some sort so that whenever I edit a post, the [tag] code is there instead of the replacement HTML code.

Say I create a replacement:

Code:
[dad] => <a href="http://www.commanderbond.net/Categories/9.html">Die Another Day</a>
So, I then post a topic:

Quote:
Check out the lastest Bond news here at [dad]
Say I want to then edit the post, at the moment, all I get is:

Code:
Check out the lastest Bond news here a <a href="http://www.commanderbond.net/Categories/9.html">Die Another Day</a>
How can I get it to display:

Quote:
Check out the lastest Bond news here at [dad]
...when editing a post...?
Reply With Quote
  #54  
Old 07-16-2002, 06:35 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can't, you need to make [dad] a vB Code.
Reply With Quote
  #55  
Old 07-16-2002, 10:17 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

or he can make small modifications to your /me hack chen
Reply With Quote
  #56  
Old 09-03-2002, 02:18 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works with 2.2.7.
Reply With Quote
  #57  
Old 10-29-2002, 10:12 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gamer - https://vborg.vbsupport.ru/showthrea...&postid=316171

Satan
Reply With Quote
  #58  
Old 10-29-2002, 10:19 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you're infuriated about me posting in every hack I have installed - but it'd OK for you to come behind me and post the same message over and over when you don't even have the hacks installed? Hmmm...

Kids...
Reply With Quote
  #59  
Old 10-29-2002, 10:23 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And add to that the fact you've managed to post something as basic as "cool" in practically every hack that has got released.
Reply With Quote
  #60  
Old 10-29-2002, 10:25 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, let's take this offline - move to PM if you have to, but don't use this support thread as your private forum to argue with one another (I am referring to both Gamersforum and hellsatan).

As a note: it is okay to post a note saying that the installation has worked in a hack thread - that is fine. The hack author likes to hear feedback about his own hacks. Posting that the hack works for 2.2.8 is in general fine too. I have no real problems with Gamerforum's posts actually (I do keep track of the members here. ) In future, if members find something wrong with another member's post, do report the post - a mod will have a look at it.
Reply With Quote
  #61  
Old 10-29-2002, 10:25 PM
DrkFusion's Avatar
DrkFusion DrkFusion is offline
 
Join Date: Nov 2001
Posts: 1,926
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

By doing that you can clearly see that the similar message has been posted like so, and maybe you can see that the hacks that you posted for that, have only 1 - 4 modifications to files, where the coding has not changed from 2.2.1-2.2.8, and in the thread others have implied that it works for 2.2.7, or 2.2.8, as you being a the 'adult' should be know majority of the code for files hasn't been changed since 2.2.1, and somtimes even after 2.0.2, and be able to probably add more to the "Great Works with 2.2.8" phrase. Sure comments are good, but the same thing all the time, seems like a form of spam.

I don't want to start no fight between, me, you, satan, and n9ne, but possibly you may want to save the "Great Works with 2.2.9" posts for problems, and different types of ackknowledgements.

-Arunan
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 12:03 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.04474 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete