Thread: Major Additions - DownloadsII
View Single Post
  #863  
Old 07-30-2010, 01:45 AM
Webbstre Webbstre is offline
 
Join Date: Nov 2009
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've discovered how to move the top lists from the sidebar to the top of the page, lined side-by-side, with the sidebar only displaying the stuff you type in from the admincp. I'll put instructions in here on how to do it. If I ever figure out how to make a Recent or most Comments list (or if anyone who actually knows PHP can help me) I'll post those instructions here too... especially since I haven't seen the author of this mod respond to anything in forever.


First, an example of how I have lined up the Top lists:
http://www.runicgamesfansite.com/downloads.php

Now, the instructions:
Go into your AdminCP > Styles & Templates> Style Manager> Edit Templates (for the style you want to change)> Expand the Downloads Templates.

Now, you only need to edit two templates.

First, replace everything in downloads2_panel_side with this:
Code:
<table border="0" cellpadding="5" cellspacing="5" width="100%" text-align="center">

<tr>
<td width="33%">
<div id="sidebar_container" style="margin-bottom:-30px;">
	<ul id="sidebar">

<vb:if condition="$vboptions['dl2maxlatestfiles'] > 0">
<li>
	<div class="block smaller">
		<h4 class="blocksubhead">
			<a href="#top" id="collapse_dl2_latest" class="collapse"><img src="{vb:stylevar imgdir_button}/collapse_40b.png" alt="" /></a>
			{vb:rawphrase dl2_latest_files}
		</h4>
		<div class="blockbody" id="dl2_latest">
			<ul class="nobullets blockrow">
			{vb:raw dlstats.latestall}
			</ul>

		</div>
	</div>
	<div class="underblock"></div>
</li>
</vb:if>

	</ul>
</div>

</td>

<td>
<div id="sidebar_container" style="margin-bottom:-30px;">
	<ul id="sidebar">

<vb:if condition="$vboptions['dl2maxmostpopularfiles'] > 0">
<li>
	<div class="block smaller">
		<h4 class="blocksubhead">
			<a href="#top" id="collapse_dl2_popular" class="collapse"><img src="{vb:stylevar imgdir_button}/collapse_40b.png" alt="" /></a>
			{vb:rawphrase dl2_most_popular_files}
		</h4>
		<div class="blockbody" id="dl2_popular">
			<ol class="nobullets blockrow">
			{vb:raw dlstats.popularall}
			</ol>

		</div>
	</div>
	<div class="underblock"></div>
</li>
</vb:if>

	</ul>
</div>

</td>

<td>
<div id="sidebar_container" style="margin-bottom:-30px;">
	<ul id="sidebar">

<vb:if condition="$vboptions['dl2maxtopcontributors'] > 0">
<li>
	<div class="block smaller">
		<h4 class="blocksubhead">
			<a href="#top" id="collapse_dl2_contrib" class="collapse"><img src="{vb:stylevar imgdir_button}/collapse_40b.png" alt="" /></a>
			{vb:rawphrase dl2_top_contributors}
		</h4>
		<div class="blockbody" id="dl2_contrib">
			<ul class="nobullets blockrow">
			{vb:raw dlstats.contriball}
			</ul>

		</div>
	</div>
	<div class="underblock"></div>
</li>
</vb:if>

	</ul>
</div>

</td>
</tr>
</table>

Save and open up downloads2_wrapper_side. Replace everything with this:
Code:
{vb:raw dpanel}

<div id="content_container">
	<div id="content">
		<div id="pagetitle">
			<h1>{vb:rawphrase downloads2}<vb:if condition="$dlcustomtitle">: {vb:raw dlcustomtitle}</vb:if></h1>
		</div>
		{vb:raw dmain_jr}
	</div>
</div>
<div id="sidebar_container">
	<ul id="sidebar">
		<vb:if condition="$vboptions['dl2disclaimer']">
		<li>
			<div class="block smaller">
				<blockquote class="restore">
					{vb:raw vboptions.dl2disclaimer}
				</blockquote>
			</div>
		</li>
		</vb:if>
	</ul>
</div>
<div class="cleardiv"></div>
Now, assuming you haven't done any other edits that would make your sidebar go screwy, it should look right. I suggest making a child test style before implementing it to your live site.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01072 seconds
  • Memory Usage 1,784KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete