Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

Community



Stats


  • *Total Posts: 16389
  • *Total Topics: 2501
  • *Online Today: 14
  • *Most Online: 292
(12.11.16, 09:37:31)
  • *Users: 0
  • *Guests: 0
  • *Spiders: 4
  • *Total: 4

  • *Google
  • *Baidu (3)

Author Topic: Recent Attachments options  (Read 2943 times)

0 Members and 0 Guests are viewing this topic.

Offline zijo

  • Newbie
  • *
  • Posts: 5
Recent Attachments options
« on: 05.02.16, 03:36:43 »
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?

Offline zijo

  • Newbie
  • *
  • Posts: 5
Re: Recent Attachments options
« Reply #1 on: 09.02.16, 01:47:58 »
 :-\

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5779
  • Gender: Female
Re: Recent Attachments options
« Reply #2 on: 09.02.16, 19:58:35 »
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 path, a few in relation to the target.

Offline zijo

  • Newbie
  • *
  • Posts: 5
Re: Recent Attachments options
« Reply #3 on: 10.02.16, 00:41:40 »
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>';