Advertisement:

Prevent users from changing Calendar posting location

Aloittaja king kratos, helmikuu 16, 2014, 08:51:09 IP

« edellinen - seuraava »

king kratos

Hello,

I want to prevent users from changing where a new calendar event can be posted. I think all I really need to do is hide the "Post In:" portion of a new event, but cannot seem to get this to hide. I either receive fatal errors or it just doesn't go away.

Any ideas what I need to do to get this to become invisible?

Thanks,
Kratos

margarett

That would require some coding, yes... You can easily hide it, although it can be discovered by someone using, eg, Firebug...

Post.template.php
Find:

// If this is a new event let the user specify which board they want the linked post to be put into.
if ($context['event']['new'] && $context['is_new_post'])
{
echo '
<li>
', $txt['calendar_post_in'], '

Replace with:

// If this is a new event let the user specify which board they want the linked post to be put into.
if ($context['event']['new'] && $context['is_new_post'])
{
echo '
<li style="display:none">
', $txt['calendar_post_in'], '

There is a similar code in Calendar.template.php but I can't find where it's used :P

Then you define the board you want in ACP --> Core Features --> Calendar --> Calendar settings --> Default board to post events in
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

king kratos

Lainaus käyttäjältä: margarett - helmikuu 17, 2014, 10:43:56 AP
That would require some coding, yes... You can easily hide it, although it can be discovered by someone using, eg, Firebug...

Post.template.php
Find:

// If this is a new event let the user specify which board they want the linked post to be put into.
if ($context['event']['new'] && $context['is_new_post'])
{
echo '
<li>
', $txt['calendar_post_in'], '

Replace with:

// If this is a new event let the user specify which board they want the linked post to be put into.
if ($context['event']['new'] && $context['is_new_post'])
{
echo '
<li style="display:none">
', $txt['calendar_post_in'], '

There is a similar code in Calendar.template.php but I can't find where it's used :P

Then you define the board you want in ACP --> Core Features --> Calendar --> Calendar settings --> Default board to post events in

I'm not too worried about anyone seeing it as I am about them accidentally posting in the wrong forum. The information in my calendar will be on a confidential basis and if they accidentally post to a public forum, the post itself can be seen by anyone.

I will give this a try!

Thank you!

Kratos

king kratos

Yep, that worked perfectly. Didn't even need to modify the calendar.template.php.

Thanks,

Kratos

Advertisement: