Tema: Foro SMF
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/12/2008, 16:33
dany_danay
 
Fecha de Ingreso: noviembre-2008
Mensajes: 112
Antigüedad: 15 años, 5 meses
Puntos: 1
Foro SMF

Hola amigos!
Tengo un foro SMF que tenia bastantes errores, asi que pregunte y me aconsejaron resubir los archivos (no quiero perder los posts ni los usuarios, lo demas me da =...)
La mayoria de errores se solucionaron, pero ahora mismo aparecn muchas lineas d codigo en la pagina principal (solo en la principal)
He resubido varias veces los archivos sin podr solucionarlo...
Este es el codigo que sale;


Cita:
_free_result($result); krsort($context['users_online']); krsort($context['list_users_online']); ksort($context['online_groups']); $context['num_users_online'] = count($context['users_online']) + $context['num_users_hidden']; // Track most online statistics? if (!empty($modSettings['trackStats'])) { // Determine the most users online - both all time and per day. $total_users = $context['num_guests'] + $context['num_users_online']; // More members on now than ever were? Update it! if (!isset($modSettings['mostOnline']) || $total_users >= $modSettings['mostOnline']) updateSettings(array('mostOnline' => $total_users, 'mostDate' => time())); $date = strftime('%Y-%m-%d', forum_time(false)); // One or more stats are not up-to-date? if (!isset($modSettings['mostOnlineUpdated']) || $modSettings['mostOnlineUpdated'] != $date) { $request = db_query(" SELECT mostOn FROM {$db_prefix}log_activity WHERE date = '$date' LIMIT 1", __FILE__, __LINE__); // The log_activity hasn't got an entry for today? if (mysql_num_rows($request) == 0) { db_query(" INSERT IGNORE INTO {$db_prefix}log_activity (date, mostOn) VALUES ('$date', $total_users)", __FILE__, __LINE__); } // There's an entry in log_activity on today... else { list ($modSettings['mostOnlineToday']) = mysql_fetch_row($request); if ($total_users > $modSettings['mostOnlineToday']) trackStats(array('mostOn' => $total_users)); $total_users = max($total_users, $modSettings['mostOnlineToday']); } mysql_free_result($request); updateSettings(array('mostOnlineUpdated' => $date, 'mostOnlineToday' => $total_users)); } // Highest number of users online today? elseif ($total_users > $modSettings['mostOnlineToday']) { trackStats(array('mostOn' => $total_users)); updateSettings(array('mostOnlineUpdated' => $date, 'mostOnlineToday' => $total_users)); } } // Set the latest member. $context['latest_member'] = &$context['common_stats']['latest_member']; // Load the most recent post? if ((!empty($settings['number_recent_posts']) && $settings['number_recent_posts'] == 1) || $settings['show_sp1_info']) $context['latest_post'] = $most_recent_topic['ref']; if (!empty($settings['number_recent_posts']) && $settings['number_recent_posts'] > 1) { require_once($sourcedir . '/Recent.php'); if (($context['latest_posts'] = cache_get_data('boardindex-latest_posts:' . md5($user_info['query_see_board'] . $user_info['language']), 180)) == null) { $context['latest_posts'] = getLastPosts($settings['number_recent_posts']); cache_put_data('boardindex-latest_posts:' . md5($user_info['query_see_board'] . $user_info['language']), $context['latest_posts'], 180); } // We have to clean up the cached data a bit. foreach ($context['latest_posts'] as $k => $post) { $context['latest_posts'][$k]['time'] = timeformat($post['raw_timestamp']); $context['latest_posts'][$k]['timestamp'] = forum_time(true, $post['raw_timestamp']); } } $settings['display_recent_bar'] = !empty($settings['number_recent_posts']) ? $settings['number_recent_posts'] : 0; $settings['show_member_bar'] &= allowedTo('view_mlist'); $context['show_stats'] = allowedTo('view_stats') && !empty($modSettings['trackStats']); $context['show_member_list'] = allowedTo('view_mlist'); $context['show_who'] = allowedTo('who_view') && !empty($modSettings['who_enabled']); // Set some permission related settings. $context['show_login_bar'] = $user_info['is_guest'] && !empty($modSettings['enableVBStyleLogin']); $context['show_calendar'] = allowedTo('calendar_view') && !empty($modSettings['cal_enabled']); // Load the calendar? if ($context['show_calendar']) $context['show_calendar'] = calendarDoIndex(); $context['page_title'] = $txt[18]; } // Called from the BoardIndex to display the current day's events on the board index. function calendarDoIndex() { global $modSettings, $context, $user_info, $scripturl, $sc, $ID_MEMBER; // Make sure at least one of the options is checked. if (empty($modSettings['cal_showeventsonindex']) && empty($modSettings['cal_showbdaysonindex']) && empty($modSettings['cal_showholidaysonindex'])) return false; // Get the current forum time and check whether the statistics are up to date. if (empty($modSettings['cal_today_updated']) || $modSettings['cal_today_updated'] != strftime('%Y%m%d', forum_time(false))) updateStats('calendar'); // Load the holidays for today, ... if (!empty($modSettings['cal_showholidaysonindex']) && isset($modSettings['cal_today_holiday'])) $holidays = unserialize($modSettings['cal_today_holiday']); // ... the birthdays for today, ... if (!empty($modSettings['cal_showbdaysonindex']) && isset($modSettings['cal_today_birthday'])) $bday = unserialize($modSettings['cal_today_birthday']); // ... and the events for today. if (!empty($modSettings['cal_showeventsonindex']) && isset($modSettings['cal_today_event'])) $events = unserialize($modSettings['cal_today_event']); // No events, birthdays, or holidays... don't show anything. Simple. if (empty($holidays) && empty($bday) && empty($events)) return false; // This shouldn't be less than one! if (empty($modSettings['cal_days_for_index']) || $modSettings['cal_days_for_index'] < 1) $days_for_index = 86400; else $days_for_index = $modSettings['cal_days_for_index'] * 86400; $context['calendar_only_today'] = $modSettings['cal_days_for_index'] == 1; // Get the current member time/date. $now = forum_time(); // This is used to show the "how-do-I-edit" help. $context['calendar_can_edit'] = allowedTo('calendar_edit_any'); // Holidays between now and now + days. $context['calendar_holidays'] = array(); for ($i = $now; $i < $now + $days_for_index; $i += 86400) { if (isset($holidays[strftime('%Y-%m-%d', $i)])) $context['calendar_holidays'] = array_merge($context['calendar_holidays'], $holidays[strftime('%Y-%m-%d', $i)]); } // Happy Birthday, guys and gals! $context['calendar_birthdays'] = array(); for ($i = $now; $i < $now + $days_for_index; $i += 86400) if (isset($bday[strftime('%Y-%m-%d', $i)])) { foreach ($bday[strftime('%Y-%m-%d', $i)] as $index => $dummy) $bday[strftime('%Y-%m-%d', $i)][$index]['is_today'] = strftime('%Y-%m-%d', $i) == strftime('%Y-%m-%d', forum_time()); $context['calendar_birthdays'] = array_merge($context['calendar_birthdays'], $bday[strftime('%Y-%m-%d', $i)]); } $context['calendar_events'] = array(); $duplicates = array(); for ($i = $now; $i < $now + $days_for_index; $i += 86400) { if (empty($events[strftime('%Y-%m-%d', $i)])) continue; foreach ($events[strftime('%Y-%m-%d', $i)] as $ev => $event) { if (empty($event['topic']) || (count(array_intersect($user_info['groups'], $event['allowed_groups'])) != 0 || allowedTo('admin_forum'))) { if (isset($duplicates[$events[strftime('%Y-%m-%d', $i)][$ev]['topic'] . $events[strftime('%Y-%m-%d', $i)][$ev]['title']])) { unset($events[strftime('%Y-%m-%d', $i)][$ev]); continue; } $this_event = &$events[strftime('%Y-%m-%d', $i)][$ev]; $this_event['href'] = $this_event['topic'] == 0 ? '' : $scripturl . '?topic=' . $this_event['topic'] . '.0'; $this_event['modify_href'] = $scripturl . '?action=' . ($this_event['topic'] == 0 ? 'calendar;sa=post;' : 'post;msg=' . $this_event['msg'] . ';topic=' . $this_event['topic'] . '.0;calendar;') . 'eventid=' . $this_event['id'] . ';sesc=' . $sc; $this_event['can_edit'] = allowedTo('calendar_edit_any') || ($this_event['poster'] == $ID_MEMBER && allowedTo('calendar_edit_own')); $this_event['is_today'] = (strftime('%Y-%m-%d', $i)) == strftime('%Y-%m-%d', forum_time()); $this_event['date'] = strftime('%Y-%m-%d', $i); $duplicates[$this_event['topic'] . $this_event['title']] = true; } else unset($events[strftime('%Y-%m-%d', $i)][$ev]); } if (!empty($events[strftime('%Y-%m-%d', $i)])) $context['calendar_events'] = array_merge($context['calendar_events'], $events[strftime('%Y-%m-%d', $i)]); } for ($i = 0, $n = count($context['calendar_birthdays']); $i < $n; $i++) $context['calendar_birthdays'][$i]['is_last'] = !isset($context['calendar_birthdays'][$i + 1]); for ($i = 0, $n = count($context['calendar_events']); $i < $n; $i++) $context['calendar_events'][$i]['is_last'] = !isset($context['calendar_events'][$i + 1]); // This is used to make sure the header should be displayed. return !empty($context['calendar_holidays']) || !empty($context['calendar_birthdays']) || !empty($context['calendar_events']); } ?>
El resto del foro sale debajo perfectamnte.
Alguna solucion?
Cita:
www.uploadtoshare.es

Última edición por dany_danay; 04/12/2008 a las 10:40