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
Hi again guys I just finished installing the downloads system on my site, but I am trying to accomplish this layout for displaying the download section:
http://www.14.mynie.co.cc/forumdisplay.php?fid=53

So far I have the vertical layout, but I'm having no luck getting it to be side by side.
What I have so far:
http://cavernofcreativity.com/Atlas/foru...http://cavernofcreativity.com/Atlas/forumdisplay.

Also, do you guys have a block for pro portal laying around somewhere here?
About the layout: Do you mean the Category on the left, and the threads on the right? I do that like this:

HTML Code
<table ......>
<tr>
<td valign="top">
Left side (category)
</td>
<td valign="top">
Right side (threads)
</td>
</tr>
</table>

You can set the width (in percent or in px) for the left or the right column.
You can find the similar layout here (look at the xtldir_forumdisplay_threadlist template and the threadlist screenshots):
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=398&pid=65

Or maybe you can use two div, left and right floated.

About Pro Portal Block: What block?

Thank you! I will try both methods to see which works better!

For blocks, I mean a block for latest downloads.
edit:
That code you gave with the valign="top" worked like a charm! Thanks!
Try this attachment.
Edit these settings:

PHP Code:
$xtdldfid = 1;// Forum ID for XThreads Downloads
$xtdldlimit = 3;// Number of images to be displayed
$xtdlddim = '320x240';// Thumbs dimension to be displayed

If you change the thumb dimension, please make sure that the dimension is in the Image Thumbnail Generation setting of the Screenshot fields (fscr).

Perfect, this is just what I needed! Everything is working perfectly now. Although I tried to get the vertical table in the showthread as well, but it kept coming out weird, so I just made it horizontal. Do you know where I'd put the table to have it show up like the main download page?

http://cavernofcreativity.com/Atlas/foru...http://cavernofcreativity.com/Atlas/forumdisplay.
This is how I want it to show up in the showthread template.

http://cavernofcreativity.com/Atlas/show...http://cavernofcreativity.com/Atlas/showthread.
This is how I have it now (when you click into the download), but where would I put the vertical table so that it shows up like the downloads page with the vertical menu on the side?
You can do that with a similar method in your dld_showthread template.
Here is a simple example for that:

HTML Code
<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	var quickdelete_confirm = "{$lang->quickdelete_confirm}";
// -->
</script>
<script type="text/javascript" src="jscripts/thread.js?ver=1400"></script>
</head>
<body>
	{$header}
	{$pollbox}
	<div class="float_left">
		{$multipage}
	</div>
	<div class="float_right">
		{$newreply}
	</div>
	{$ratethread}
	<br class="clear" />
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="clear: both; width: 100%;">
		<tr>
			<td valign="top">
				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
					<tr>
						<td class="thead">
							<div><strong>Category</strong></div>
						</td>
					</tr>
					<tr>
						<td class="trow1">
							Category 1
						</td>
					</tr>
					<tr>
						<td class="trow1">
							Category 2
						</td>
					</tr>
					<tr>
						<td class="trow1">
							Category 3
						</td>
					</tr>
				</table>
			</td>
			<td valign="top">
				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
					<tr>
						<td class="thead" colspan="2">
							<div style="float: right;">
								<span class="smalltext"><strong><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->linear}</a></strong></span>
							</div>
							<div>
								<strong>{$thread['subject']}</strong>
							</div>
						</td>
					</tr>
					<tr>
						<td class="tcat" colspan="2">
							<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
								<tr>
									<td class="trow1" width="40%">
										<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>
									</td>
				
									<td class="trow1" width="60%">
										<div align="center">
											<a href="{$GLOBALS['threadfields']['fscr']['url']}" target="_blank"><img src="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['url']}" alt="{$thread['subject']} Screenshot" title="{$thread['subject']} Screenshot" width="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['w']}" height="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['h']}" /></a>
										</div>
									</td>
								</tr>
								<tr>
									<td class="trow1" colspan="2">
										<span class="float_left smalltext">
											{$GLOBALS['threadfields']['fupload']['value']}
										</span>
										<span class="float_right smalltext">
											<em>
											Category: {$GLOBALS['threadfields']['fcat']}
											{$lang->views} {$thread['views']},
											{$lang->replies} <a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts} 
											</em>
										</span>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					{$classic_header}
				</table>
				<div id="posts">
					{$first_post}{$posts}
				</div>
				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="border-top-width: 0;">
					<tr>
						<td colspan="2" class="tfoot">
							{$search_thread}
							<div>
								<strong>&laquo; <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> &raquo;</strong>
							</div>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<div class="float_left">
		{$multipage}
	</div>
	<div style="padding-top: 4px;" class="float_right">
		{$newreply}
	</div>
	<br style="clear: both;" />
	{$quickreply}
	{$threadexbox}
	{$similarthreads}
	<br />
	<div class="float_left">
		<ul class="thread_tools">
			<li class="printable"><a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li>
			<li class="sendthread"><a href="sendthread.php?tid={$tid}">{$lang->send_thread}</a></li>
			<li class="subscription_{$add_remove_subscription}"><a href="usercp2.php?action={$add_remove_subscription}subscription&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a></li>
		</ul>
	</div>

	<div class="float_right" style="text-align: right;">
		{$moderationoptions}
		{$forumjump}
	</div>
	<br style="clear: both;" />
	{$footer}
</body>
</html>

Modify it as your needs.

Oh my goodness, that works perfectly. I was stuck on that all day yesterday and a good chunk of today trying to get it to work before I finally gave up. You made my day! Biggrin Thank you!
Hey again, I'm using the downloads block that you attached, I can't put more than 1 fid in it. I could do it with the others, but not with this one. Is there a way to put more than one fid in it and have it work?
My quick 5 second glance would suggest these changes - open up block_latest_downloads.php, find:

Code:
t.fid='.intval($xtdldfid).'

Replace with

Code:
t.fid IN ('.$xtdldfid.')


Then find the line

Code:
$xtdldfid = 1;// Forum ID for XThreads Downloads

change to

Code:
$xtdldfid = '1,2,3';// Comma separated list of forum IDs for XThreads Downloads

Just tried it, it didn't work out. It's still only showing one fid. I used different template prefixes, file upload keys and category keys for all of them. Could that be why? Everything else is the same (screenshot key, author key and description key)

edit: It actually DOES work, I was pointing it to the wrong forum ID. (Was pointing it to the category housing the actual download forums) Thank you so much I appreciate the help!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Reference URL's