MyBB Hacks

Full Version: Download System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Where in my template should I put the variables for the downloads section to work? Can some one help?

It is given "To display the Display Format, later, we need put {$GLOBALS['threadfields']['fupload']['value']} variable into our template."

Can someone tell me where I should put variables like this?
If you use the templates given on the first post, you don't need to put it again.
But if you use your own templates, depends on where you want to display it (maybe forumdisplay_thread and/or showthread and/or postbit_first(_classic)).
Basically, it is the download button (you can see it in the screenshot, the 'Download Now' button).
I tried this and the download button is totally missing, plus on the thread view, there is no description, only my post message.

Contents of dld_forumdisplay_thread:

Code:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
	<tr>
		<td class="thead" align="center" colspan="{$colspan}">
			<div><strong><a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a></strong></div>
			<div class="author smalltext">{$lang->author}: {$thread['profilelink']}</div>
			{$rating}
		</td>
	</tr>
	<tr>
		<td class="{$bgcolor}" width="40%">
			<span class="float_left">
				<img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" />{$GLOBALS['threadfields']['fupload']['icon']}{$icon}{$prefix}{$gotounread}
			</span>
			<br class="clear" />
			<div align="center">
				<table border="0" width="100%">
					<tr>
						<td>File Name</td><td width="1">:</td>
						<td>{$GLOBALS['threadfields']['fupload']['filename']}</td>
					</tr>
					<tr>
						<td>File Size</td><td>:</td>
						<td>{$GLOBALS['threadfields']['fupload']['filesize_friendly']}</td>
					</tr>
					<tr>
						<td>Uploaded</td><td>:</td>
						<td>{$GLOBALS['threadfields']['fupload']['upload_date']}</td>
					</tr>
					<tr>
						<td>Last Update</td><td>:</td>
						<td>{$GLOBALS['threadfields']['fupload']['update_date']}</td>
					</tr>
					<tr>
						<td>Downloaded</td><td>:</td>
						<td>{$GLOBALS['threadfields']['fupload']['downloads_friendly']}</td>
					</tr>
				</table>
			</div>
			<div align="center">
				{$GLOBALS['threadfields']['fupload']['value']}
			</div>
		</td>
	
		{$modbit}
	</tr>
	<tr>
		<td class="{$bgcolor}" colspan="{$colspan}">
			{$GLOBALS['threadfields']['fdesc']}
			<br class="clear" />
			<span class="float_right smalltext">
				<em>
				{$thread['views']} {$lang->views},
				<a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts} {$lang->replies},
				<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}, {$lastpostdate} {$lastposttime}
				</em>
			</span>
		</td>
	</tr>
</table>
<br />


Contents of dld_forumdisplay_threadlist:

Code:
<div class="float_left">
	{$multipage}
</div>
<div class="float_right">
	{$newthread}
</div>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
	<tr>
		<td class="thead" colspan="{$colspan}">
			<div style="float: right;">
				<span class="smalltext"><strong><a href="misc.php?action=markread&amp;fid={$fid}">{$lang->markforum_read}</a> | <a href="usercp2.php?action={$add_remove_subscription}subscription&amp;type=forum&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>{$clearstoredpass}</strong></span>
			</div>
			<div>
				<strong>{$foruminfo['name']}</strong>
			</div>
		</td>
	</tr>
	<tr>
		<td class="tcat" width="100%" colspan="2"><span class="smalltext"><strong>Sort By: <a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']} | <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']} | <a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']} | <a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']} {$ratingcol} | <a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
		{$inlinemodcol}
	</tr>
</table>
<br class="clear" />
	{$threads}{$nullthreads}
