01 Nis 2023 19:20 Yeni Konu Oluştur

Haberler:

Üye kayıt esnasında E-posta adresinizin doğru olduğuna ve Aktivasyon Mailinize bakmayı unutmayın.


Most Online ve Hızlı düzenleme sorunları

Başlatan BySaBo, 25 Mar 2018 11:15

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

***

  1. 120

  2. 30

  3. 5
25 Mar 2018 11:15 Son düzenlenme: 25 Mar 2018 11:17 BySaBo

Merhaba,

Sitemde most online ve most online today ayarlarını bir şekilde bozmuşum. Sürekli olarak sabit bir bilgiyi gösteriyor ve kendini güncellemiyor.

boardindex kontrol ettiğimde kodlar default temadakiyle aynı , acaba sorun ne olabilir ?

Bir de yıllardır var olan bir sorunu da danışmak istiyorum. Konu içerisinde hızlı düzenlemeye basınca ileti düzenleme ekranı geliyor ama kaydet dediğimizde kaydetmiyor , bunun bir çözümü var mı ?

vmodz.net/forum

*

  1. 3,263

  2. 596

  3. 1077
25 Mar 2018 22:01 #1 Son düzenlenme: 25 Mar 2018 22:11 snrj
forum bakımı ve veritabanı onarımını denediniz mi ?

hızlı düzenle sorununuz muhtemelen topic.js dosyasından kaynaklı default tema içindeki topic.js nin yedeğini alın sonra sıfır indirdiğiniz bir smf sürümündeki topic.js ile değiştirin

***

  1. 120

  2. 30

  3. 5
Evet, bir kaç yıl önce sizden talep ettiğim bir istatistik görünümünü uygularken bozmuştum ana nedenini anlamadım , daha sonra da önemsememiştim.

*

  1. 3,263

  2. 596

  3. 1077

üstteki mesajı editlerken sizde yeni mesaj atmışsınız hangi istatistik modu hangi dosyalarda değişim yapılıyordu

***

  1. 120

  2. 30

  3. 5
http://smf.konusal.com/index.php?topic=1089.0

Ama ben kendime göre değiştirmiştim bazı şeyleri , sizin verdiğiniz şekilde problem yaratacağını sanmıyorum.

*

  1. 3,263

  2. 596

  3. 1077
o bölümdeki kodları gönderin bakalım sadece boardindex.template de yaptıysanız değişiklik hallederiz bir şekilde

üstte yazdığım topic.js denediniz mi ?

***

  1. 120

  2. 30

  3. 5

*

  1. 3,263

  2. 596

  3. 1077

topic.js değişikliği sources/post.php deki şu func gönderiyor ama burda göndermede bir sorun var sanırım
function QuoteFast()
{
global $modSettings, $user_info, $txt, $settings, $context;
global $sourcedir, $smcFunc;

loadLanguage('Post');
if (!isset($_REQUEST['xml']))
loadTemplate('Post');

include_once($sourcedir . '/Subs-Post.php');

$moderate_boards = boardsAllowedTo('moderate_board');

// Where we going if we need to?
$context['post_box_name'] = isset($_GET['pb']) ? $_GET['pb'] : '';

$request = $smcFunc['db_query']('', '
SELECT IFNULL(mem.real_name, m.poster_name) AS poster_name, m.poster_time, m.body, m.id_topic, m.subject,
m.id_board, m.id_member, m.approved
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board AND {query_see_board})
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
WHERE m.id_msg = {int:id_msg}' . (isset($_REQUEST['modify']) || (!empty($moderate_boards) && $moderate_boards[0] == 0) ? '' : '
AND (t.locked = {int:not_locked}' . (empty($moderate_boards) ? '' : ' OR b.id_board IN ({array_int:moderation_board_list})') . ')') . '
LIMIT 1',
array(
'current_member' => $user_info['id'],
'moderation_board_list' => $moderate_boards,
'id_msg' => (int) $_REQUEST['quote'],
'not_locked' => 0,
)
);
$context['close_window'] = $smcFunc['db_num_rows']($request) == 0;
$row = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);

