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: 177
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 194
Total: 194

Author Topic: Downloads tweak  (Read 3751 times)

0 Members and 1 Guest are viewing this topic.

Offline Itchigo69

  • Member
  • *
  • Posts: 32
    • View Profile
Downloads tweak
« on: August 14, 2014, 03:14:44 pm »
Here's what I want to do. If I'm directed to the correct place I think I can pull it off myself.

1. When something is uploaded it starts a release thread. It shows the thumbnail pic as the default. I want it to display the medium as the default. I'm guessing it's just changing thumb to medium (as I've been doing), but where do I go to make it default?

2. When editing files in downloads it always returns me to "my files" as the default. This is a pita. So how do I make it return me to the category I was just in? Editing multiple files in the same category is very tedious this way. Again, I'm guessing I just change a single thing like "my files" to "previous category", or whatever it is.


When I say where, I mean specifically what file and how far down (roughly). Am I better off replacing the file or editing it through the package manager? Wait, I can just do it through the ftp. ;D

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Downloads tweak
« Reply #1 on: August 14, 2014, 09:47:33 pm »
1. There is no setting would require code changes
Use mediumfilename instead of thumbfilename in all places in this code

Code: [Select]
$picResult = db_query("
SELECT
p.thumbfilename
FROM {$db_prefix}down_file as f
LEFT JOIN {$db_prefix}down_file_pic AS p ON (p.ID_PICTURE = f.ID_PICTURE)
WHERE f.ID_FILE = " . $file_id, __FILE__, __LINE__);
$picRow = mysql_fetch_assoc($picResult);
mysql_free_result($picResult);
$imageLink = '';
if (!empty($picRow['thumbfilename']))
{
$imageLink = "\n[url=" .  $scripturl . '?action=downloads;sa=view;down=' . $file_id  . "][img]";

$imageLink .= $modSettings['down_url'] .  $picRow['thumbfilename'];

$imageLink .= "[/img][/url]";
}



2. I can make this change in the next update if it helps which I could do this weekend.
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 SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Downloads tweak
« Reply #2 on: August 15, 2014, 09:10:51 pm »
Tweaks made post updated

3.0.4
!Editing download now returns to the download category instead of MyFiles area
+Added option to use medium filename for post creation under settings
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/

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
8340 Views
Last post January 19, 2008, 09:35:38 am
by madeupmedia
0 Replies
5641 Views
Last post May 19, 2008, 08:57:52 pm
by ApplianceJunk
1 Replies
5866 Views
Last post July 10, 2011, 09:34:24 am
by SMFHacks
7 Replies
10964 Views
Last post January 20, 2014, 11:17:32 am
by SMFHacks
0 Replies
759 Views
Last post March 31, 2022, 03:53:45 pm
by PapaFrizArcade

+- 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