[ABD] myCalendar Mod w/selected forum integration

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
Tenki McCloud
Registered User
Posts: 91
Joined: Tue Apr 23, 2002 2:03 am
Location: Here. Y'know, here! It's a place!

Post by Tenki McCloud »

I think something might be wrong with this now. I made all the edits I'm suppose to, but I got this error:

Parse error: parse error in c:\apache\htdocs\phpbb\admin\admin_forums.php on line 689
User avatar
semere
Registered User
Posts: 15
Joined: Wed May 29, 2002 4:15 pm
Contact:

Post by semere »

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.
________________
.: Semere :.
Artheon Systems
________________
User avatar
YellowGirls
Registered User
Posts: 168
Joined: Mon Apr 15, 2002 10:08 am

Post by YellowGirls »

I have found my error!!! Yippeeeeeh :)

The error was here on posting.php:
else
{
user_notification($mode, $post_data, $forum_id, $topic_id, $post_id, $notify_user);
mycal_submit_event($mode, $forum_id, $topic_id, $post_id);
}


It must called so is this right?
{
user_notification($mode, $post_data, $forum_id, $topic_id, $post_id, $notify_user);
}
mycal_submit_event($mode, $forum_id, $topic_id, $post_id);


YellowGirls
Last edited by YellowGirls on Mon Jun 17, 2002 2:04 pm, edited 1 time in total.
Tenki McCloud
Registered User
Posts: 91
Joined: Tue Apr 23, 2002 2:03 am
Location: Here. Y'know, here! It's a place!

Post by Tenki McCloud »

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.


Thanks, man! I owe ya.
R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Post by R. U. Serious »

I fiddled a bit to get some stuff from the calendar onto the index_body.tpl.

A result can be seen here: www.handykoelsch.de

Code (call it alpha, there maybe bugs! ), if you don't know where to put the code, you shouldn't be using it anyway :D ;) Wait until a few poeple who know have checked this:

In index.php add

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
In index_body.tpl add

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 -->
This will display the first five calendar events in a timeframe from the last week to the upcoming two weeks. Change it to your needs.
Talas
Registered User
Posts: 5
Joined: Wed Apr 10, 2002 5:02 pm

Post by Talas »

Definitely a nice mod!
rhiannon
Registered User
Posts: 4
Joined: Fri Jun 14, 2002 6:25 am

javascript errors

Post by rhiannon »

Hello,
Im wondering if anyone can help me with my javascript problem Im having since adding the mod(which btw, is an awesome mod!)

I know the problem is in posting.php, but I have gone over and over the code trying to find the error, with no luck.

after adding the mods to this file none of the java script on the posting form works anymore, such as clicking on the smilies, or the tags and colors and having it inserted into the text box.

If you have any advice that would be great. Im newbish at php and javascript.

my board is at http://rhiannon.sifl.net
user: test and Pass: test
will let you see the error.

Thanks in advance :)[/b]
User avatar
Don
Registered User
Posts: 3
Joined: Tue Jan 15, 2002 9:28 am

Post by Don »

Hello,

First I have to tell you this is one of the greatest mod I've found for my board, but I have 2 small problems with it.
When somebody post a reply for one of my event and then I delete only the reply, the event disapear from the calendar.
The next one: I can't edit my event post cause the date field is missing from it.
Maybe I did something wrong...
Thank you for your help and sorry about my English!

Don from Hungary
R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Post by R. U. Serious »

Event disappearing is a known bug, it will be corrected in the next version. (You can look at mojave.mojavelinux.com I posted a quick fix for this.)

As for editing existing events, yes, you probably missed sth. when editing. I can see and change the date when I edit event-posts.
R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Post by R. U. Serious »

Here you go:
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:

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);
			delete_post( ....
With

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(...
So just added a 1 to the mycal_delete_event function, which is to check if the deleted post is the first post.
:D
scottyman
Registered User
Posts: 34
Joined: Sun Apr 07, 2002 9:45 pm
Location: London, UK
Contact:

Post by scottyman »

Does anyone know if there are any SQL changes between 2.07 and 2.17 ... i.e. I've read through the sql installer php script and it appears the same, but I'm not 100% sure.

Can anyone confirm?

Scotty
R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Post by R. U. Serious »

May be you should have read the readme. :lol: ;)
## * 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
scottyman
Registered User
Posts: 34
Joined: Sun Apr 07, 2002 9:45 pm
Location: London, UK
Contact:

Post by scottyman »

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.
scottyman
Registered User
Posts: 34
Joined: Sun Apr 07, 2002 9:45 pm
Location: London, UK
Contact:

Post by scottyman »

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.
PLEASE POINT AT ME AND LAUGH... Found the problem... :roll: Ahhh, it appears when I did my batch upload of the changed files.... :oops: Overwrite All didn't work, and for some reason, there was a prompt on my desktop to overwrite mycalendar_functions.php ... which I didn't see until I launched another instance of my ftp, when it bought it to the front!

LOl! Works nicely now!
User avatar
Don
Registered User
Posts: 3
Joined: Tue Jan 15, 2002 9:28 am

Post by Don »

THX M8!

I'll try it, and try to find my mistake, in the "editing thing"!

Don
Locked

Return to “[2.0.x] MODs in Development”

cron