Check if bbcode [IMG] was used while posting?

Discussion forum for MOD Writers regarding MOD Development.
Registered User
Posts: 15
Joined: Fri Feb 03, 2012 1:46 pm
Location: Poland

Check if bbcode [IMG] was used while posting?

Post by Crazzel »

Hi everyone.

I modify my phpBB3 for my needs.
I want check if user add screens to post (check if he was used [IMG] BBCode while posting).

How Can I do this?

I think the best way is check this in posting.php - when user don't use BBCode [IMG]... But how? What functions i should use for this? strpos?

Thank You for help! :)
User avatar
Registered User
Posts: 1540
Joined: Tue Aug 14, 2012 11:52 pm

Re: Check if bbcode [IMG] was used while posting?

Post by ViolaF »

what do you mean? a realtime check for your admin-eyes only, if someone post right now an [img] in postbox or..?
User avatar
Registered User
Posts: 5780
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Check if bbcode [IMG] was used while posting?

Post by AmigoJack »

Open /posting.php and find:

Code: Select all

        $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']);
After that, this array element contains the amount of img BBCodes being parsed:

Code: Select all

$message_parser-> parsed_items['img']
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
We will not come anybody anyway, nevertheless, it's best to shit this.
axe70 wrote:
Sat Oct 10, 2020 6:52 pm
But this shit is not here for you. You can follow with your.
Maybe the question, instead, was for you, who know, so you shoved us how you are.

Return to “[3.0.x] MOD Writers Discussion”