No announcement yet.

Setting "Single All Day Event" in Calendar as Default

  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting "Single All Day Event" in Calendar as Default

    Hey there,
    I'm trying to set the calendar so that when a user clicks "add new event" in the calendar, that it defaults to a single all day event and not a ranged event. I know a user can choose by clicking the pull down menu and choosing single day, but I want the "add new event" link to default to a single all day event since this is what most users will click to add a new event. Can anyone direct me?


  • #2
    I guess I stumped everyone?


    • #3
      No, you only stumped the people reading in the 7 whole hours you waited for an answer!

      Hey, if you don't get a good answer, just post an explanation for your members. Your users can't be that much more ignorant than mine, and mine don't have a big problem with it.


      • #4
        LoL, yea I guess I'll setttle with that. Thanks


        • #5
          # Customize the following template(s)
          Calendar Templates [ ]
          CALENDAR [Customize]
          calendar_monthly [Customize]
          calendar_weekly [Customize]
          calendar_yearly [Customize]

          # find in template: CALENDAR

          			<td class="vbmenu_control" id="add_event"><a href="#goto_newevent">$vbphrase[add_new_event]</a> <script type="text/javascript"> vbmenu_register("add_event"); </script></td>
          # modifiy replace with

          		<td class="vbmenu_option">
          			<img class="inlineimg" src="$stylevar[imgdir_misc]/calendar_icon.gif" alt="$vbphrase[single_all_day_event]" border="0" />
          			<a href="calendar.php?$session[sessionurl]do=add&amp;type=single&amp;c=$calendarinfo[calendarid]">$vbphrase[single_all_day_event]</a>
          You can do simular with other template(s) mentioned above.


          • #6
            Thanks for the help. Actually what I want to edit is the "add new event" link that is listed for each day, not the links in the pull down menu. The code you gave me changed the pull down menu so that it only shows the "single all day" event. I just need to know how to change the "add new event" link to be a single event, not a range. I've been at it for hours and cannot get the link to edit.

            Below is a screen shot of what I mean. Thanks for the help though, it is much appreciated. very nice of you.

            Last edited by skooby; Thu 28th Jun '07, 8:24pm.


            • #7
              # Customize the following template(s)
              Calendar Templates [ ]
              calendar_weekly_day [Customize]

              # find in template: calendar_weekly_day
              # replace in blue with red/bold code
              	<td class="thead" colspan="2">
              		<a style="float:$stylevar[right]; font-weight:normal" href="calendar.php?$session[sessionurl]do=add&amp;c=$calendarinfo[calendarid]&amp;day={$weekyear}-{$month}-{$weekday}">$vbphrase[add_new_event]</a>
              # modifiy and add to with code below
              You can easily done this yourself, as this is minor editing of links.


              • #8
                Was trying to edit it in the wrong template. Thanks for all the help! Have a nice weekend.


                • #9
                  Change Calendar link default from Single to Ranged event

                  FYI, If you are on vBulletin 4x and want to change the 'Add New Event' link so that it defaults to Ranged event from Single event, just edit one template:

                  In Style Manager, under "Calendar Templates <<", edit the "CALENDAR" template.

                  <div id="calendar_nav">
                    <a href="calendar.php?{vb:raw session.sessionurl}do=add&amp;type=single&amp;c={vb:raw calendarid}" class="textcontrol" id="neweventbutton">{vb:rawphrase add_new_event}</a>
                  And replace "single" with "range"

                  So, it should look like this:
                  <div id="calendar_nav">
                    <a href="calendar.php?{vb:raw session.sessionurl}do=add&amp;type=range&amp;c={vb:raw calendarid}" class="textcontrol" id="neweventbutton">{vb:rawphrase add_new_event}</a>
                  That's it. This will change your link so that it will open with the ranged event tab as the default instead of the single event tab.


                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.