PDA


View Full Version : Calendar Question


SherryG
08-29-2007, 11:04 PM
Is it possible for me to be able to show my main vbulletin calendar in the calendar module instead of the dyna_calendar? If so, how do I do this?

Thanks so much!
Sherry

Brian
08-30-2007, 10:41 AM
You could probably use the CMPS module for that. Just go to the vBa Dynamics => Download / Upload Module link in your Admin CP, hit the browse button and navigate to the 'Extras (do NOT upload)/modules' folder that comes with the download package, and upload the minicalendar.module file.

SherryG
08-30-2007, 12:00 PM
I don't have a minicalendar module file in my download package, just a calendar module. Do I use that one instead?

Let me better explain my requirements.

I have a creative team who plan special activities/events for my website users. Along with the usual birthday calendar that comes with vbulletin, we also have a creative team calendar of events. I would like the calendar module on my vbadvanced dynamics page to show the creative team calendar.

Brian
08-30-2007, 12:02 PM
No, you need the minicalendar.module file that is located in the 'Extras (do not upload)/modules' folder that comes with the CMPS download package.

SherryG
08-30-2007, 01:17 PM
Hi Brian,

Thanks for the quick response. My apologies for the confusion :)

I did what you suggested (uploaded minicalendar.module from vBadvanced CMPS download package) and the default calendar works. However, I am unable to select my Creative Team calendar. Where the drop down menu should be, I only see the words "calendarselect".

Please see attached image.

Is there a way around this?

HenrikHansen
08-30-2007, 01:49 PM
Ahh, this is interesting feature if you can do this, so I have tried as well.

1. I get the same error as SherryG, it only says "calendarselect", no list of calendars to choose from.

2. Before that, Dynamics will initally only call my new module "Mini Calendar", even though I gave it
another title when uploading. However, the title can be changed afterwards.

Brian
08-31-2007, 01:00 PM
I forgot about the CMPS calendar module having a special setting. I'll be adding some of these things from the CMPS to vBa Dynamics to help with compatability in the next release. In the mean time, if you'll open your forum/includes/vba_dyna_adminfunctions.php file and look for this code:
default:
eval("\$right = \"<div id=\\\"ctrl_setting[$setting[varname]]\\\">$setting[optioncode]</div>\";");
print_label_row($description, $right, '', 'top', $name);

And add this right Above it:
// Calendar select box (CMPS)
case 'calendarselect':
$selectbox = '<select name="' . $name . '" class="bginput" ' . $jsdefault_onchange . ' tabindex="1">';
$selectbox .= '<option value="-1">' . $vbphrase['simple_calendar'] . '</option>';
$getcalendars = $vbulletin->db->query_read("SELECT calendarid, title FROM " . TABLE_PREFIX . "calendar");
while ($calendar = $vbulletin->db->fetch_array($getcalendars))
{
$selectbox .= '<option ' . iif($calendar['calendarid'] == $setting['value'], 'selected="selected"') . ' value="' . $calendar['calendarid']. '">' . $calendar['title'] . '</option>';
}
$selectbox .= '</select>';

print_label_row($description, $selectbox);
break;

Then that should fix the setting and allow you to choose a calendar.

SherryG
09-01-2007, 08:20 PM
Thanks so much, Brian! This worked and enabled me to select the appropriate calendar.

Now, I have another small problem. When I click on one of the event links on the calendar, I get a 'page not found' error. Here is the page address that I get taken to

mywebsite/dynamics/calendar.php?do=getinfo&day=2007-9-7&c=3


The appropriate link to the event should be:

mywebsite/forum/calendar.php?do=getinfo&e=29&day=2007-9-7&c=3

How can I fix this.

I am so sorry to be such a bother...:(

Brian
09-02-2007, 12:23 PM
Doesn't seem to be giving me any problems locally... Try editing the module and make sure that you have exactly this for the 'Templates Used' option.
adv_portal_calendar_week
adv_portal_calendar_header
adv_portal_calendar_day
adv_portal_calendar_day_other
calendar_smallmonth_day

SherryG
09-03-2007, 07:42 AM
Yep, the templates used section on my install is correct and is exactly what you have listed.

Brian
09-03-2007, 10:09 AM
Can you verify that the adv_portal_calendar_% templates exist in your Style Manager?