Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Download System
wnd Offline
Junior Member
**
Posts: 8
Joined: May 2010
Post: #12
Wink RE: Download System
Here I am again, with the new download system, structure just like the plugin download system here!
  1. The first and only custom thread field we have to create, is for the file upload.
    1. Title: File Upload
    2. Key: fupload
    3. Description: Upload a file to the forum.
    4. Applicable Forums: any
    5. Input Field Type: file
    6. Valid File Extensions: any
    7. Maximum File Size: any
    8. Editable by / Required Field?: Everyone (required)
    9. Display Order: 2
  2. Now, create a new template, named: download_postbit_first

    PHP Code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td colspan=2 class="tcat">
    				<div class="float_left smalltext">
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 {$unapproved_shade}">
    				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    					<tr>
    						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    							{$post['useravatar']}
    						</td>
    						<td class="post_author">
    							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    							<span class="smalltext">
    								{$post['usertitle']}<br />
    								{$post['userstars']}
    								{$post['groupimage']}
    							</span>
    						</td>
    						<td class="smalltext post_author_info" width="165">
    							{$post['user_details']}
    						</td>
    					</tr>
    				</table>
    			</td>
    			<td rowspan=3 class="trow1" style="white-space: nowrap; width: 10%; vertical-align: top;" border=1> 
    				<div style="overflow: hidden; width: 100%;"> 
    					<if $mybb->user['uid'] then>
    						<div style="text-align: center;"><strong>Download: <a href="{$GLOBALS['threadfields']['fupload']['url']}">{$GLOBALS['threadfields']['fupload']['filename']}</a></strong></div>
    					<else>
    						<div style="text-align: center;">Download: {$GLOBALS['threadfields']['fupload']['filename']}</strong></div>
    						<div class="smalltext" style="text-align: center;">
    						<em>You must login to download this file.</em>
    						</div>
    					</if>
    					<div class="smalltext" style="text-align: center;"> 
    						Size: {$GLOBALS['threadfields']['fupload']['filesize_friendly']}<br />
    						MD5 Hash: {$GLOBALS['threadfields']['fupload']['md5hash']}<br />
    						Downloads: {$GLOBALS['threadfields']['fupload']['downloads_friendly']}<br /> 
    						Last Updated: {$GLOBALS['threadfields']['fupload']['update_date']}, {$GLOBALS['threadfields']['fupload']['update_time']}<br /> 
    						Uploaded: {$GLOBALS['threadfields']['fupload']['upload_date']}, {$GLOBALS['threadfields']['fupload']['upload_time']}<br />
    
    					</div>
    				</div> 
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}">
    				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
    
    				<div class="post_body" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    				{$post['iplogged']}
    				</div>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 post_buttons {$unapproved_shade}">
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
    				</div>
    				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>

  3. Now, create a new template, named: download_postbit_first_classic

    PHP Code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tr>
    		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    		<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    		<span class="smalltext">
    			{$post['usertitle']}<br />
    			{$post['userstars']}
    			{$post['groupimage']}
    			{$post['useravatar']}<br />
    			{$post['user_details']}
    		</span>
    	</td>
    	<td class="{$altbg}" valign="top">
    		<table width="100%">
    			<tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
    			<br />
    			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
    				{$post['message']}
    			</div>
    			{$post['attachments']}
    			{$post['signature']}
    			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
    				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    				{$post['iplogged']}
    			</div>
    			</td>
    			</tr>
    			</table>
    	</td>
    	<td rowspan=2 class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"> 
    		<div style="overflow: hidden; width: 100%;"> 
    			<if $mybb->user['uid'] then>
    				<div style="text-align: center;"><strong>Download: <a href="{$GLOBALS['threadfields']['fupload']['url']}">{$GLOBALS['threadfields']['fupload']['filename']}</a></strong></div>
    			<else>
    				<div style="text-align: center;">Download: {$GLOBALS['threadfields']['fupload']['filename']}</strong></div>
    				<div class="smalltext" style="text-align: center;">
    				<em>You must login to download this file.</em>
    				</div>
    			</if>
    			<div class="smalltext" style="text-align: center;"> 
    				Size: {$GLOBALS['threadfields']['fupload']['filesize_friendly']}<br />
    				MD5 Hash: {$GLOBALS['threadfields']['fupload']['md5hash']}<br />
    				Downloads: {$GLOBALS['threadfields']['fupload']['downloads_friendly']}<br /> 
    				Last Updated: {$GLOBALS['threadfields']['fupload']['update_date']}, {$GLOBALS['threadfields']['fupload']['update_time']}<br /> 
    				Uploaded: {$GLOBALS['threadfields']['fupload']['upload_date']}, {$GLOBALS['threadfields']['fupload']['upload_time']}<br />
    			</div>
    		</div> 
    	</td>
    </tr>
    <tr>
    	<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    	<td class="{$altbg}" style="vertical-align: middle;">
    		<table width="100%" border="0" cellpadding="0" cellspacing="0">
    			<tr valign="bottom">
    				<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}</span></td>
    				<td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
    			</tr>
    		</table>
    	</td>
    </tr>
    </table>

  4. Finally, for each forum in 4d, edit the settings to match:
    1. Template Prefix: download
    2. Show first post on every showthread page: yes



