


La procedura prevede:
1) la creazione del campo nella tabella
2) La modifica dei file php interessati all'inserimento di un allegato che sono:
- includes/functions_posting.php
- includes/functions_content.php
- includes/message_parser.php
- includes/acp/acp_users.php
- includes/ucp/ucp_attachments.php
- posting.php
3) La modifica del template, con l'inserimento del nuovo valore. I file da modificare sono:
- styles/prosilver/template/attachments.html
- styles/prosilver/template/posting_editor.html
- styles/prosilver/template/posting_attach_body.html


ALTER TABLE `phpbb_attachments` add `attach_comment_title` VARCHAR(255) collate utf8_bin NOT NULL default ''; 'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '', 'FILE_COMMENT_TITLE' => (isset($filename_data['filecomment_title'])) ? $filename_data['filecomment_title'] : '', 'FILE_COMMENT' => $attach_row['attach_comment'], 'FILE_COMMENT_TITLE' => $attach_row['attach_comment_title'],$sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
SET attach_comment = '" . $db->sql_escape($attach_row['attach_comment']) . "'
WHERE attach_id = " . (int) $attach_row['attach_id'] . '
AND is_orphan = 0';$sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
SET attach_comment = '" . $db->sql_escape($attach_row['attach_comment']) . "', attach_comment_title = '" . $db->sql_escape($attach_row['attach_comment_title']) . "'
WHERE attach_id = " . (int) $attach_row['attach_id'] . '
AND is_orphan = 0';'attach_comment' => $attach_row['attach_comment'],'attach_comment_title' => $attach_row['attach_comment_title'], $row['attach_comment'] = $attachments[$attach_ids[$row['attach_id']]]['attach_comment']; $row['attach_comment_title'] = $attachments[$attach_ids[$row['attach_id']]]['attach_comment_title']; 'COMMENT' => $comment, 'COMMENT_TITLE' => $comment_title, $this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true)); $this->filename_data['filecomment_title'] = utf8_normalize_nfc(request_var('filecomment_title', '', true)); // First of all adjust comments if changed
$actual_comment_list = utf8_normalize_nfc(request_var('comment_list', array(''), true));
foreach ($actual_comment_list as $comment_key => $comment)
{
if (!isset($this->attachment_data[$comment_key]))
{
continue;
}
if ($this->attachment_data[$comment_key]['attach_comment'] != $actual_comment_list[$comment_key])
{
$this->attachment_data[$comment_key]['attach_comment'] = $actual_comment_list[$comment_key];
}
} // Mod Add Comment Title
$actual_comment_list_title = utf8_normalize_nfc(request_var('comment_list_title', array(''), true));
foreach ($actual_comment_list_title as $comment_key_title => $comment)
{
if (!isset($this->attachment_data[$comment_key_title]))
{
continue;
}
if ($this->attachment_data[$comment_key_title]['attach_comment_title'] != $actual_comment_list_title[$comment_key_title])
{
$this->attachment_data[$comment_key_title]['attach_comment_title'] = $actual_comment_list_title[$comment_key_title];
}
}
// Fine Mod Add Comment Title'attach_comment' => $this->filename_data['filecomment'],'attach_comment_title' => $this->filename_data['filecomment_title'],'attach_comment'=> $this->filename_data['filecomment']'attach_comment_title'=> $this->filename_data['filecomment_title'],$this->filename_data['filecomment'] = '';$this->filename_data['filecomment_title'] = '';'attach_comment' => $this->filename_data['filecomment'],'attach_comment_title' => $this->filename_data['filecomment_title'],'attach_comment'=> $this->filename_data['filecomment'],'attach_comment_title' => $this->filename_data['filecomment_title'],$this->filename_data['filecomment'] = '';$this->filename_data['filecomment_title'] = '';$this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true));$this->filename_data['filecomment_title'] = utf8_normalize_nfc(request_var('filecomment_title', '', true));$sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment$sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment, attach_comment_titleset_var($this->attachment_data[$pos]['attach_comment'], $_POST['attachment_data'][$pos]['attach_comment'], 'string', true);set_var($this->attachment_data[$pos]['attach_comment_title'], $_POST['attachment_data'][$pos]['attach_comment_title'], 'string', true);$sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment$sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment, attach_comment_titleset_var($this->attachment_data[$pos]['attach_comment'], $_POST['attachment_data'][$pos]['attach_comment'], 'string', true);set_var($this->attachment_data[$pos]['attach_comment_title'], $_POST['attachment_data'][$pos]['attach_comment_title'], 'string', true);'COMMENT' => nl2br($row['attach_comment']),'COMMENT_TITLE' => nl2br($row['attach_comment_title']),'COMMENT' => bbcode_nl2br($row['attach_comment']),'COMMENT_TITLE' => bbcode_nl2br($row['attach_comment_title']),$sql = 'SELECT attach_id, is_orphan, attach_comment, real_filename$sql = 'SELECT attach_id, is_orphan, attach_comment, real_filename, attach_comment_title <!-- IF _file.S_IMAGE -->
<dl class="file">
<!-- IF _file.COMMENT_TITLE --><dd>{_file.COMMENT_TITLE}</dd><!-- ENDIF --> <!-- BEGIN attach_row --> <dl>
<dt><label for="filecomment">Nome della specie:</label></dt>
<dd><textarea name="comment_list_title[{attach_row.ASSOC_INDEX}]" id="comment_list_title_{attach_row.ASSOC_INDEX}" rows="1" cols="35" class="inputbox">{attach_row.FILE_COMMENT_TITLE}</textarea></dd>
</dl><dl>
<dt><label for="filecomment">{L_FILE_COMMENT}:</label></dt>
<dd><textarea name="filecomment" id="filecomment" rows="1" cols="60" class="inputbox autowidth">{FILE_COMMENT}</textarea></dd>
</dl> <dl>
<dt><label for="filecomment_title">Nome della specie:</label></dt>
<dd><textarea name="filecomment_title" id="filecomment_title" rows="1" cols="60" class="inputbox autowidth">(FILE_COMMENT_TITLE)</textarea></dd>
</dl>
inserire dati nel database php ricavare indirizzo dalle tabelle sql phpbb3 riga 1557 phpbb3 inserimento dati dal forum message_parser.php template inserimento database
Visitano il forum: Nessuno e 1 ospite
