Welcome, Guest. Please Login or Register.
October 07, 2024, 08:31:33 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Calendar in SE 1.5.4 « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Calendar in SE 1.5.4  (Read 2286 times)
crash5456
Guest
Calendar in SE 1.5.4
« on: November 07, 2003, 07:58:48 AM »
Reply with quote

Is or has anyone made a calender mod that looks and works like the one in yabb, the little calender in info section.
Thats the one thing I miss with yabb se
I've searched through here and can't find anything like it.
I visited 3D Guys board and saw one there!

If anyone could help it would be greatly appreciated!!!!
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Calendar in SE 1.5.4
« Reply #1 on: November 07, 2003, 05:41:16 PM »
Reply with quote

any link for samples?
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
crash5456
Guest
Re:Calendar in SE 1.5.4
« Reply #2 on: November 07, 2003, 07:29:12 PM »
Reply with quote

This is our old boards addy, it will be up a few more days

http://www.tubbersrawk.com/cgi-bin/yabb/YaBB.cgi/YaBB.cgi

I used a mod from boardmod site to add it its was called

Newcalendar3_7a mod

Look near the bottom of our board you will see a little calendar, people love it, and the who's online mod with avatars on bottom right side they like that one too.


Thx for the quick reply!!!!
« Last Edit: November 07, 2003, 07:30:21 PM by crash5456 » Logged
pege
Full Member
***
Posts: 146


Re:Calendar in SE 1.5.4
« Reply #3 on: November 08, 2003, 05:57:08 PM »
Reply with quote

Quote from: crash5456 on November 07, 2003, 07:58:48 AM
Is or has anyone made a calender mod that looks and works like the one in yabb, the little calender in info section...If anyone could help it would be greatly appreciated!!!!....

Here's some crude code for a little calendar that I used on my old Yapp board.  I think you could probably hack it into submission....
Quote
<?php
{
   global $timeoffset, $settings, $txt, $cgi;

   $timeUserOff = (isset($settings[18]) ? $settings[18] : 0);
   $today = getdate(time()+(($timeoffset+$timeUserOff)*3600));    //get today's date
   for($i=0;$i<37;$i++){        //initialize calendar array
       $days[$i] = "";          //5 rows of 7, 1 row of 2
   }
   $timestamp = mktime(12,0,0,$today["mon"],1,$today["year"]); //1st day of month
   $temp = getdate($timestamp);
   $i = $temp['wday']; //first day of week in calendar - SUN == 0
   while(TRUE){    //fill-in days for calendar
       $cday = getdate($timestamp);
       if($cday['mon'] != $today['mon'])
           break;        //break on new month
       $days[$i] = $cday['mday']; //assign date
       $timestamp += 86400;  //add one day
       $i++; //increment array index
   }
   //start building calendar
   echo "
       <center>
       <table border=0 cellspacing=0 cellpading=0 width=100%>
       <td background=/yabbimages/catbg.gif width=100% align=center><font face='Arial' size='2'><a href='index.php?action=calendar'><b>{$today['month']} {$today['year']}</b></a></font></td>
       <table border='0' width=100% cellspacing='0' cellpadding='2%' bgcolor='#DFDFDF'>
       <tr align='center' bgcolor='#2FCBD7' valign='top'>
           <td><font face='Arial' color='000000' size='1'><b>S</b></font></td>
           <td><font face='Arial' color='000000' size='1'><b>M</b></font></td>
           <td><font face='Arial' color='000000' size='1'><b>T</b></font></td>
           <td><font face='Arial' color='000000' size='1'><b>W</b></font></td>
      <td><font face='Arial' color='000000' size='1'><b>T</b></font></td>
           <td><font face='Arial' color='000000' size='1'><b>F</b></font></td>
           <td><font face='Arial' color='000000' size='1'><b>S</b></font></td>
       </tr>
       <tr align='center'>";
   //first row of days
   for($i=0;$i<7;$i++){
       if($today['mday'] == $days[$i]) //highlight today in red
           echo "<td bgcolor='#C5EFF3'><font face='Arial' size='1' color='red'>{$days[$i]}</font></td>";
       else
           echo "<td bgcolor='#C5EFF3'><font face='Arial' size='1'>{$days[$i]}</font></td>";
   }
       echo "</tr><tr align='center'>";
   for($i=7;$i<14;$i++){
       if($today['mday'] == $days[$i])
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1' color='red'>{$days[$i]}</font></td>";
       else
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1'>{$days[$i]}</font></td>";
   }
       echo "</tr><tr align='center'>";
   for($i=14;$i<21;$i++){
       if($today['mday'] == $days[$i])
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1' color='red'>{$days[$i]}</font></td>";
       else
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1'>{$days[$i]}</font></td>";
   }
       echo "</tr><tr align='center'>";
   for($i=21;$i<28;$i++){
       if($today['mday'] == $days[$i])
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1' color='red'>{$days[$i]}</font></td>";
       else
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1'>{$days[$i]}</font></td>";
   }
       echo "</tr><tr align='center'>";
   for($i=28;$i<35;$i++){
       if($today['mday'] == $days[$i])
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1' color='red'>{$days[$i]}</font></td>";
       else
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1'>{$days[$i]}</font></td>";
   }
       echo "</tr><tr align='center'>";
   for($i=35;$i<37;$i++){
       if($today['mday'] == $days[$i])
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1' color='red'>{$days[$i]}</font></td>";
       else
           echo "<td bgcolor='#C5EFF3'><font face='arial' size='1'>{$days[$i]}</font></td>";
   }
       echo "</tr><tr align='center'>
             </table></center>";
}

?>

Logged
pege
Full Member
***
Posts: 146


Re:Calendar in SE 1.5.4
« Reply #4 on: November 08, 2003, 06:14:21 PM »
Reply with quote

Quote from: crash5456 on November 07, 2003, 07:29:12 PM
This is our old boards addy, it will be up a few more days

http://www.tubbersrawk.com/cgi-bin/yabb/YaBB.cgi/YaBB.cgi

I used a mod from boardmod site to add it its was called

Newcalendar3_7a mod...

Just checked this one out, and it's better than the one I posted, if you can get the code for it...
Logged
crash5456
Guest
Re:Calendar in SE 1.5.4
« Reply #5 on: November 08, 2003, 07:09:13 PM »
Reply with quote

I will get looking for the code right away, I'm really new at this php stuff, but the more I work with it, the easier I understand.

Crash5456
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Calendar in SE 1.5.4 « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.072 seconds with 21 queries.