$context['sub_template'] = 'quotefast';
if (!empty($row))
$can_view_post = $row['approved'] || ($row['id_member'] != 0 && $row['id_member'] == $user_info['id']) || allowedTo('approve_posts', $row['id_board']);

if (!empty($can_view_post))
{
// Remove special formatting we don't want anymore.
$row['body'] = un_preparsecode($row['body']);

// Censor the message!
censorText($row['body']);

$row['body'] = preg_replace('~<br ?/?' . '>~i', "\n", $row['body']);

// Want to modify a single message by double clicking it?
if (isset($_REQUEST['modify']))
{
censorText($row['subject']);

$context['sub_template'] = 'modifyfast';
$context['message'] = array(
'id' => $_REQUEST['quote'],
'body' => $row['body'],
'subject' => addcslashes($row['subject'], '"'),
);

return;
}

// Remove any nested quotes.
if (!empty($modSettings['removeNestedQuotes']))
$row['body'] = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $row['body']);

// Make the body HTML if need be.
if (!empty($_REQUEST['mode']))
{
require_once($sourcedir . '/Subs-Editor.php');
$row['body'] = strtr($row['body'], array('&lt;' => '#smlt#', '&gt;' => '#smgt#', '&amp;' => '#smamp#'));
$row['body'] = bbc_to_html($row['body']);
$lb = '<br />';
}
else
$lb = "\n";

// Add a quote string on the front and end.
$context['quote']['xml'] = '[quote author=' . $row['poster_name'] . ' link=topic=' . $row['id_topic'] . '.msg' . (int) $_REQUEST['quote'] . '#msg' . (int) $_REQUEST['quote'] . ' date=' . $row['poster_time'] . ']' . $lb . $row['body'] . $lb . '[/quote]';
$context['quote']['text'] = strtr(un_htmlspecialchars($context['quote']['xml']), array('\'' => '\\\'', '\\' => '\\\\', "\n" => '\\n', '</script>' => '</\' + \'script>'));
$context['quote']['xml'] = strtr($context['quote']['xml'], array('&nbsp;' => ' ', '<' => '&lt;', '>' => '&gt;'));

$context['quote']['mozilla'] = strtr($smcFunc['htmlspecialchars']($context['quote']['text']), array('&quot;' => '"'));
}
// !!! Needs a nicer interface.
// In case our message has been removed in the meantime.
elseif (isset($_REQUEST['modify']))
{
$context['sub_template'] = 'modifyfast';
$context['message'] = array(
'id' => 0,
'body' => '',
'subject' => '',
);
}
else
$context['quote'] = array(
'xml' => '',
'mozilla' => '',
'text' => '',
);
}

detaylı incelemek gerekir hatayı bulmak için daha önce yüklediğiniz mod kalıntıları vs buna sebeb olabilir

***

  1. 120

  2. 30

  3. 5
Evet sıfır post.php attığımda sorun düzeldi.

Sitemde yüklü olan aşağıdaki eklentiler post.php de değişiklik yapıyor.

- Hide content
- SMF Post Prefix
- Simple Audio Video Embedder
- Tagging System

*

  1. 3,263

  2. 596

  3. 1077
tam bakmadım ama hide content modundan olabilir
modun elle kurulumuna baktım http://custom.simplemachines.org/mods/index.php?mod=4013
şu kısımlar etkiliyor olabilir
bul: [Select]
$context['message']['body'] = parse_bbc($context['message']['body'], $row['smileys_enabled'], $row['id_msg']);
sonrasına ekle: [Select]
$context['hc_current_post'] = $row;
 $autoLinkUrlsSetting = $modSettings['autoLinkUrls'];
 $modSettings['autoLinkUrls'] = "";
 $context['message']['body'] = parse_bbc($context['message']['body'], $row['smileys_enabled'], $row['id_msg'], array('hide'));
 $modSettings['autoLinkUrls'] = $autoLinkUrlsSetting;
 unset($context['hc_current_post']);


