Twitter SMFHacks Facebook SMFHacks SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 23, 2013, 09:48:30 am

Login with username, password and session length
Members
Total Members: 10768
Latest: tuberose
Stats
Total Posts: 32388
Total Topics: 5479
Online Today: 69
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 1
Guests: 37
Total: 38
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Increase Recent Downloads/Uploads  (Read 2113 times)
davejo
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« on: July 04, 2012, 02:10:47 pm »

By default the main page shows the 4 most recent uploads.

Is there a way to double this so there is 2 rows of 4?

Thanks as always Wink

Dave
Logged
davejo
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #1 on: July 08, 2012, 06:50:04 am »

please?

Wink
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11000


View Profile
« Reply #2 on: July 08, 2012, 08:56:36 am »

No current setting requires a file edit.

Open Sources/Downloads2.php


Find the Downloads_MainPageBlock function

Around line 6468 find "LIMIT 4" and change the number 4 of how many pictures you want to show



In that same function $maxrowlevel = 4; controls how many items per row.
Logged
davejo
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #3 on: July 09, 2012, 04:27:29 am »

Thanks for the reply I'll check it out when I get home  Wink
Logged
davejo
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #4 on: July 09, 2012, 01:00:38 pm »

No current setting requires a file edit.

Open Sources/Downloads2.php


Find the Downloads_MainPageBlock function

Around line 6468 find "LIMIT 4" and change the number 4 of how many pictures you want to show



In that same function $maxrowlevel = 4; controls how many items per row.

yep that works for me thanks very much,

In case someone else wants to do it you have to increase the 'catbg' size too

see below for my changes - I have changed 4 to 8

Code:
$maxrowlevel = 8;
echo '<table class="table_list">

         <thead class="header">

<tr  class="catbg">
<td align="center" colspan="8" class="catbg"><span class="left"></span>', $title, '</td>
</tr>
</thead>
';
//Check what type it is
$query = ' ';
$query_type2 = '';
$query_type = 'p.ID_FILE';
switch($type)
{
case 'recent':
$query_type = 'p.ID_FILE';
break;
case 'viewed':
$query_type = 'p.views';
break;
case 'mostcomments':
$query_type = 'p.commenttotal';
break;
case 'mostdownloaded':
$query_type = 'p.totaldownloads';
break;
case 'toprated':
$query_type = 'ratingaverage';
$query_type2 = ', (p.rating / p.totalratings ) AS ratingaverage  ';

break;
}

$query = "SELECT
p.ID_FILE, p.commenttotal, p.totalratings, p.rating, p.filesize, p.views, p.title,
p.ID_MEMBER, m.real_name, p.date, p.description, f.ID_PICTURE, f.thumbfilename,
mg.online_color, p.totaldownloads  $query_type2 
FROM {db_prefix}down_file as p
LEFT JOIN {db_prefix}members AS m  ON (m.ID_MEMBER = p.ID_MEMBER)
LEFT JOIN {db_prefix}membergroups AS mg  ON (m.ID_GROUP = mg.ID_GROUP)

LEFT JOIN {db_prefix}down_file_pic AS f ON (f.ID_PICTURE = p.ID_PICTURE)
LEFT JOIN {db_prefix}down_catperm AS c ON (c.ID_GROUP IN ($groupsdata) AND c.ID_CAT = p.ID_CAT)
WHERE p.approved = 1 AND (c.view IS NULL || c.view =1) GROUP by p.ID_FILE  ORDER BY $query_type DESC LIMIT 8";
Logged
shaka
Inline PM Customer
*****
Offline Offline

Posts: 37


View Profile
« Reply #5 on: July 09, 2012, 01:42:47 pm »

worked a treat thanks for the info  Wink
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 04:50:21 am]

[May 22, 2013, 10:03:30 pm]

[May 22, 2013, 03:00:09 pm]

[May 22, 2013, 03:03:31 am]

[May 21, 2013, 03:27:16 pm]

[May 21, 2013, 02:11:10 pm]

[May 21, 2013, 01:18:58 pm]

[May 21, 2013, 12:22:02 am]

[May 21, 2013, 12:20:41 am]

[May 19, 2013, 11:13:02 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 1.406 seconds with 20 queries.