Verfasst: 27.09.2007 14:12
Du, ich hab das alte Forum ja noch online. Ich richte da mal eben nen User ein, dann kannste dir das mal ansehen okay ?
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
function get_private_birthdays_as_events()
{
$events = array();
$forum_ids = '0';
$sql = 'SELECT post_id, post_subject, post_text, bbcode_uid, bbcode_bitfield, enable_bbcode, enable_smilies, enable_magic_url
FROM ' . POSTS_TABLE . '
WHERE forum_id IN ('.$forum_ids.')';
$result = $GLOBALS['db']->sql_query($sql);
while ($row = $GLOBALS['db']->sql_fetchrow($result))
{
$bday = explode('.', substr($row['post_text'], -10));
$bday = array((int)$bday[0], (int)$bday[1], (int)$bday[2]);
$cond = array(
'start' => (string) gmmktime(0, 0, 0, $bday[1], $bday[0], $bday[2]),
'end' => '',
'week_of_month' => '',
'week_of_month_begin' => '',
'week_of_year' => '',
'week_of_year_begin' => '',
'w' => '',
'd' => (string) $bday[0],
'm' => (string) $bday[1],
'Y' => '',
'anti' => 0,
'priority' => 1
);
$flags = ($row['enable_bbcode'] ? 1 : 0) + ($row['enable_smilies'] ? 2 : 0) + ($row['enable_magic_url'] ? 4 : 0);
$desc_edit = decode_message($row['post_text']);
$events[] = array(
'event_url' => append_sid("{$GLOBALS['phpbb_root_path']}viewtopic.{$GLOBALS['phpEx']}", 'p='.$row['post_id']),
'event_name' => sprintf($GLOBALS['user']->lang['_BIRTHDAY_OF'], $row['post_subject']),
'event_desc_edit' => $desc_edit,
'event_desc_clean' => generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $flags),
'author' => ANONYMOUS,
'cat_id' => CAL_BIRTHDAY_CAT,
'conditions' => array($cond),
);
}
$GLOBALS['db']->sql_freeresult($result);
return $events;
}
Code: Alles auswählen
$forum_ids = '0';
Code: Alles auswählen
$forum_ids = '11,12,13,14,15,16,17,18,19,20,21,22';
Code: Alles auswählen
function collect_events($refresh = false)
{
static $events = array();
if ($events && !$refresh)
{
return $events;
}
else
{
$events = array();
$events = array_merge($events, get_events_from_db());
$events = array_merge($events, get_birthdays_as_events());
return $events;
}
}
Code: Alles auswählen
function collect_events($refresh = false)
{
static $events = array();
if ($events && !$refresh)
{
return $events;
}
else
{
$events = array();
$events = array_merge($events, get_events_from_db());
$events = array_merge($events, get_birthdays_as_events());
$events = array_merge($events, get_private_birthdays_as_events());
return $events;
}
}
Code: Alles auswählen
SQL ERROR [ mysql5 ]
Unknown column 'bbcode_options' in 'field list' [1054]
SQL
SELECT post_id, post_subject, post_text, bbcode_uid, bbcode_bitfield, bbcode_options, enable_bbcode, enable_smilies, enable_magic_url FROM phpbb3_posts WHERE forum_id IN (11,12,13,14,15,16,17,18,19,20,21,22)
BACKTRACE
FILE: includes/db/mysql.php
LINE: 158
CALL: dbal_mysql->sql_error()
FILE: calendar/functions.php
LINE: 1526
CALL: dbal_mysql->sql_query()
FILE: calendar/functions.php
LINE: 82
CALL: get_private_birthdays_as_events()
FILE: calendar.php
LINE: 151
CALL: collect_events()
Code: Alles auswählen
$sql = 'SELECT post_id, post_subject, post_text, bbcode_uid, bbcode_bitfield, bbcode_options, enable_bbcode, enable_smilies, enable_magic_url
FROM ' . POSTS_TABLE . '
WHERE forum_id IN ('.$forum_ids.')';
Code: Alles auswählen
$sql = 'SELECT post_id, post_subject, post_text, bbcode_uid, bbcode_bitfield, enable_bbcode, enable_smilies, enable_magic_url
FROM ' . POSTS_TABLE . '
WHERE forum_id IN ('.$forum_ids.')';
Code: Alles auswählen
Fatal error: Call to undefined function: sub_str() in /homepages/14/d200439175/htdocs/mamitas/phpBB3/calendar/functions.php on line 1529
Code: Alles auswählen
$sql = 'SELECT post_id, post_subject, post_text, bbcode_uid, bbcode_bitfield, enable_bbcode, enable_smilies, enable_magic_url
FROM ' . POSTS_TABLE . '
WHERE forum_id IN ('.$forum_ids.')';
$result = $GLOBALS['db']->sql_query($sql);
while ($row = $GLOBALS['db']->sql_fetchrow($result))
{
$bday = explode('.', sub_str($row['post_text'], -10));
$bday = array((int)$bday[0], (int)$bday[1], (int)$bday[2]);
$cond = array(
'start' => (string) gmmktime(0, 0, 0, $bday[1], $bday[0], $bday[2]),
'end' => '',
'week_of_month' => '',
'week_of_month_begin' => '',
'week_of_year' => '',
'week_of_year_begin' => '',
'w' => '',
'd' => (string) $bday[0],
'm' => (string) $bday[1],
'Y' => '',
'anti' => 0,
'priority' => 1
);
Code: Alles auswählen
$bday = explode('.', sub_str($row['post_text'], -10));
Code: Alles auswählen
$bday = explode('.', substr($row['post_text'], -10));