bul: [Select]
$context['quote']['mozilla'] = strtr($smcFunc['htmlspecialchars']($context['quote']['text']), array('&quot;' => '"'));öncesine ekle: [Select]
$autoLinkUrlsSetting = $modSettings['autoLinkUrls'];
 $modSettings['autoLinkUrls'] = "";
 $context['quote']['xml'] = parse_bbc($context['quote']['xml'], false, '', array('hide'));
 $context['quote']['xml'] = strtr($context['quote']['xml'], array(' &nbsp;' => '  ', '<br />' => "\n", '<br />&nbsp;' => "\n ", "\n" => '&#13;'));
 $modSettings['autoLinkUrls'] = $autoLinkUrlsSetting;


bu kısımları elle kaldırıp bir test edin

***

  1. 120

  2. 30

  3. 5
Sıfır smf'ye tek tek kurarak denedim etkileyen modları.

Smf Post Prefix i kurduğum zaman aynı sorun yaşandı.

Kurulum paketi ekte inceler misin lütfen hocam.

*

  1. 3,263

  2. 596

  3. 1077
modu kurduktan sonra Sources/Post.php de bul

if (isset($_POST['id_prefix']) || $_POST['id_prefix'] == 0 || empty($_POST['id_prefix']))
Değiştir
if (isset($_POST['id_prefix']) || $_POST['id_prefix'] === '' )

***

  1. 120

  2. 30

  3. 5
Düzeldi hocam teşekkür ederim.

Most online konusunda ne düşünüyosunuz ?

*

  1. 3,263

  2. 596

  3. 1077
üstte belirtmiştim ilgili konumdaki kodları yollayın diye neyse defaulttaki ile aynı ise zaten çalışması lazım çalışmıyorsa
Sources/Boardindex.php de şu kod var mı bakın
// Get the user online list.
require_once($sourcedir . '/Subs-MembersOnline.php');
$membersOnlineOptions = array(
'show_hidden' => allowedTo('moderate_forum'),
'sort' => 'log_time',
'reverse_sort' => true,
);
varsa Sources/Subs-MembersOnline.php şu kod var mı bakın
function trackStatsUsersOnline($total_users_online)
{
global $modSettings, $smcFunc;

$settingsToUpdate = array();

// More members on now than ever were?  Update it!
if (!isset($modSettings['mostOnline']) || $total_users_online >= $modSettings['mostOnline'])
$settingsToUpdate = array(
'mostOnline' => $total_users_online,
'mostDate' => time()
);

$date = strftime('%Y-%m-%d', forum_time(false));

// No entry exists for today yet?
if (!isset($modSettings['mostOnlineUpdated']) || $modSettings['mostOnlineUpdated'] != $date)
{
$request = $smcFunc['db_query']('', '
SELECT most_on
FROM {db_prefix}log_activity
WHERE date = {date:date}
LIMIT 1',
array(
'date' => $date,
)
);

// The log_activity hasn't got an entry for today?
if ($smcFunc['db_num_rows']($request) === 0)
{
$smcFunc['db_insert']('ignore',
'{db_prefix}log_activity',
array('date' => 'date', 'most_on' => 'int'),
array($date, $total_users_online),
array('date')
);
}
// There's an entry in log_activity on today...
else
{
list ($modSettings['mostOnlineToday']) = $smcFunc['db_fetch_row']($request);

if ($total_users_online > $modSettings['mostOnlineToday'])
trackStats(array('most_on' => $total_users_online));

$total_users_online = max($total_users_online, $modSettings['mostOnlineToday']);
}
$smcFunc['db_free_result']($request);

$settingsToUpdate['mostOnlineUpdated'] = $date;
$settingsToUpdate['mostOnlineToday'] = $total_users_online;
}

// Highest number of users online today?
elseif ($total_users_online > $modSettings['mostOnlineToday'])
{
trackStats(array('most_on' => $total_users_online));
$settingsToUpdate['mostOnlineToday'] = $total_users_online;
}

if (!empty($settingsToUpdate))
updateSettings($settingsToUpdate);
}

bu iki kısımda eksik gedik yoksa şuan için başka bir çözüm önerim yok yani görmeden birşey diyemem

***

  1. 120

  2. 30

  3. 5
Çok garip , smfyi tekrar indirip içerisindeki Sources/Boardindex.php , Sources/Subs-MembersOnline.php ve default temadaki boardindex.template'yi ftp'e attım.

Değişen bir şey olmadı.

Bunu etkileyen başka bir şey var mı ?


Benzer Konular (5)


MENU ×