Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2901

Extension Writers Discussion • parsing text. enable and disable...impossible to disable!

$
0
0
hello there!
i'm trying to disable parsing text but i cannot do it.

i've the code from the wiki:

Code:

$sql = 'SELECT post_text, bbcode_uid, bbcode_bitfield, enable_bbcode, enable_smilies, enable_magic_url    FROM ' . POST_TABLE;$result = $this->db->sql_query($sql);$row = $this->db->sql_fetchrow($result);$this->db->sql_freeresult($result);$bbcode_options =(($row['enable_bbcode']) ? OPTION_FLAG_BBCODE : 0) +(($row['enable_smilies']) ? OPTION_FLAG_SMILIES : 0) +(($row['enable_magic_url']) ? OPTION_FLAG_LINKS : 0);$mypost = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $bbcode_options);
i want to display the post in another place instead of content. so i use this function and now my text is correctly parsed.

if i want to force to disable bbcode, or smilies, or both!!.... what do I have to write?

i've tryed to see what's going on to study the function and i see that disabling via sql the post enables the value of $bbcode_options changes in 0, 4 or 6.
so i've tryed to write directly:
$mypost = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], 6);
but it does not work. always display all. :o
i've tryed
$mypost = generate_text_for_display($row['post_text'], null, $row['bbcode_bitfield'], 6);
always the same :oops: :cry:

i read in other topics, instead of number i have to use false vs true...doesn't work that too...what i have to do?!?
thanks!

Statistics: Posted by sebo — Thu Jun 05, 2025 7:24 pm



Viewing all articles
Browse latest Browse all 2901

Trending Articles