<br class="clear" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
	<tr>
		<td class="tfoot" align="right" colspan="{$colspan}">
			<form action="forumdisplay.php" method="get">
				<input type="hidden" name="fid" value="{$fid}" />
				<select name="sortby">
					<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>
					<option value="lastpost" {$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
					<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>
					<option value="started" {$sortsel['started']}>{$lang->sort_by_started}</option>
					{$ratingsort}
					<option value="replies" {$sortsel['replies']}>{$lang->sort_by_replies}</option>
					<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>
				</select>
				<select name="order">
					<option value="asc" {$ordersel['asc']}>{$lang->sort_order_asc}</option>
					<option value="desc" {$ordersel['desc']}>{$lang->sort_order_desc}</option>
				</select>
				<select name="datecut">
					<option value="1" {$datecutsel['1']}>{$lang->datelimit_1day}</option>
					<option value="5" {$datecutsel['5']}>{$lang->datelimit_5days}</option>
					<option value="10" {$datecutsel['10']}>{$lang->datelimit_10days}</option>
					<option value="20" {$datecutsel['20']}>{$lang->datelimit_20days}</option>
					<option value="50" {$datecutsel['50']}>{$lang->datelimit_50days}</option>
					<option value="75" {$datecutsel['75']}>{$lang->datelimit_75days}</option>
					<option value="100" {$datecutsel['100']}>{$lang->datelimit_100days}</option>
					<option value="365" {$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
					<option value="9999" {$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
				</select>
				{$gobutton}
			</form>
		</td>
	</tr>
</table>
<div class="float_left">
	{$multipage}
</div>
<div class="float_right" style="margin-top: 4px;">
	{$newthread}
</div>
<br style="clear: both;" />
<br />
<div class="float_left">
	<div class="float_left">
		<dl class="thread_legend smalltext">
			<dd><img src="{$theme['imgdir']}/newfolder.gif" alt="{$lang->new_thread}" title="{$lang->new_thread}" /> {$lang->new_thread}</dd>
			<dd><img src="{$theme['imgdir']}/newhotfolder.gif" alt="{$lang->new_hot_thread}" title="{$lang->new_hot_thread}" /> {$lang->new_hot_thread}</dd>
			<dd><img src="{$theme['imgdir']}/hotfolder.gif" alt="{$lang->hot_thread}" title="{$lang->hot_thread}" /> {$lang->hot_thread}</dd>
		</dl>
	</div>

	<div class="float_left">
		<dl class="thread_legend smalltext">
			<dd><img src="{$theme['imgdir']}/folder.gif" alt="{$lang->no_new_thread}" title="{$lang->no_new_thread}" /> {$lang->no_new_thread}</dd>
			<dd><img src="{$theme['imgdir']}/dot_folder.gif" alt="{$lang->posts_by_you}" title="{$lang->posts_by_you}" /> {$lang->posts_by_you}</dd>
			<dd><img src="{$theme['imgdir']}/lockfolder.gif" alt="{$lang->locked_thread}" title="{$lang->locked_thread}" /> {$lang->locked_thread}</dd>
		</dl>
	</div>
	<br style="clear: both" />
</div>

<div class="float_right" style="text-align: right;">
	{$inlinemod}
	{$searchforum}
	{$forumjump}
</div>
<br style="clear: both" />
{$inline_edit_js}


Anybody have any ideas? It's an integral part of the board I applied it to.

(08-03-2012 06:13 PM)Seabody Wrote: [ -> ]the download button is totally missing
It is better if you explain or give a screenshot with what do you mean by the 'totally missing'.

(08-03-2012 06:13 PM)Seabody Wrote: [ -> ]plus on the thread view, there is no description, only my post message.
Do you mean in showthread? There is no description there (by default). If you really want to display the short description in the showthread page, try to put {$GLOBALS['threadfields']['fdesc']} variable in your dld_showthread template.
(08-04-2012 04:47 AM)RateU Wrote: [ -> ]It is better if you explain or give a screenshot with what do you mean by the 'totally missing'.

Sorry about that, I've included a screenshot of what I mean. And thank you!

[attachment=885]
Are you sure you've uploaded a file to your fupload field when creating a new thread?
Yes, I'm sure - it's called "Random Symbols.zip".
Could you post your fupload custom field settings here? What is your forum URL?
(08-07-2012 03:52 AM)RateU Wrote: [ -> ]Could you post your fupload custom field settings here? What is your forum URL?

I feel so embarrassed. I went to go get these, and I discovered the problem. I had misspelled "fupload" - I spelled it "fulpload". Oops

Thank you though, I probably wouldn't have thought to check it otherwise.
(08-07-2012 01:48 PM)Seabody Wrote: [ -> ]I had misspelled "fupload" - I spelled it "fulpload". Oops
Biggrin
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Reference URL's