And then you should be done!

Please, check for errors and report them, as I just copied and pasted from my own forum.
05-17-2010 05:44 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Download System - RateU - 04-30-2010, 04:26 AM
RE: Download System - ZiNgA BuRgA - 04-30-2010, 02:26 PM
RE: Download System - Pirata Nervo - 05-01-2010, 04:17 AM
RE: Download System - ZiNgA BuRgA - 05-01-2010, 10:20 AM
RE: Download System - wnd - 05-05-2010, 09:42 AM
RE: Download System - RateU - 05-05-2010, 12:11 PM
RE: Download System - leefish - 05-06-2010, 06:17 AM
RE: Download System - ZiNgA BuRgA - 05-06-2010, 07:41 AM
RE: Download System - leefish - 05-06-2010, 09:04 AM
RE: Download System - leefish - 05-07-2010, 07:02 AM
RE: Download System - RateU - 05-07-2010, 09:17 AM
RE: Download System - wnd - 05-17-2010 05:44 AM
RE: Download System - RateU - 05-17-2010, 04:26 PM
RE: Download System - x-Treme - 05-29-2010, 03:38 AM
RE: Download System - RateU - 05-29-2010, 03:51 AM
RE: Download System - x-Treme - 05-29-2010, 04:38 AM
RE: Download System - RateU - 05-29-2010, 05:11 AM
RE: Download System - JonP - 06-25-2010, 04:19 AM
RE: Download System - RateU - 06-25-2010, 04:28 AM
RE: Download System - Hitman - 08-04-2010, 11:17 PM
RE: Download System - RateU - 08-05-2010, 06:17 AM
RE: Download System - Gypaete - 08-21-2010, 11:59 PM
RE: Download System - RateU - 08-22-2010, 03:44 AM
RE: Download System - Gypaete - 08-22-2010, 03:56 AM
RE: Download System - RateU - 08-22-2010, 04:19 AM
RE: Download System - Jumper - 09-12-2010, 10:51 AM
RE: Download System - leefish - 09-12-2010, 11:21 AM
RE: Download System - RateU - 09-13-2010, 03:44 AM
RE: Download System - Jumper - 09-13-2010, 09:48 AM
RE: Download System - RateU - 09-14-2010, 07:09 AM
RE: Download System - Richard.R - 10-01-2010, 04:44 PM
RE: Download System - matulek - 10-11-2010, 08:07 AM
RE: Download System - RateU - 10-11-2010, 09:15 AM
RE: Download System - x-Treme - 10-18-2010, 11:22 PM
RE: Download System - RateU - 10-19-2010, 02:05 AM
RE: Download System - RateU - 11-11-2010, 04:08 AM
RE: Download System - jim7777 - 11-20-2010, 01:49 PM
RE: Download System - ZiNgA BuRgA - 11-20-2010, 04:52 PM
RE: Download System - jim7777 - 11-20-2010, 10:01 PM
RE: Download System - ZiNgA BuRgA - 11-20-2010, 10:06 PM
RE: Download System - jim7777 - 11-20-2010, 10:14 PM
RE: Download System - ZiNgA BuRgA - 11-21-2010, 09:47 AM
RE: Download System - kaixer - 12-26-2010, 09:51 AM
RE: Download System - RateU - 12-26-2010, 10:20 AM
RE: Download System - kaixer - 12-26-2010, 10:24 AM
RE: Download System - RateU - 12-26-2010, 10:28 AM
RE: Download System - ZiNgA BuRgA - 12-26-2010, 10:50 PM
RE: Download System - kaixer - 12-27-2010, 10:32 AM
RE: Download System - ZiNgA BuRgA - 12-28-2010, 02:48 PM
RE: Download System - Vapor - 01-06-2011, 03:28 AM
RE: Download System - x-Treme - 01-06-2011, 03:30 AM
RE: Download System - leefish - 01-06-2011, 03:42 AM
RE: Download System - Vapor - 01-06-2011, 05:30 AM
RE: Download System - RocketFoot - 01-28-2011, 11:02 PM
RE: Download System - RateU - 01-29-2011, 02:11 AM
RE: Download System - RocketFoot - 01-29-2011, 02:15 AM
RE: Download System - RateU - 01-29-2011, 02:21 AM
RE: Download System - RocketFoot - 01-29-2011, 02:27 AM
RE: Download System - Skiilz - 01-29-2011, 02:48 AM
RE: Download System - x-Treme - 01-29-2011, 02:37 AM
RE: Download System - RocketFoot - 01-29-2011, 02:40 AM
RE: Download System - RocketFoot - 01-29-2011, 03:33 AM
RE: Download System - RateU - 01-29-2011, 07:43 AM
RE: Download System - RocketFoot - 01-29-2011, 07:47 AM
RE: Download System - RateU - 01-29-2011, 08:26 AM
RE: Download System - RocketFoot - 02-06-2011, 01:51 PM
RE: Download System - ZiNgA BuRgA - 02-06-2011, 02:11 PM
RE: Download System - RocketFoot - 02-06-2011, 02:16 PM
RE: Download System - ZiNgA BuRgA - 02-06-2011, 02:31 PM
RE: Download System - RocketFoot - 02-06-2011, 02:37 PM
RE: Download System - RateU - 02-07-2011, 05:03 AM
RE: Download System - jim7777 - 03-01-2011, 11:24 PM
RE: Download System - RateU - 03-02-2011, 01:31 AM
RE: Download System - jim7777 - 03-02-2011, 08:52 PM
RE: Download System - RateU - 03-03-2011, 07:06 AM
RE: Download System - ZiNgA BuRgA - 03-03-2011, 11:09 AM
RE: Download System - zZJoennZz - 03-13-2011, 02:01 PM
RE: Download System - ZiNgA BuRgA - 03-13-2011, 10:42 PM
RE: Download System - Lich_king2 - 03-20-2011, 03:03 AM
RE: Download System - RateU - 03-20-2011, 07:10 AM
RE: Download System - maverick - 03-23-2011, 12:57 AM
RE: Download System - RateU - 03-23-2011, 01:48 AM
RE: Download System - maverick - 03-23-2011, 09:00 AM
RE: Download System - RateU - 03-23-2011, 09:30 AM
RE: Download System - RocketFoot - 04-28-2011, 07:59 AM
RE: Download System - ZiNgA BuRgA - 04-28-2011, 08:40 AM
RE: Download System - RocketFoot - 04-28-2011, 09:15 AM
RE: Download System - Lorenzo - 05-22-2011, 03:55 AM
RE: Download System - RateU - 05-22-2011, 04:31 AM
RE: Download System - Lorenzo - 05-22-2011, 05:12 AM
RE: Download System - RateU - 05-22-2011, 06:05 AM
RE: Download System - Lorenzo - 05-22-2011, 07:03 AM
RE: Download System - RateU - 05-22-2011, 07:23 AM
RE: Download System - ZiNgA BuRgA - 05-22-2011, 09:39 AM
RE: Download System - Lorenzo - 05-22-2011, 12:24 PM
RE: Download System - ZiNgA BuRgA - 05-22-2011, 03:01 PM
RE: Download System - Lukehluke - 06-11-2011, 08:37 AM
RE: Download System - ZiNgA BuRgA - 06-11-2011, 11:12 AM
RE: Download System - Lukehluke - 06-12-2011, 02:13 AM
RE: Download System - Lich_king2 - 08-16-2011, 12:43 AM
RE: Download System - RateU - 08-16-2011, 02:06 AM
RE: Download System - RateU - 10-23-2011, 05:46 AM
RE: Download System - shawn - 10-23-2011, 06:42 AM
RE: Download System - RateU - 10-23-2011, 06:48 AM
RE: Download System - shawn - 10-23-2011, 06:49 AM
RE: Download System - RateU - 10-23-2011, 06:58 AM
RE: Download System - shawn - 10-23-2011, 07:08 AM
RE: Download System - RateU - 10-23-2011, 07:16 AM
RE: Download System - shawn - 10-23-2011, 08:19 AM
RE: Download System - ZiNgA BuRgA - 10-23-2011, 10:17 AM
RE: Download System - Yin - 03-09-2012, 07:17 AM
RE: Download System - RateU - 03-09-2012, 08:16 AM
RE: Download System - Yin - 03-09-2012, 08:20 AM
RE: Download System - RateU - 03-10-2012, 05:53 AM
RE: Download System - Yin - 03-10-2012, 06:05 AM
RE: Download System - RateU - 03-10-2012, 08:08 AM
RE: Download System - Yin - 03-10-2012, 10:38 AM
RE: Download System - Yin - 03-14-2012, 01:06 PM
RE: Download System - ZiNgA BuRgA - 03-14-2012, 04:03 PM
RE: Download System - Yin - 03-15-2012, 01:29 AM
RE: Download System - davidedison - 03-21-2012, 01:35 AM
RE: Download System - RateU - 03-21-2012, 03:01 AM
RE: Download System - Seabody - 08-03-2012, 06:13 PM
RE: Download System - RateU - 08-04-2012, 04:47 AM
RE: Download System - Seabody - 08-05-2012, 02:39 PM
RE: Download System - RateU - 08-06-2012, 03:35 AM
RE: Download System - Seabody - 08-06-2012, 03:58 PM
RE: Download System - RateU - 08-07-2012, 03:52 AM
RE: Download System - Seabody - 08-07-2012, 01:48 PM
RE: Download System - RateU - 08-08-2012, 01:08 AM
RE: Download System - Wolfseye - 09-03-2012, 02:02 AM
RE: Download System - RateU - 09-03-2012, 03:27 AM
RE: Download System - ZiNgA BuRgA - 09-03-2012, 09:39 AM
RE: Download System - WINBOY - 11-17-2012, 06:44 AM
RE: Download System - ZiNgA BuRgA - 11-17-2012, 07:06 PM
RE: Download System - WINBOY - 11-17-2012, 08:59 PM
RE: Download System - ZiNgA BuRgA - 11-17-2012, 09:28 PM
RE: Download System - WINBOY - 11-17-2012, 09:31 PM
RE: Download System - ZiNgA BuRgA - 11-17-2012, 11:44 PM
RE: Download System - WINBOY - 11-17-2012, 11:54 PM
RE: Download System - RateU - 11-18-2012, 05:21 AM
RE: Download System - WINBOY - 11-18-2012, 06:26 AM
RE: Download System - RateU - 11-18-2012, 07:10 AM
RE: Download System - WINBOY - 11-18-2012, 02:07 PM
RE: Download System - WINBOY - 11-18-2012, 02:56 PM
RE: Download System - WINBOY - 11-18-2012, 06:57 PM
RE: Download System - WINBOY - 11-18-2012, 10:02 PM
RE: Download System - WINBOY - 11-18-2012, 11:56 PM
RE: Download System - WINBOY - 11-21-2012, 05:08 PM
RE: Download System - Sama34 - 11-21-2012, 06:00 PM
RE: Download System - ZiNgA BuRgA - 11-21-2012, 07:01 PM
RE: Download System - WINBOY - 11-22-2012, 12:20 AM
RE: Download System - Seabody - 01-09-2013, 08:13 AM
RE: Download System - Sama34 - 01-09-2013, 01:00 PM
RE: Download System - Seabody - 01-09-2013, 05:27 PM
RE: Download System - leefish - 01-10-2013, 01:50 AM
RE: Download System - Sohil876 - 02-13-2013, 07:49 PM
RE: Download System - RateU - 02-14-2013, 01:40 AM
RE: Download System - Sohil876 - 02-14-2013, 07:14 PM
RE: Download System - Mantis - 03-02-2013, 09:24 PM
RE: Download System - Heisenberg - 04-24-2013, 05:01 PM
RE: Download System - RateU - 04-26-2013, 03:31 AM
RE: Download System - Heisenberg - 04-29-2013, 04:18 PM
RE: Download System - WINBOY - 04-28-2013, 03:42 AM
RE: Download System - RateU - 04-30-2013, 02:38 AM
RE: Download System - Dark - 05-22-2013, 09:39 AM
RE: Download System - ZiNgA BuRgA - 05-22-2013, 05:08 PM
RE: Download System - WINBOY - 06-01-2013, 04:55 PM
RE: Download System - ZiNgA BuRgA - 06-01-2013, 07:07 PM
RE: Download System - WINBOY - 06-02-2013, 04:03 AM
RE: Download System - WINBOY - 07-24-2013, 05:42 AM
RE: Download System - ZiNgA BuRgA - 07-24-2013, 09:53 AM
RE: Download System - WINBOY - 07-24-2013, 12:48 PM
RE: Download System - Seabody - 07-24-2013, 02:49 PM
RE: Download System - WINBOY - 07-24-2013, 02:51 PM
RE: Download System - ZiNgA BuRgA - 07-25-2013, 11:58 AM
RE: Download System - WINBOY - 07-25-2013, 12:00 PM
RE: Download System - RateU - 07-26-2013, 01:05 AM
RE: Download System - WINBOY - 07-26-2013, 01:24 AM
RE: Download System - ZiNgA BuRgA - 07-27-2013, 10:52 AM
RE: Download System - ikhwanulfikri - 08-04-2013, 04:45 AM
RE: Download System - ZiNgA BuRgA - 08-06-2013, 10:43 AM
RE: Download System - dthiago - 04-13-2014, 07:02 AM
RE: Download System - ZiNgA BuRgA - 05-10-2015, 10:22 PM
RE: Download System - WINBOY - 09-11-2020, 07:07 PM
RE: Download System - ZiNgA BuRgA - 02-28-2021, 08:55 PM

 Standard Tools
Forum Jump: