dmkratt wrote:I am experiencing the same issue here. bbcode is not being converted on display.
In addition, when I go into the announcements ACP edit page, the previewed display is showing unconverted bbcode as well when it first comes up. If I click preview again it displays correctly.
meggy79 wrote:I have installed the mod but I have a problem. When I try to edit ananouncement draft( try to change the color of the word ana make bold) , I have the result below:
announcements.jpg
I think there is an error in converting bbcode to css code. Please help!
Have triple checked every file modification, uninstalled and reinstalled several times,
cleared templates and cache. Was this ever resolved?
Not yet in production. Every other part of this mod is working correctly, just not correctly rendering bbcode.
Figured out what is occurring.
In debug mode, received these messages:
[phpBB Debug] PHP Notice: in file /includes/functions_announcements.php on line 185: Undefined index: announcement_text_bbcode_bitfield
[phpBB Debug] PHP Notice: in file /includes/functions_announcements.php on line 185: Undefined index: announcement_text_bbcode_options
[phpBB Debug] PHP Notice: in file /includes/functions_announcements.php on line 195: Undefined index: announcement_text_guests_bbcode_uid
[phpBB Debug] PHP Notice: in file /includes/functions_announcements.php on line 195: Undefined index: announcement_text_guests_bbcode_bitfield
[phpBB Debug] PHP Notice: in file /includes/functions_announcements.php on line 195: Undefined index: announcement_text_guests_bbcode_options
This line retrieves the values in includes/functions_announcements.php:
Code: Select all
$sql = 'SELECT *
FROM ' . ANNOUNCEMENTS_CENTRE_TABLE;
I am on SQL Server, not sure if makes a difference,
but the names such as
announcement_text_bbcode_bitfield appear to get trimmed and cannot be found in the resultset. Therefore I converted the above to:
Code: Select all
$sql = 'SELECT *, announcement_text_bbcode_uid as uid, announcement_text_bbcode_bitfield as bf, announcement_text_bbcode_options bo, announcement_text_guests_bbcode_uid g_uid, announcement_text_guests_bbcode_bitfield as g_bf, announcement_text_guests_bbcode_options as g_bo
FROM ' . ANNOUNCEMENTS_CENTRE_TABLE;
and
converted the line:
Code: Select all
$announcement_text = generate_text_for_display($announcement['announcement_text'],$announcement['announcement_text_bbcode_uid'], $announcement['announcement_text_bbcode_bitfield'], $announcement['announcement_text_bbcode_options']);
to
Code: Select all
$announcement_text = generate_text_for_display($announcement['announcement_text'],$announcement['uid'],$announcement['bf'],$announcement['bo']);
and converted the line:
Code: Select all
'ANNOUNCEMENT_TEXT_GUESTS' => generate_text_for_display($announcement['announcement_text_guests'],$announcement['announcement_text_guests_bbcode_uid'], $announcement['announcement_text_guests_bbcode_bitfield'], $announcement['announcement_text_guests_bbcode_options']),
to
Code: Select all
'ANNOUNCEMENT_TEXT_GUESTS' => generate_text_for_display($announcement['announcement_text_guests'],$announcement['g_uid'], $announcement['g_bf'], $announcement['g_bo']),
Now, bbcode is getting correctly parsed