1) per default il "bump" è possibile a determinate condizioni, da un lato c'è un intervallo di tempo minimo che va gestito nel PCA.
2) sono ammessi al dump l'autore del Topic e l'autore dell'ultima risposta. Queste condizioni consentono di visualizzare il link "bump"
3) La modifica che abbiamo fatto aggira l'ostacolo relativo agli utenti ammessi e aggiunge il link anche agli utenti autorizzati (utenti singoli o gruppi)
4) La mod funziona ma non compare il messaggio "bump di xxxxx....." nel post.
5) il messaggio viene creato nel file viewtopic.php, attorno alle righe 1481, questo è il codice:
Codice: Seleziona tutto
// Bump information
if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($user_cache[$topic_data['topic_bumper']]))
{
// It is safe to grab the username from the user cache array, we are at the last
// post and only the topic poster and last poster are allowed to bump.
// Admins and mods are bound to the above rules too...
$l_bumped_by = sprintf($user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], $user->format_date($topic_data['topic_last_post_time'], false, true));
}
else
{
$l_bumped_by = '';
}
Nel caso del bump eseguito da utente diverso da quelli previsti pere default le condizioni non ci sono, probabilmente è la variabile di cache che non ha i valori richiesti, la soluzione è creare una condizione simile che consenta di creare il messaggio anche per questi utenti.
Secondo me farei questa modifica alla parte precedente:
Codice: Seleziona tutto
// Bump information
if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($user_cache[$topic_data['topic_bumper']]))
{
// It is safe to grab the username from the user cache array, we are at the last
// post and only the topic poster and last poster are allowed to bump.
// Admins and mods are bound to the above rules too...
$l_bumped_by = sprintf($user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], $user->format_date($topic_data['topic_last_post_time'], false, true));
}
elseif ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($topic_data['topic_bumper']))
{
$l_bumped_by = sprintf($user->lang['BUMPED_BY'], $user->data['username'], $user->format_date($topic_data['topic_last_post_time'], false, true));
}
else
{
$l_bumped_by = '';
}
($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($topic_data['topic_bumper']))
controllo che ci sia un valore "topic_bumber" nella tabella TOPICS_TABLE, che "post_id" sia uguale a "topic_last_post_id" e che ci sia un valore diverso da '0' in "topic_bumber".In pratica, se ci sono le condizioni di default oppure le condizioni appena citate il messaggio viene creato, altrimenti resta vuoto.
Io ho fatto una veloce prova in locale e sembra funzionare ma non ho approfondito.