13/01/07 - MOD de data no Assunto

Started by CGS, January 13, 2007, 12:14:52 PM

Previous topic - Next topic

CGS

Alguem sabe colocar no assunto a data que fica automaticamente quando um usuario for postar ?

A sei que a modificação fica no arquivo post.

Aqui vai a parte
// Creating a new topic?
$newTopic = empty($_REQUEST['msg']) && empty($topic);

// Collect all parameters for the creation or modification of a post.
$msgOptions = array(
'id' => empty($_REQUEST['msg']) ? 0 : (int) $_REQUEST['msg'],
'subject' => $_POST['subject'],
'body' => $_POST['message'],
'icon' => preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']),
'smileys_enabled' => !isset($_POST['ns']),
'attachments' => empty($attachIDs) ? array() : $attachIDs,
);
$topicOptions = array(
'id' => empty($topic) ? 0 : $topic,
'board' => $board,
'poll' => isset($_REQUEST['poll']) ? $ID_POLL : null,
'lock_mode' => isset($_POST['lock']) ? (int) $_POST['lock'] : null,
'sticky_mode' => isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']) ? (int) $_POST['sticky'] : null,
'mark_as_read' => true,
);
$posterOptions = array(
'id' => $ID_MEMBER,
'name' => $_POST['guestname'],
'email' => $_POST['email'],
'update_post_count' => !$user_info['is_guest'] && !isset($_REQUEST['msg']) && $board_info['posts_count'],
);


e queria colocar essa variavel mas quando coloco da erro
$subject = '['. date("d/m") .'] - ';

Alquem poderia me ajudar ?

CGS


margarett

à partida bastará transformar a linha:

'subject' => $_POST['subject'],

Adicionando antes da vírgula um "&" ou outro símbolo de conjunção, e a variável que tem presente a data actual. Mas isso já vai muito além do que posso e sei programar :D
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

CGS

Não consegui coloquei o codigo e não funcionou

Advertisement: