vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Disable [IMG] In [QUOTE] Tags (https://vborg.vbsupport.ru/showthread.php?t=241196)

Manoel J?nior 04-24-2010 06:48 PM

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

ForumsMods 04-24-2010 07:17 PM

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);
        } 


Manoel J?nior 04-26-2010 11:59 PM

THANKS my bro!!!!

Great!

Dirt Bike Addict 08-01-2010 05:26 PM

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.

Manoel J?nior 08-15-2010 03:40 PM

Great!!!

archet1337 08-10-2011 01:32 PM

Quote:

Originally Posted by Dirt Bike Addict (Post 2077740)
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>



All times are GMT. The time now is 10:10 PM.

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.01181 seconds
  • Memory Usage 1,743KB
  • 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_code_printable
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete