Check if bbcode [IMG] was used while posting?

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

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
ViolaF
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
AmigoJack
Registered User
Posts: 5782
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

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 ███████████
  • "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." Affin, 2018-11-20
  • "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." axe70, 2020-10-10
Locked

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