16
Tutoriales y Tips SMF / Bloquear tema con Topic solved
« on: November 11, 2013 - 08:11 20:11 »[TIP] Bloquear tema con Topic solved
Hoy les presento un tip bastante útil y sencillo para quien lo desee utilizar, los dejo a vuestro gusto colega utilizar y su funcionalidad, en base a esto prosigamos.
- Es necesario tener instalado Topic Solved
.Sources/Subs-TopicSolved.php
Buscas por:
Code: [Select]
// Change the status
$smcFunc['db_query']('', '
UPDATE {db_prefix}topics
SET is_solved = {int:is_solved}
WHERE id_topic = {int:topic}
LIMIT {int:limit}',
array(
'topic' => $topic,
'is_solved' => empty($row['is_solved']) ? 1 : 0,
'limit' => 1,
)
);
Abajo agregarCode: [Select]
// Change the status - Closed
$smcFunc['db_query']('', '
UPDATE {db_prefix}topics
SET locked = {int:locked}
WHERE id_topic = {int:topic}
LIMIT {int:limit}',
array(
'topic' => $topic,
'locked' => empty($row['locked']) ? 1 : 0,
'limit' => 1,
)
);
Saludos, Lokitox.