* PortaMx on G+

*

* Statistic

  • *Total Posts: 14324
  • *Total Topics: 2190
  • *Online Today: 4
  • *Most Online: 292
    (2016 Nov. 12, 09:37:31 am)
  • *Users: 0
  • *Guests: 1
  • *Total: 1

Recent Attachments options

Started by zijo, 2016 February 05, 03:36:43 am

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

zijo

*
2016 February 05, 03:36:43 am
I have php portalmx block and added



ssi_recentAttachments(5);


It shows file name, posted by, downloads and file size.

Is it possible to add date and post name to be shown as well?

zijo

*
#1
2016 February 09, 01:47:58 am
 :-\

feline

*
#2
2016 February 09, 07:58:35 pm
All the SSI functions are designed by SMF .. so it's better you make your question on the SMF site ..
Many are stubborn in relation to the way, but less in relation to the target.

zijo

*
#3
2016 February 10, 12:41:40 am
Modified SSI file. Added Post and Date. This can be used with other functions as well.

Code Select
// Give them the default.
echo '
<table class="ssi_downloads">
<tr>
<th style="text-align: left; padding: 2">', $txt['file'], '</th>
<th style="text-align: left; padding: 2">', $txt['posted_by'], '</th>
<th style="text-align: left; padding: 2">', $txt['downloads'], '</th>
<th style="text-align: left; padding: 2">', $txt['filesize'], '</th>
<th style="text-align: left; padding: 2">Post</th>
<th style="text-align: left; padding: 2">Date</th>

</tr>';
foreach ($attachments as $attach)
echo '
<tr>
<td>', $attach['file']['link'], '</td>
<td>', $attach['member']['link'], '</td>
<td style="text-align: center">', $attach['file']['downloads'], '</td>
<td>', $attach['file']['filesize'], '</td>
<td>', $attach['topic']['link'], '</td>
<td>', $attach['topic']['time'], '</td>
</tr>';