Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 168
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 173
Total: 173

Author Topic: Increase Recent Downloads/Uploads  (Read 5468 times)

0 Members and 1 Guest are viewing this topic.

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 185
    • View Profile
    • Quizland
Increase Recent Downloads/Uploads
« 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 ;)

Dave

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 185
    • View Profile
    • Quizland
Re: Increase Recent Downloads/Uploads
« Reply #1 on: July 08, 2012, 06:50:04 am »
please?

;)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Increase Recent Downloads/Uploads
« 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 185
    • View Profile
    • Quizland
Re: Increase Recent Downloads/Uploads
« Reply #3 on: July 09, 2012, 04:27:29 am »
Thanks for the reply I'll check it out when I get home  ;)

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 185
    • View Profile
    • Quizland
Re: Increase Recent Downloads/Uploads
« 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: [Select]
$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";

Offline shaka

  • Member
  • *
  • Posts: 37
    • View Profile
Re: Increase Recent Downloads/Uploads
« Reply #5 on: July 09, 2012, 01:42:47 pm »
worked a treat thanks for the info  ;)

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 185
    • View Profile
    • Quizland
Re: Increase Recent Downloads/Uploads
« Reply #6 on: March 05, 2022, 11:10:07 am »
Hi VB,

Can you tell me how to do this now in the latest version for the 2.1 template please?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Increase Recent Downloads/Uploads
« Reply #7 on: March 06, 2022, 07:45:12 pm »
It should be about the same no major changes unless minor style changes.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 185
    • View Profile
    • Quizland
Re: Increase Recent Downloads/Uploads
« Reply #8 on: March 07, 2022, 01:00:04 am »
It should be about the same no major changes unless minor style changes.

I really should read things better. For some reason, I was looking in themes, default and the downloads template not Sources.

Thank you VB yes you are right

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
6401 Views
Last post September 04, 2006, 11:27:52 pm
by benny
0 Replies
3294 Views
Last post August 26, 2009, 08:09:57 pm
by Matth41
0 Replies
2123 Views
Last post September 07, 2011, 09:04:51 am
by david_meyer24
1 Replies
3141 Views
Last post June 01, 2012, 09:04:04 am
by SMFHacks
1 Replies
3284 Views
Last post May 22, 2015, 11:28:07 am
by SMFHacks

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal