Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: calmmarc - toukokuu 17, 2005, 10:55:08 AP

Otsikko: File attachments and events on the calendar
Kirjoitti: calmmarc - toukokuu 17, 2005, 10:55:08 AP
Hi,

I've spotted a problem on my SMF installation (version 1.0.3 upgraded from 1.0.2).

When I post a new event on the calendar I cannot add file attachments unless I am logged in as the webmaster.  Nobody else seems to have permission to post events even though I think I have the permissions set up correctly.

Strangely, everybody can add file attachments when they post replies, but not when the calendar event is first created.

Has anybody else had this problem?

Thanks,
Marc
Otsikko: Re: File attachments and events on the calendar
Kirjoitti: [Unknown] - toukokuu 25, 2005, 10:33:31 AP
I'm afraid it's not checking permissions properly in this case.  I'll look into it.

-[Unknown]
Otsikko: Re: File attachments and events on the calendar
Kirjoitti: stewart_m - syyskuu 23, 2005, 12:33:48 IP
I have also run into this problem both with 1.0.5 and the new version. I realise that this topic hasn't been updated in a while so possibly the solution has been posted elsewhere, however, this was the only post I could find that mentioned it.

To re-iterate, when a user, other than the administrator, posts a message to the calendar, there is no option to add an attachment when initially posting the event. It is however, possible to add attachments to all subsequent posts in the thread and it is also possible for the user to modify their original post and add an attachment.

Any Ideas?
Otsikko: Re: File attachments and events on the calendar
Kirjoitti: stewart_m - syyskuu 24, 2005, 08:49:38 AP
I have had a a look at the attachment code at line 729 in Post.php and it is commented

   
Lainaa// !!! This won't work if you're posting an event.

not really sure if this is due the design or problems with the code when used in conjunction with the event code.

If it is by design it does not really make sense to disallow the original poster from posting an attachment on the initial event post and then allow them to then go back and modify the post with the option to then inset an attachment.
Otsikko: Re: File attachments and events on the calendar
Kirjoitti: stewart_m - syyskuu 28, 2005, 12:27:20 IP
I have had another think about this and as the administrator can post attachments on the initial calendar post it must be checking the permissions and disallowing everyone but admin from posting an attachment. Not php literate to work out the code though to look for who, as well as admin has attachment posting rights during the initial calendar post.
Otsikko: Re: File attachments and events on the calendar
Kirjoitti: iowamf - joulukuu 02, 2005, 10:15:15 AP
It seems only "admin" can add attachments to the Event Calendar?

This can't be right ???