Announcement

Collapse
No announcement yet.

Calendar - Making it easier to switch between them

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calendar - Making it easier to switch between them

    On my forum, I have two calendars - they are based on geography with one being the North and one the South. I have heard lots of complaints from users not being able to find the second calendar (south).

    We all know that they could go to the calendar jump at the bottom right of the page and choose another calendar, however many people don;t know it's there or have found it cumbersome.

    I would like to put something at the top of the page that allows them to click to another calendar if they choose to do so.

    Has anyone done something like this or have any suggestions to make it easier to switch between calendars.

    Thanks for you help,
    Scott

  • #2
    Try adding another link to the navbar:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Navigation / Breadcrumb Templates -> navbar

    Find this code, add the blue code:

    Code:
    		<if condition="$show['registerbutton']">
    			<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
    		</if>
    		<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
    		<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
    		<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
    		[color=blue]<td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]c=[color=red]#[/color]">[color=red]Calendar Name[/color]</a></td>[/color]
    		<if condition="$show['popups']">		
    			<if condition="$show['searchbuttons']">
    				<if condition="$show['member']">
    				<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
    Where # is the calendarid of the calendar. Change the Calendar Name appropriately.

    Comment


    • #3
      Thanks but I do not really want to add it to the Navbar. I would, however, be intersted in having it like the attached sample. In this sample, I added the text, "Click here for Southern California Calendar".

      Thanks for any help you (or anyone) can offer.

      -Scott


      Originally posted by Jake Bunce
      Try adding another link to the navbar:

      Admin CP -> Styles & Templates -> Style Manager -> « » -> Navigation / Breadcrumb Templates -> navbar

      Find this code, add the blue code:

      Code:
              <if condition="$show['registerbutton']">
                  <td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
              </if>
              <td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
              <td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
              <td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
              [COLOR=blue]<td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]c=[COLOR=red]#[/COLOR]">[COLOR=red]Calendar Name[/COLOR]</a></td>[/COLOR]
              <if condition="$show['popups']">        
                  <if condition="$show['searchbuttons']">
                      <if condition="$show['member']">
                      <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
      Where # is the calendarid of the calendar. Change the Calendar Name appropriately.
      Attached Files

      Comment


      • #4
        CALENDAR template:

        Code:
        <div style="padding:0px 0px $stylevar[cellpadding]px 0px">
        
        	<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        	<tr>
        		<td class="tcat" width="100%">$calendarinfo[title] - [color=blue]<a href="calendar.php?$session[sessionurl]c=[color=red]#[/color]">[color=red]Calendar Name[/color]</a>[/color]</td>
        		
        		<if condition="$show['popups']">
        			<td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]c=$calendarinfo[calendarid]&amp;month=$today[mon]&amp;year=$today[year]">$vbphrase[show_today]</a></td>
        			<td class="vbmenu_control" id="cal_mode">
        				<if condition="$show['weeklyview']">
        					<a href="$show[nojs_link]#goto_viewtype">$vbphrase[weekly_view]</a>
        				</if>

        Comment


        • #5
          Cool - only problem is that now the text is the same on both pages.

          For example, the code is fine if I am on the Northern California page, however, when I am on the Southern California Calendar page, I have duplicate text.

          Any suggestions for how I can have have it show differently for each calendar.

          For example, on the Northern California Calendar Page, it should look like this:

          Northern California Calendar - Click for Southern California

          but on the Southern California Calendar page it should look like this:

          Southern California Calendar - Click for Northern California

          ---

          -Thanks for your help Jake.

          Comment


          • #6
            Use a conditional structure like this:

            Code:
            [color=blue]<if condition="$calendarid == [color=red]#[/color]">
            	<a href="calendar.php?$session[sessionurl]c=[color=red]#[/color]">[color=red]Calendar Name[/color]</a>
            </if>
            <if condition="$calendarid == [color=red]#[/color]">
            	<a href="calendar.php?$session[sessionurl]c=[color=red]#[/color]">[color=red]Calendar Name[/color]</a>
            </if>[/color]

            Comment


            • #7
              great - it works now...

              appreciate all your help.

              scott

              Comment


              • #8
                edited - dumb question
                Regards
                Graham.
                TheVIPzone.org ( A work in progress :) )
                The Visually Impaired Community Site.

                Comment


                • #9
                  I realise this is probably more of a .org question, however to continue this post...

                  I also want to have this function as described, but am having an issue making it happen.

                  I get the error
                  Parse error: parse error, unexpected '<' in /home/church/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 18

                  This is the upper section of code to include that area. Please feel free to point out the mistake im making in the application of this snippet...
                  Im also using a different style; aria, in case that makes any difference but I wouldnt imagine so. My calendar names are already filled out; North/South Island events.

                  PHP Code:
                  $stylevar[htmldoctype]
                  <
                  html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
                  <
                  head>
                  $headinclude
                  <title>$vboptions[bbtitle] - $vbphrase[calendar]</title>
                  </
                  head>
                  <
                  body>
                  $header
                  $navbar
                  <if condition="$show['popups'] == 0"></if>
                  <
                  div style="padding:0px 0px $stylevar[cellpadding]px 0px">
                  <
                  table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
                  <
                  tr>
                  <
                  td class="tcat" width="100%">$calendarinfo[title]<if condition="$calendarid == #">
                  <
                  a href="calendar.php?$session[sessionurl]c=#">North Island Events</a>
                  </if>
                  <if 
                  condition="$calendarid == #">
                  <
                  a href="calendar.php?$session[sessionurl]c=#">South Island Events</a>
                  </if></
                  td>
                   
                  <if 
                  condition="$show['popups']">
                  <
                  td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]c=$calendarinfo[calendarid]&amp;month=$today[mon]&amp;year=$today[year]">$vbphrase[show_today]</a></td>
                  <
                  td class="vbmenu_control" id="cal_mode">
                  <if 
                  condition="$show['weeklyview']">
                  <
                  a href="$show[nojs_link]#goto_viewtype">$vbphrase[weekly_view]</a>
                  </if>
                  <if 
                  condition="$show['monthlyview']">
                  <
                  a href="$show[nojs_link]#goto_viewtype">$vbphrase[monthly_view]</a>
                  </if>
                  <if 
                  condition="$show['yearlyview']">
                  <
                  a href="$show[nojs_link]#goto_viewtype">$vbphrase[yearly_view]</a>
                  </if>
                  <
                  script type="text/javascript"vbmenu_register("cal_mode"); </script
                  </
                  td>
                  <
                  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>
                  </if>
                   
                  </
                  tr>
                  </
                  table

                  Comment


                  • #10
                    You didn't replace the # with a calendarid.

                    Comment


                    • #11
                      DOW! Wicked thanks heaps!!

                      Comment

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