Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 04-24-2010, 06:48 PM
Manoel J?nior Manoel J?nior is offline
 
Join Date: Feb 2009
Location: SP / Brasil
Posts: 778
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Disable [IMG] In [QUOTE] Tags

How to disable [IMG] in [QUOTE] in the topic in vB4.x

See:

https://vborg.vbsupport.ru/showthread.php?t=77173
Reply With Quote
  #2  
Old 04-24-2010, 07:17 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:
1) Edit ./includes/class_bbcode.php
2) Search:
PHP Code:
$templater vB_Template::create($this->printable 'bbcode_quote_printable' 'bbcode_quote'); 
3) Before add:
PHP Code:
if ($this->contains_bbcode_img_tags($message)) 
        {
        
$message preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe'"\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')"$message);
        } 
Reply With Quote
  #3  
Old 04-26-2010, 11:59 PM
Manoel J?nior Manoel J?nior is offline
 
Join Date: Feb 2009
Location: SP / Brasil
Posts: 778
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THANKS my bro!!!!

Great!
Reply With Quote
  #4  
Old 08-01-2010, 05:26 PM
Dirt Bike Addict's Avatar
Dirt Bike Addict Dirt Bike Addict is offline
 
Join Date: Apr 2010
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use this for vB 4.0.5

1) Edit ./includes/class_bbcode.php
2) Search:
PHP Code:
$templater vB_Template::create($this->printable $this->quote_printable_template $this->quote_template); 
3) Add this above it:
PHP Code:
if ($this->contains_bbcode_img_tags($message))
        {
        
$message preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe'"\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')"$message);
        } 
Thanks to vB Style for the vB 4.0.3 code, I had to modify it for vB 4.0.5 though.
Reply With Quote
  #5  
Old 08-15-2010, 03:40 PM
Manoel J?nior Manoel J?nior is offline
 
Join Date: Feb 2009
Location: SP / Brasil
Posts: 778
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great!!!
Reply With Quote
  #6  
Old 08-10-2011, 01:32 PM
archet1337's Avatar
archet1337 archet1337 is offline
 
Join Date: Sep 2009
Location: Norway
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dirt Bike Addict View Post
Use this for vB 4.0.5

1) Edit ./includes/class_bbcode.php
2) Search:
PHP Code:
$templater vB_Template::create($this->printable $this->quote_printable_template $this->quote_template); 
3) Add this above it:
PHP Code:
if ($this->contains_bbcode_img_tags($message))
        {
        
$message preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe'"\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')"$message);
        } 
Thanks to vB Style for the vB 4.0.3 code, I had to modify it for vB 4.0.5 though.


Tried this on my 4.1.5 board, but it didn't work. What do I have to change to make work?


Edit, never mind, got it working by replacing the contents of bbcode_quote template with this:

Code:
<div class="bbcode_container">
	<div class="bbcode_quote">
		<div class="quote_container">
			<div class="bbcode_quote_container"></div>
			<vb:if condition="$show['username']">
				<div class="bbcode_postedby">
					<img src="{vb:stylevar imgdir_misc}/quote_icon.png" alt="{vb:rawphrase quote}" /> {vb:rawphrase originally_posted_by_x, {vb:raw username}}
					<vb:if condition="$postid"><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}showthread.php?{vb:raw session.sessionurl}p={vb:raw postid}#post{vb:raw postid}" rel="nofollow"><img class="inlineimg" src="{vb:stylevar imgdir_button}/viewpost-{vb:stylevar right}.png" alt="{vb:rawphrase view_post}" /></a></vb:if>
				</div>
				<div class="message">{vb:raw message}</div>
			<vb:else />
				{vb:raw message}
			</vb:if>
		</div>
	</div>
</div>
Reply With Quote
Reply

Thread Tools
Display Modes

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:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07507 seconds
  • Memory Usage 2,224KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete