i keep getting these errors over and over
2: Invalid argument supplied for foreach()
File: /home/arendall/public_html/urhm/hota-forum/Themes/default/TPortal.template.php (eval?)
Line: 89
also for line 97 and line 105....
over and over...
which theme are u currently using?
helios_multi11_rc3_tp.zip
hhmm thats usually means that its the wrong theme version in use
which TP version are you using?
Please check if you have the correct version for the TP version:
0.96/0.95 version is here (http://www.tinyportal.net/smf/index.php?action=tpmod;dl=cat410;tpstart=10)
1.0.8 version is here (http://www.tinyportal.net/smf/index.php?action=tpmod;dl=cat7)
Can u confirm that u have the correct version ?
yes i just upgraded from .95 to .96
now it will not let me log in.. says
Sorry, you are out of login chances. Please come back and try again later.
i only tryed loging in one time and gave me this...
this is a copy past of the bottom footer...
Powered by SMF 1.1 RC3 | SMF ÂÃ,© 2001-2006, Lewis Media Page created in 0.175 seconds with 20 queries.
Helios / TinyPortal v0.9.6beta ÂÃ,© Bloc
can i post you the url...?????
Sorry, you are out of login chances. Please come back and try again later.
are u using the advanced CAPTCHA thingie by Haremz ?
That would mean theres been some sort of conflict with that mod for it to lock u out in 1 go! But very strange - ive been using it and never happend to me.
Try reverting back to your default theme by putting in your url like
http://mysite.com/index.php?theme=1
also yup an URL may be helpful
well i reset my dsl and it let me log in.. but still the errors and i just checked my other site and im getting the same thing there....
unrealhorsemen.com
oafs-hobbysite.com
and on the secound site im useing the default skin.... thats the oafs one....
i have a question.... could this be because i transfered my site from phpbb to smf?????????? both of these sites were but the 3rd on i have was a raw install and do not have any errors.
well this one seems to be similar to ur problem
follow G6's advice there it may help :up:
http://www.tinyportal.net/smf/index.php?topic=9214.msg77422#msg77422
just to let you know i did what the other post said and that did not work. i did uninstall the TP and no errors so it is definatly in the tp.
Well..... I have been messing around trying to figure out this error and i got it... its not the TP as i thought it was its a block i added....
a calendar block
Quoteglobal $scripturl, $modSettings, $sdays;
$now = mktime() + $modSettings['time_offset'] * 3600;
$today = date('j',$now);
$year = date("Y",$now);
if (isset($_REQUEST['month'])) {
$month = $_REQUEST['month'];
} else {
$month = date("n",$now);
}
#create notice for Holidays, Events & Birthdays.
if (ssi_rafy_todaysBirthdays('')) {
echo '<div align="center" class="smalltext" style="font-weight: bold;" color: #' . $modSettings['cal_bdaycolor'] . ';">Birthdays</div>';
echo '<span class="smalltext">';
$birthdays = split(',', ssi_rafy_todaysBirthdays('echo', $month));
echo '</span>';
echo '<hr style="border: 1px solid #7C5401" />';
}
if (ssi_rafy_todaysEvents('')) {
echo '<div align="center" class="smalltext" style="font-weight: bold; color: #' . $modSettings['cal_eventcolor'] . ';">Upcoming Events</div>';
echo '<span class="smalltext">';
$events = split(',', ssi_rafy_todaysEvents('echo', $month));
echo '</span>';
echo '<hr style="border: 1px solid #7C5401" />';
}
if (ssi_rafy_todaysHolidays('')) {
echo '<div align="center" class="smalltext" style="font-weight: bold; color: #' . $modSettings['cal_holidaycolor'] . ';">Holidays</div>';
echo '<span class="smalltext">';
$holidays = split(',', ssi_rafy_todaysHolidays('echo', $month));
echo '</span>';
echo '<hr style="border: 1px solid #7C5401" />';
}
//list($eventday, $eventlink) = each($events);
//echo '
';
//foreach($holidays as $ed){
// $event = split('=>', $ed);
// echo $event[0].$event[1];
//}
//echo '
';
$days = array($today=>array(''.$scripturl.'?action=calendar;sa=post;month='.$month.';year='.$year.';day='.$today.'',NULL,'<span style="font-weight: bold; border: solid 1px white; padding: 0px 0px 0px 0px;">'.$today.'</span>'));
$day_name_length = 1;
$month_href = $scripturl . '?action=calendar&month=' . $month;
$first_day = 0;
$pn = array('ÂÃ,«Ã‚Ã,«Ã‚Ã,«'=>$scripturl.'?month='.($month-1), 'ÂÃ,»Ã‚Ã,»Ã‚Ã,»'=>$scripturl.'?month='.($month+'1'));
$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 class="smalltext" width="100%">'."\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:center;\">";
}
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++){
$sp1 = '';
$sp2 = '';
foreach($holidays as $sd) {
$event = split('=>', $sd);
if($day == intval($event[0]))
{
$sp1 = '<span align="center" style="color: #FFFFFF; background-color: #' . $modSettings['cal_holidaycolor'] . '; padding: 0px 0px 0px 0px;" title="'.htmlspecialchars($event[1]).'">';
$sp2 = '</span>';
}
}
foreach($events as $sd) {
$event = split('=>', $sd);
if($day == intval($event[0]))
{
$sp1 = '<span align="center" style="color: #FFFFFF; background-color: #' . $modSettings['cal_eventcolor'] . '; padding: 0px 0px 0px 0px;" title="'.htmlspecialchars($event[1]).'">';
$sp2 = '</span>';
}
}
foreach($birthdays as $sd) {
$event = split('=>', $sd);
if($day == intval($sd))
{
$sp1 = '<span align="center" style="color: #FFFFFF; background-color: #' . $modSettings['cal_bdaycolor'] . '; padding: 0px 0px 0px 0px;" title="'.htmlspecialchars($event[1]).'">';
$sp2 = '</span>';
}
}
if($weekday == 7){
$weekday = 0; #start a new week
$calendar .= "</tr>\n<tr style=\"text-align:center;\">";
}
if(isset($days[$day]) and is_array($days[$day]) and ($month == date("n",$now))){
@list($link, $classes, $content) = $days[$day];
if(is_null($content)) $content = $day;
$calendar .= '<td'.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>');
$calendar .= ($link ? '<a href="'.htmlspecialchars($link).'">'.$sp1.$content.$sp2.'</a>' : $sp1.$content.$sp2).'</td>';
}
else
{
$calendar .= "<td style=\"padding-right: 0px; font-size: x-small; font-family: arial, sans-serif;\"><a";
if(((($weekday+$first_day) % 7)==0)||((($weekday+$first_day) % 7)==6))
{
$calendar .= ' style="color:#C00000;"';
}
$calendar .= " href=\"".$scripturl."?action=calendar;month=".$month.";year=".$year.";day=".$day."\" target=\"_self\">$sp1$day$sp2</a></td>";
}
}
if($weekday != 7) $calendar .= '<td class="smalltext" colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days
echo $calendar.'</tr>';
echo '</table>';
// Show today's birthdays.
function ssi_rafy_todaysBirthdays($output_method = 'echo', $month)
{
global $context, $scripturl, $db_prefix;
if (!smf_loadCalendarInfo() || empty($context['calendar_birthdays']))
return array();
if ($output_method != 'echo')
return $context['calendar_birthdays'];
foreach ($context['calendar_birthdays'] as $member)
{
$query = db_query(
"SELECT birthdate
FROM {$db_prefix}members
WHERE ID_MEMBER='".$member['id']."'", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
$birthdate = strtotime($row['birthdate']);
echo '<div align="center">';
echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$birthdate) . '">' . date("F jS",$birthdate) . '</a>';
echo '
';
echo '<img src="/Themes/rOrb/images/icons/birthday_small.gif" width="13" height="17" align="absmiddle" hspace="5">';
echo '<a href="', $scripturl, '?action=profile;u=', $member['id'], '">';
echo $member['name'] . (isset($member['age']) ? ' (' . $member['age'] . ')' : '');
echo '</a>';
// echo (!$member['is_last'] ? '
' : '');
echo '</div>';
if(date("n",$birthdate) == $month)
{
$sdays .= date("j",$birthdate).'=>'.$member['name'].'ÂÃ,´s bDay'.',';
}
}
return $sdays;
}
// Show today's events.
function ssi_rafy_todaysEvents($output_method = 'echo', $month)
{
global $context, $db_prefix;
if (!smf_loadCalendarInfo() || empty($context['calendar_events']))
return array();
if ($output_method != 'echo')
return $context['calendar_events'];
foreach ($context['calendar_events'] as $event)
{
$query = db_query(
"SELECT startDate
FROM {$db_prefix}calendar
WHERE ID_EVENT='".$event['id']."'", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
$startDate = strtotime($row['startDate']);
echo '<div align="center">';
echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$startDate) . '">' . date("F jS Y",$startDate) . '</a>';
echo '
';
if ($event['can_edit'])
echo '<a href="' . $event['modify_href'] . '" style="color: #FF0000;">[e]</a> ';
echo $event['link'] ;
// echo (!$event['is_last'] ? '
' : '');
echo '</div>';
if(date("n",$startDate) == $month)
{
$sdays .= date("j",$startDate).'=>'.str_replace("'","ÂÃ,´",$event['link']).',';
}
}
return $sdays;
}
// Show today's holidays.
function ssi_rafy_todaysHolidays($output_method = 'echo', $month)
{
global $context;
if (!smf_loadCalendarInfo() || empty($context['calendar_holidays']))
return array();
if ($output_method != 'echo')
return $context['calendar_holidays'];
foreach($context['calendar_holidays'] as $holiday) {
$query = db_query(
"SELECT eventDate
FROM {$db_prefix}smf_calendar_holidays
WHERE title='".str_replace("'","''",$holiday)."'
AND (eventDate LIKE '".date("Y")."%' OR eventDate LIKE '0004%')", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
$eventDate = strtotime($row['eventDate']);
echo '<div align="center">';
echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$eventDate) . '">' . date("F jS",$eventDate) . '</a>';
echo '
';
echo $holiday;
echo '</div>';
if(date("n",$eventDate) == $month)
{
$sdays .= date("j",$eventDate).'=>'.str_replace("'","ÂÃ,´",$holiday).',';
}
}
return $sdays;
}
this is the code for the calendar can someone tell me why its generating this error???/
i want to thank everyone that replyed to this problem...
but i have found a Calendar code that works without the error..