Calendar template(s)

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Postby Parahead » Sat Dec 04, 2004 10:22 pm

ccunet wrote:Did the previous update ever get released publicly?
If you by "previous update" mean the version I have been working on it hasn´t. I have tried to save myself from problem since it really lacks any real documentation and I do not have time to provide any right now either, but maybe I should release it anyway AS-IS?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby ccunet » Sun Dec 05, 2004 1:57 am

I'd vote for that then we can put the documentation together as we go along.

CCUnet
ccunet
 
Posts: 182
Joined: Tue Apr 16, 2002 12:48 am

Postby Parahead » Sun Dec 05, 2004 10:03 am

ccunet wrote:I'd vote for that then we can put the documentation together as we go along.
OK, here we go: http://www.parahead.com/coranto/addons?smcCal.zip

Any and all contributions to the documentation is much welcomed, I have not been in poking with this script for a long time so don´t expect me to remember every bit and piece of it, OK... :-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby ccunet » Mon Dec 06, 2004 2:55 pm

I've got the original smcal up and running with coranto and I'm using the ssi feature on my front page. However the date format shown from smcal is Sun, Dec 5 and then the event. Is there a way to change that to just have Dec 5 then the event.

I'm going to be checking out the update smcal this week and I will report any documentation addition I discover.

CCUnet
ccunet
 
Posts: 182
Joined: Tue Apr 16, 2002 12:48 am

Postby Parahead » Mon Dec 06, 2004 7:01 pm

ccunet wrote:I've got the original smcal up and running with coranto and I'm using the ssi feature on my front page. However the date format shown from smcal is Sun, Dec 5 and then the event. Is there a way to change that to just have Dec 5 then the event.
I guess, depending on how much Perl you know and want to mess around the inside of smcCal? ;-)

ccunet wrote:I'm going to be checking out the update smcal this week and I will report any documentation addition I discover.
Well, since the documentation is non existant that will be quite much... ;-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Dale Ray » Mon Dec 06, 2004 7:50 pm

ccunet wrote:I've got the original smcal up and running with coranto and I'm using the ssi feature on my front page. However the date format shown from smcal is Sun, Dec 5 and then the event. Is there a way to change that to just have Dec 5 then the event.

I'm going to be checking out the update smcal this week and I will report any documentation addition I discover.

CCUnet


