
Allerdings bin ich mit meinem Ansatz noch nicht weiter, bzw.
hab noch keine Muße gehabt zu schauen, wie nun das Ersatzbild ausgeworfen wird

sinngemäß natürlich.4seven hat geschrieben: if (user anonymous) {
ersatzbild
}
else
{
[youtube]
}
Code: Alles auswählen
// Zero the parsed items array
$this->parsed_items = array();
foreach ($this->bbcodes as $tag => $bbcode_data)
{
$this->parsed_items[$tag] = 0;
}
if (!is_array($rowset))
{
global $db;
$rowset = array();
$sql = 'SELECT *
FROM ' . BBCODES_TABLE ."
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$rowset[] = $row;
}
$db->sql_freeresult($result);
}
foreach ($rowset as $row)
{
$this->bbcodes[$row['bbcode_tag']] = array(
'bbcode_id' => (int) $row['bbcode_id'],
'regexp' => array($row['first_pass_match'] => str_replace('$uid', $this->bbcode_uid, $row['first_pass_replace']))
);
}
Code: Alles auswählen
$sql = 'SELECT *
FROM ' . BBCODES_TABLE ."
WHERE bbcode_id != 15";
$result = $db->sql_query($sql);
Code: Alles auswählen
<!-- BEGIN custom_tags_pic -->
<img src="{T_IMAGESET_PATH}/buttons/{custom_tags_pic.BBCODE_PIC}.gif" alt=""
id="{custom_tags_pic.BBCODE_TAG}" onclick="bbstyle({custom_tags_pic.BBCODE_NR})"
onmouseover="{custom_tags_pic.BBCODE_TAG}.src='{T_IMAGESET_PATH}/buttons/{custom_tags_pic.BBCODE_PIC}1.gif'; helpline('{custom_tags_pic.BBCODE_TAG}')"
onmouseout="{custom_tags_pic.BBCODE_TAG}.src='{T_IMAGESET_PATH}/buttons/{custom_tags_pic.BBCODE_PIC}.gif'; helpline('tip')" />
<!-- END custom_tags_pic -->
Code: Alles auswählen
function display_custom_bbcodes_pic()
{
global $db, $template;
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
// note for bbcodebox3 : new start counting from 78 for the bbcode ids (every bbcode takes two ids - opening/closing)
$num_predefined_bbcodes = 78;
$sql = 'SELECT *
FROM ' . BBCODES_TABLE . '
WHERE display_on_posting = 0
ORDER BY bbcode_order';
$result = $db->sql_query($sql);
$i = 0;
while ($row = $db->sql_fetchrow($result))
{
//echo $row['bbcode_pic'];
$template->assign_block_vars('custom_tags_pic', array(
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),
'BBCODE_TAG' => $row['bbcode_tag'],
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
'A_BBCODE_HELPLINE' => str_replace(array('&', '"', "'", '<', '>'), array('&', '"', "\'", '<', '>'), $row['bbcode_helpline']),
'BBCODE_PIC' => $row['bbcode_pic'],
'BBCODE_NR' => $row['bbcode_nr'],
));
$i++;
}
$db->sql_freeresult($result);
}
Code: Alles auswählen
if (($user->data['user_id'] == ANONYMOUS) && (Datenbankabfrage: Enthält das Post einen youtube Tag))
{
Parse den youtube-Tag + Inhalt nicht, sondern zeige ein Ersatzbild
}
else
{
Parse den youtube-Tag + Inhalt
}
Code: Alles auswählen
// Parse the message and subject
$message = censor_text($row['post_text']);
// Second parse bbcode here
if ($row['bbcode_bitfield'])
{
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
}
$message = bbcode_nl2br($message);
$message = smiley_text($message);
Code: Alles auswählen
$row['post_text'] = preg_replace('/\[(center)\]\[(size)=[0-9][0-9][0-9]\:[0-9a-z\:]+\](.*?)\[\/?(size)\:[0-9a-z\:]+\]\[\/?(center)\]/sim', '', $row['post_text']);