TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 228
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 87
  • Total: 87

Unserialize, ssi, or Calendar php Box error.

Started by onicat, January 19, 2008, 08:31:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

onicat

www.akcommunity.com
SMF 1.1.4
TP 0.9.8:
SMF Default Theme - Core
Bible Tag 1.1      Bible - Books of Law 1.0    Bible - Books of Poetry 1.0
Favicon 1.0       Reg Bar 1.0          Wikipedia BBCode 1.2
Global Headers Footers 1.3    Repeating Calendar Events v1.2.6 1.2.6    
Contact Page 1.1    YouTube BBCode 1.2    No Temp Directory Removal 1.0 Bible - Books of Prophets 1.0    YouTube BBCode 1.7    
14. SMF Gallery Lite 1.8.1.1       Bible - Books of History 1.0
BibleGateway Mod 1.0       SMF Links 1.6.5 TinyPortal 0.983
SMF Staff Page 1.5.1       Bible - New Testament 1.0      AvatarSelect 1.1.


8: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 65525 of 65538 bytes
File: /media/mccforum/public_html/SSI.php
Line: 1464


That is the error that I get.

Quoteglobal $scripturl;
$now = mktime();
         $today = date('j',$now);
         $year = date("Y",$now);
         $month = date("n",$now);
         $days = array($today=>array(NULL,NULL,'<a class="smalltext" style="color: steelblue; font-weight: bold; border: solid 1px black; background-color: white; padding: 0px 4px 0px 4px;" href="'.$scripturl.'?action=calendar;sa=post;month='.$month.';year='.$year.';day='.$today.'" target="_self">'.$today.'</a>'));

         $day_name_length = 3;
         $month_href = $scripturl . '?action=calendar';
         $first_day = 1;
         $pn = array();

$first_of_month = gmmktime(0,0,0,$month,1,$year);
#remember that mktime will automatically correct if invalid dates are entered
# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
# this provides a built in "rounding" feature to generate_calendar()

$day_names = array(); #generate all the day names according to the current locale
for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday
$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name

list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));
$weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day
$title   = htmlentities(ucfirst($month_name)).' '.$year;  #note that some locales don't capitalize month and day names

#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03
@list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable
if($p) $p = '<span class="smalltext">'.($pl ? '<a href="'.htmlspecialchars($pl).'">'.$p.'</a>' : $p).'</span> ';
if($n) $n = ' <span class="smalltext">'.($nl ? '<a href="'.htmlspecialchars($nl).'">'.$n.'</a>' : $n).'</span>';
$calendar = '<table>'."\n".
'<caption >'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n."</caption>\n<tr>";

if($day_name_length){ #if the day names should be shown ($day_name_length > 0)
#if day_name_length is >3, the full name of the day will be printed
foreach($day_names as $d)
$calendar .= '<th class="smalltext" abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';
$calendar .= "</tr>\n<tr style=\"text-align:right;\">";
}

if($weekday > 0) $calendar .= '<td class="smalltext" colspan="'.$weekday.'"> </td>'; #initial 'empty' days
for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){
if($weekday == 7){
$weekday   = 0; #start a new week
$calendar .= "</tr>\n<tr style=\"text-align:right;\">";
}
if(isset($days[$day]) and is_array($days[$day])){
@list($link, $classes, $content) = $days[$day];
if(is_null($content))  $content  = $day;
$calendar .= '<td "'.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>').
($link ? '<a href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>';
}
else
{
$calendar .= "<td class=\"smalltext\" style=\"padding-right:4px;\"><a";
if(((($weekday+$first_day) % 7)==0)||((($weekday+$first_day) % 7)==6))
{
$calendar .= ' style="color:#C00000;"';
}
$calendar .= " href=\"".$scripturl."?action=calendar;sa=post;month=".$month.";year=".$year.";day=".$day."\" target=\"_self\">$day</a></td>";
}
}
if($weekday != 7) $calendar .= '<td class="smalltext" colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days
echo $calendar.'</tr>';

if (ssi_todaysBirthdays('')) {
  echo '<tr><td>
</td><td colspan="5" class="smalltext" align="center">Birthdays</td><td>
</td></tr><td colspan="7" class="smalltext">';
  ssi_todaysBirthdays();
  echo '</td></tr>';
}

if (ssi_todaysCalendar('')) {
  echo '<tr><td>
</td><td colspan="5" class="smalltext" align="center">Upcoming Events</td><td>
</td></tr><td colspan="7" class="smalltext">';
  ssi_todaysCalendar();
  echo '</td></tr>';
}

echo '</table>';

That is the Calendar Box Code I am using.

http://custom.simplemachines.org/mods/index.php?mod=655

That is the Repeating Calendar mod I am using with SMF and TP.

My website is www.akcommunity.com.

Ok thats I think all the important info upfront. Now for my question. hehe

If you go to the homepage and scroll down, on the left side will be the Calendar block. You will notice that it is not showing the events, just the calendar. But when you click the Calendar tab  up top and scroll down to that same spot. You will notice it is showing the events along with the calendar.

I have tried various calendar scripts...and end up with the same problem, even tried adjusting the amount of days in advance that it will show. I would like to keep it at least at 7 days. Cause as you can see my calendar is rather active. LOL.

Anyway. I am pretty sure that the error is linked to that script some how, cause when I dont use the repeating events, and that script, then I don't get the error...but I also dont get my calendar displayed on the front page.

To be honest I don't know if this is an SMF or TP problem. So I posted it in both.

Any one have any idea's as to how I could fix said problem?

Get the events to show on the front page were they should, and get rid of said error.

I know the subject has the posiblities of 3 errors. But I am pretty sure it revolves around the PHP Box script...but all 3 seem to be connected some how....

P.s. My apologize in origionaly posting this in the wrong part of the site. I hope this is the right place now.

Thanks for all the help that people offer

Ken.

#1
This is the same issue you listed in the post linked below?
Please don't cross/double post.

http://www.tinyportal.net/index.php?topic=700.msg174301#msg174301


EDIT: The mod that you are using is from SMF so you would need to ask the mod writer for better answers to this issue.
http://custom.simplemachines.org/mods/index.php?mod=655

All of that said... why not try the code thats found in the Topic where you originally posted your question?
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

onicat

Yesh it is the same post from the other thread. but Since I was not following the rules when i made that post. I figured I would follow them, and repost it. In hopes of gettin helpfull answer. lol

I Could have deleted the old post. Sorry for not doing that.

I have asked the creator of the MOD and his is out on Medical leave. So is of no help. I have poured though the SMF site and it apears that I am the only one with this issue.

And though I am sure it has a little to do with the Mod. The reason why it is not desplaying I am thinking has something to do with the code in the PHP box. But the problem with that theory is every code I have tried comes up with the same problem. And I have the ones in the other thread. Hence why I asked for help. It will only show the events on the Calendar page. Not on any of the other pages. Most importantly the home page.

I understand that I don't know that much about how the machinics of these forums work. So hence at times I will ask really stupid questions. But I Do what I can to read up a bit before I step out and look like an idiot. LOL.  That way when some one makes a suggestion to me I can iether say I have already tried it, or try it, and give them imput back on what happened. hehe

So again I am sorry for not post a request for help in the proper manor.


This website is proudly hosted on Crocweb Cloud Website Hosting.