If you've downloaded or looked at the document I have on using smcCal with Coranto, there is an entire section on modifying smcCal's ssi output. I suggest you add anew sub that uses the format you want (It's not that hard).

Edit 11-10-2018 - fixed links and removed dead reference.
Dale Ray
User avatar
Dale Ray
 
Posts: 1005
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Parahead » Mon Dec 06, 2004 9:29 pm

Dale Ray wrote:If you've downloaded or looked at the document I have on using smcCal with Coranto, there is an entire section on modifying smcCal's ssi output. I suggest you add anew sub that uses the format you want (It's not that hard). You can see an example of modified output at the SSC Volleyball homepage under the heading 'Upcoming Games and Events'.
Aha, I was not aware that it was that easy to change the date output. It was some time ago I poked around this script... ;-)

And I am sorry, I should have been more clear about the fact that I ment documentation regarding the small layout of smcCal. Dale Ray has done a great job of describing how to work with smcCal in general with Coranto. :-D
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby ccunet » Mon Dec 06, 2004 9:32 pm

Dale Ray wrote:If you've downloaded or looked at the document I have on using smcCal with Coranto, there is an entire section on modifying smcCal's ssi output. I suggest you add anew sub that uses the format you want (It's not that hard). You can see an example of modified output at the SSC Volleyball homepage under the heading 'Upcoming Games and Events'.


I have seen that documentation but I was hoping that I didn't have to mess around with the inards of the script.

CCunet
ccunet
 
Posts: 182
Joined: Tue Apr 16, 2002 12:48 am

Postby Dale Ray » Mon Dec 06, 2004 9:46 pm

Parahead wrote:And I am sorry, I should have been more clear about the fact that I ment documentation regarding the small layout of smcCal. Dale Ray has done a great job of describing how to work with smcCal in general with Coranto. :-D


You've got nothing to be sorry about, besides I was supposed to give you some input on the docs and haven't done so. :cry:

I like docs, but I like new, innovative, ways to use Coranto and the addons even more. Keep up the good work.

ccunet,

If you look at the section on customizing the output you will see that it is not that hard. If you want I can e-mail you the version I am using at sscvolleyball.org, let me know.
Dale Ray
User avatar
Dale Ray
 
Posts: 1005
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby ccunet » Mon Dec 06, 2004 10:12 pm

Parahead wrote:And I am sorry, I should have been more clear about the fact that I meant documentation regarding the small layout of smcCal.

I got that. Your small layout is similar to the anchorcal php except it is encapsulated in the script correct?

CCUnet
ccunet
 
Posts: 182
Joined: Tue Apr 16, 2002 12:48 am

Postby ccunet » Tue Dec 07, 2004 12:56 am

Dale Ray wrote:If you've downloaded or looked at the document I have on using smcCal with Coranto, there is an entire section on modifying smcCal's ssi output. I suggest you add anew sub that uses the format you want (It's not that hard). You can see an example of modified output at the SSC Volleyball homepage under the heading 'Upcoming Games and Events'.


Dale,
Can you tell me which of these variables controls the day part of the ssi calendar?
Code: Select all
$yyyy   = substr($date,0,4);
         $mm   = substr($date,4,2);
         $dd   = substr($date,6,2);

         $dd   -= 0;
         $dndx   = &dayofweek($yyyy,$mm,$dd);
         $date   = $weekdays[$dndx] .


Thanks
CCunet
ccunet
 
Posts: 182
Joined: Tue Apr 16, 2002 12:48 am

Postby Dale Ray » Tue Dec 07, 2004 4:07 am

ccunet,

Here is the routine I use. Some of the original lines are commented out. I have added comments for explanation in other spots. Remember, the forum may wrap some lomg lines.

Code: Select all
   # *************************************************************** #
   # *  Print events for the next x days only.         * #
   # *************************************************************** #
   elsif ($style =~ /^days(\d+)$/) {

      $days      = $1;
      $today      = $today_yyyy . $today_mm . $today_dd;
      $lastdate   = &dateadd($today_yyyy,$today_mm,$today_dd,$days);
                $jsmsgcnt       = 0;
                $msgcnt         = 0;
                $dateold        = "";

      foreach (@caldata) {
         ($ndx,$date,$txcolor,$bgcolor,$title,$url,$msg) = split(/\Q$sep/);

         next unless (($date >= $today) && ($date <= $lastdate));

         #year
         $yyyy   = substr($date,0,4);
         #month
         $mm   = substr($date,4,2);
         #day
         $dd   = substr($date,6,2);

         $dd   -= 0;
         $dndx   = &dayofweek($yyyy,$mm,$dd);
         #make the date into a readable format
         $date   = $weekday[$dndx] . ', ' . $month[$mm - 1] . ' ' . $dd;

         if ($msg ne '') {
            $url      = "javascript:msgAlert(${ndx})";
            $msgs[$ndx]   = $title . '\n' . $msg;
            $msgs[$ndx]   =~ s/<br>/\\n/g;
            $msgs[$ndx]   =~ s/'/\\'/g;

            $jsmsgcnt++;
         }

         $title   = "<a href=\"$url\">$title</a>" if ($url ne '');
                        $msgcnt++;

#         print   "<tr>\n",
#            "<td class=\"smc\">$date</td>\n",
#            "<td class=\"smc\">$title</td>\n",
#
#            "</tr>\n";
                         if ($msgcnt == 1){
                               #this next line writes the header for the events section - alter as needed
                                         print "<div class=\"article-teaser\">Upcoming Games and Events</div>\n<dl class=\"events\">\n";
                                         print   "<!-- Printing events from $today to $lastdate -->\n";
                                            }
                                     #this prints the events for a day, with the date only once
                              if ($date ne $dateold) {
                                                print "<dt><strong>$date</strong></dt>\n";
                                                print "<dd>$title</dd>\n";
                                                $dateold = $date;
                                                } else {
                                                print "<dd>$title</dd>\n";
                                                }

#                         print "<li>$date - $title</li>\n";
                                    $lcv++;
                                    }
                                        if ($msgcnt) {
                                                  print "</dl>";
                                                  }
               
               
#      unless ($lcv) {
#         if    ($days == 0)   { $msg = "No events for today."; }
#         elsif ($days == 1)   { $msg = "No events for today or tomorrow."; }
#         else         { $msg = "No events for the next $days days."; }
#
#         print   "<tr>\n",
#            "<td class=\"smc\" colspan=\"2\" align=\"center\">$msg</td>\n",
#            "</tr>\n";
#      }
   }
Dale Ray
User avatar
Dale Ray
 
Posts: 1005
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Parahead » Tue Dec 07, 2004 12:07 pm

Dale Ray wrote:
Parahead wrote:And I am sorry, I should have been more clear about the fact that I ment documentation regarding the small layout of smcCal. Dale Ray has done a great job of describing how to work with smcCal in general with Coranto. :-D

You've got nothing to be sorry about, besides I was supposed to give you some input on the docs and haven't done so. :cry:
Well, I was sorry for me saying that the documentation was "non existant", which really wasn´t true, since it is only the "small layout"-part of the script that isn´t documented... And no worries about the doc, now I have released this version and we take it from here regarding the doc part. :-)

Dale Ray wrote:I like docs, but I like new, innovative, ways to use Coranto and the addons even more. Keep up the good work.
Thanks! :-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby fridolf78 » Thu Jan 27, 2005 1:22 pm

[quote="Parahead"]I have created a new version of smcCal now that is a little bit more userfriendly than my first "hacked" version. It also includes a modified (improved?) version of your multiple config-files solution, Dale Ray. quote]

What differs from Dale's multiple config-files solution?
fridolf78
 
Posts: 60
Joined: Mon Feb 16, 2004 1:32 pm

Postby Parahead » Thu Jan 27, 2005 3:29 pm

fridolf78 wrote:
Parahead wrote:I have created a new version of smcCal now that is a little bit more userfriendly than my first "hacked" version. It also includes a modified (improved?) version of your multiple config-files solution, Dale Ray.

What differs from Dale's multiple config-files solution?
You ask me about a thing I wrote a year ago about a script I haven´t really touched since then... I truly do not remember, sorry...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

PreviousNext

Return to Customization

Who is online

Users browsing this forum: Bing [Bot] and 6 guests

cron