HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Calendar Block Error

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#42735 (In Topic #9522)
Avatar

Community saint

4.0-RC4

I noticed if you make the selection "Week starts on a Sunday" in the setting it works with the main Calendar which is awesome. The problem is that it has no effect on the Calendar block in the right Column

Rick Henson

OCP 4.3.2 & 5.0.1
PHP 5.2.5
MySQL 5.0.51a
FireFox 3.6.8
Back to the top
 
Posted
Rating:
#42747
Avatar

Community saint

Rick, I think you probably need to edit BLOCK_SIDE_CALENDAR.tpl, lines 9 thru 15 …

Code

         <thead>
            <tr>
               <th>{$AT*,{!MONDAY},0}</th>
               <th>{$AT*,{!TUESDAY},0}</th>
               <th>{$AT*,{!WEDNESDAY},0}</th>
               <th>{$AT*,{!THURSDAY},0}</th>
               <th>{$AT*,{!FRIDAY},0}</th>
               <th>{$AT*,{!SATURDAY},0}</th>
               <th>{$AT*,{!SUNDAY},0}</th>
            </tr>
         </thead>

Unless the staff say different …

 :$

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#42750
Avatar

Community saint

Looks correct to me.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#42751
Avatar

Indeed, this looks like it.

Template that applies this change attached:
Attachment
» Download: BLOCK_SIDE_CALENDAR.tpl (783 Bytes, 241 downloads so far)


However I think you've found a bug. I think if you look at your block with this option on then actually all the days must be misaligned by one. This is because the template which we're fixing here was wrong but the code was right.
Correct me if I'm wrong about this though please.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42758
Avatar

Community saint

Thanks Chris, but your attached BLOCK_SIDE_CALENDAR.tpl didn't display as a block. So I did a bit of judicious cobbling together and came up with this …

Code

{+START,BOX,{$?,{$CONFIG_OPTION,tray_support},{MONTH*},{!CALENDAR} - {MONTH*}},{$PANEL_WIDTH},panel,tray_open}

<div class="side_calendar_wrap">
      <div class="wide_table_wrap"><table summary="{!SPREAD_TABLE}" class="wide_table side_calendar">
         <thead>
            <tr>
               <th>{$AT*,{!SUNDAY},0}</th>
               <th>{$AT*,{!MONDAY},0}</th>
               <th>{$AT*,{!TUESDAY},0}</th>
               <th>{$AT*,{!WEDNESDAY},0}</th>
               <th>{$AT*,{!THURSDAY},0}</th>
               <th>{$AT*,{!FRIDAY},0}</th>
               <th>{$AT*,{!SATURDAY},0}</th>

            </tr>
         </thead>
   
         
{+START,IF,{$SSW}}  {$AT*,{!SUNDAY},0} {+END}  {$AT*,{!MONDAY},0} {$AT*,{!TUESDAY},0} {$AT*,{!WEDNESDAY},0} {$AT*,{!THURSDAY},0} {$AT*,{!FRIDAY},0} {$AT*,{!SATURDAY},0} {+START,IF,{$NOT,{$SSW}}}  {$AT*,{!SUNDAY},0} {+END}  
{ENTRIES}
      </table></div>
   </div>
  
{+END}


It works without the necessity to edit anything else!

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#42776
Avatar

Community saint

Thanks Fletch, that seems to have fixed the block problem, now I just need a fix for the Week view of the main Calendar.

Rick Henson

OCP 4.3.2 & 5.0.1
PHP 5.2.5
MySQL 5.0.51a
FireFox 3.6.8
Back to the top
 
Posted
Rating:
#42777
Avatar

Community saint

LOL Rick!

Now MY test site is displaying Sunday as the start day in the block, but it is ONLY a test site!

I have to admit I haven't tinkered around with the main Calendar yet, but if I get there before you (or Chris), I'll post it here.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#42780
Avatar

Community saint

Well I played with it some more and Chris's is closer to the fix. Fletch's has some problems with the title and missing the link to the Calendar at the top.

Chris's looks good and also changes with the settings as it should but there is still a problem. When looking at the side block and the Main Calendar you will see the date is not correct with the day of the week on the Side Block view.





Last edit: by rick

Rick Henson

OCP 4.3.2 & 5.0.1
PHP 5.2.5
MySQL 5.0.51a
FireFox 3.6.8
Back to the top
 
Posted
Rating:
#42781
Avatar

Community saint

Yup, spotted that and fixed it locally, but not necessarily to your satisfaction, so I won't post it here.

However, it appears the problem now lies with the side block and not the main calendar. October 1st, 2008 was a Wednesday - but your block (and mine) shows it as a Tuesday! It appears that arbitrarily changing the template doesn't change the order that the dates are displayed. Back to the drawing board.

 :$

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#42786
Avatar

New sources/blocks/side_calendar.php which hopefully will finally nail this problem.

Attachment
» Download: side_calendar.php (8 Kb, 238 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42788
Avatar

Community saint

Chris, if you were a girl I would kiss you, since your not I'll just say your the man!!!

Rick Henson

OCP 4.3.2 & 5.0.1
PHP 5.2.5
MySQL 5.0.51a
FireFox 3.6.8
Back to the top
 
Posted
Rating:
#42792
Avatar

Community saint

I will take a kiss.  :lol:

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#42824
Avatar

Community saint

Ami,


Rick Henson

OCP 4.3.2 & 5.0.1
PHP 5.2.5
MySQL 5.0.51a
FireFox 3.6.8
Back to the top
 
Posted
Rating:
#42826
Avatar

Community saint

aww thanks.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: