else
{
user_notification($mode, $post_data, $forum_id, $topic_id, $post_id, $notify_user);
mycal_submit_event($mode, $forum_id, $topic_id, $post_id);
}
{
user_notification($mode, $post_data, $forum_id, $topic_id, $post_id, $notify_user);
}
mycal_submit_event($mode, $forum_id, $topic_id, $post_id);
semere wrote: No actually it is the way they wrote the script. If you look on page 15 of this post you will see that I had this very same problem. Please read those posts and you should be able to figure out how to fix it. It is just as simple as a } was left out a few lines ahead of 689.
Code: Select all
//## Show myCalendar-Events on Front Page
$startdate = mktime()-(7*86400); //7 days
$enddate = mktime()+(14*86400); //14 days
$sql = 'SELECT
c.topic_id,
t.topic_title,
c.forum_id,
c.cal_date
FROM
' . MYCALENDAR_TABLE . ' as c,
' . TOPICS_TABLE . ' as t
WHERE
c.topic_id = t.topic_id AND
('.$enddate.' >= c.cal_date AND '.$startdate.' <= c.cal_date)
ORDER BY
c.cal_date DESC ';
$result = $db->sql_query($sql);
$numtopics=0;
while (($topic = $db->sql_fetchrow($result))&&($numtopics<5)) {
$is_auth = array();
$is_auth = auth(AUTH_ALL, $topic['forum_id'], $userdata);
if ( $is_auth['auth_read'] ) {
$numtopics+=1;
$template->assign_block_vars('eventrow', array(
'Event_title' => $topic['topic_title'],
'Event_url' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $topic['topic_id']),
'Event_date' => date ("d.m", $topic['cal_date']),
)
);
}
}
//#end mod
Code: Select all
<tr>
<td class="CatRight" height="28"><a href="{U_CALENDAR}" class="cattitle">Calendar Events</a</td>
</tr>
<!-- BEGIN eventrow -->
<tr>
<td class="row1" align="left" width="100%"><span class="gensmall">
{eventrow.Event_date} - <a href="{eventrow.Event_url}">{eventrow.Event_title}</a></span>
</td>
</tr>
<!-- END eventrow -->
I found a bug, I think.
When I delete a post with in a thread, then the Calenderevent is also deleted. So i checked the files and found out you already had the appropiate code there, but it was not called. So in posting.php I changed:
WithCode: Select all
case 'delete': case 'poll_delete': // we need to do this first just in case it fails...we don't want ghost events mycal_delete_event($topic_id, $post_id); delete_post( ....
So just added a 1 to the mycal_delete_event function, which is to check if the deleted post is the first post.Code: Select all
case 'delete': case 'poll_delete': // we need to do this first just in case it fails...we don't want ghost events mycal_delete_event($topic_id, $post_id, 1); delete_post(...
![]()
## * Version 2.1.0 requires a few SQL alterations, replacement of your mycalendar.php
## and mycalender_functions.php files, changes to posting.php, changes to posting_body.tpl
## and a lot more files to copy over to handle the popup calendar...see, so it is good
## that we have a folder. Also, there are 3 theme icons you need to move into your theme
## folder and optionally change the colors of these for other themes...
## If the colors on your popup calendar don't look so hot, you can change them in
## posting_body.tpl
Fatal error: Call to undefined function: mycal_generate_entry() in /usr/local/psa/home/vhosts/londonplunge.com/httpdocs/forums/posting.php on line 942
PLEASE POINT AT ME AND LAUGH... Found the problem...scottyman wrote: yes, done all that...
the problem I'm now having is as follows:
Fatal error: Call to undefined function: mycal_generate_entry() in /usr/local/psa/home/vhosts/londonplunge.com/httpdocs/forums/posting.php on line 942
I can't find any other references - does anyone else have any ideas?
I've renamed my table to phpbb_mycalendar - but this seems unrelated.