Facebook 

SMFHacks.com - Celebrating 20 Years!

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4341
Latest: jmac32here
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 44306
Total Topics: 7676
Most Online Today: 365
Most Online Ever: 27044
(May 30, 2026, 09:10:16 pm)
Users Online
Members: 0
Guests: 150
Total: 150

Author Topic: Deleting original download buttons  (Read 13214 times)

0 Members and 1 Guest are viewing this topic.

Deleting original download buttons
« on: »
Hi VB,

My situation is that we have more than 6k downloads on our system and we were using a host company that we've decided to part from. I have removed all the links in the database relating to that host.

A lot of the downloads have an alternative download which you kindly sorted for us so we can have multiple linked downloads for one post. My question is where we have the alternative downloads how can we remove the original download button and just leave the secondary button, which would then become the primary button?

Can you think of a way to do that in the database? I really don't want to go through probably 2k downloads and edit them manually.

Any help is much appreciated

Re: Deleting original download buttons
« Reply #1 on: »
I will look into it should be possible. I take it, if you have multiple alternative downloads it should take the next one in the list as the primary?
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/

Re: Deleting original download buttons
« Reply #2 on: »
Since you updated the mod to allow additional linked files we've been using alternative download links. Where there was only one download I can temorarily remove those tables from the database to leave the ones with 2 downloads, at least in my head I can. It would all be trial and error on my part. I have daily backups of the dstabase so I wont lose anything.

Another alternative to you doing that VB is if you can tell me how I can remove the database entries for links like the one below.

Code: [Select]
https://www.filefactory.com/file/75rhoje35jb6/WIN-Bingo-Setup.zip
I can remove all the instances of
Code: [Select]
https://www.filefactory.com/file/ but the text following that remains as it's a unique link to a file and all other links following that have all got different text that I'm left with in the database and download.

I've tried using 'UPDATE smf_down_file SET fileurl = REPLACE(fileurl, 'https://www.filefactory.com/file/', '')' but because of the unique text following that path the unique text remains. I cannot use a wildcard with Replace apparently the other way to do it is with delete and then use the % wildcard but that removes everything following the
Code: [Select]
https://www.filefactory.com/file/

I'm at a loss of how to do what I want. The idea of removing the primary button probably is not the way to go as not all primary linked downloads have the web link I'm trying to get rid of because we added another file host earlier last year so some new linked files will only have one download button.

I can manually remove the whole link in the database via phpMyadmin I will start to do that and if you come up with a solution happy days.


I think I'm rambling now sorry about that, if you know how I can achieve what I want I'd be very grateful
« Last Edit: January 30, 2026, 07:48:26 am by davejo »

Re: Deleting original download buttons
« Reply #3 on: »
VB

To save you time forget about this. There are to many variations of primary and secondary linked files so I've started doing things manually.

What would help though is being able to edit the secondary links so they can be copied to replace the primary ones, see attached. That would save going to the file host and copying the link to go back and paste into the download, doing it all on one page would be a lot faster.
« Last Edit: January 31, 2026, 07:44:10 am by davejo »

Re: Deleting original download buttons
« Reply #4 on: »
On vacation till next week remind me if forget.
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/

Re: Deleting original download buttons
« Reply #5 on: »
On vacation till next week remind me if forget.

Thanks for replying and enjoy the rest of your vacation

Re: Deleting original download buttons
« Reply #6 on: »
It's next week ;D
Like Like x 1 View List

Re: Deleting original download buttons
« Reply #7 on: »
6.3.1
+Added a Make Primary button link if you have multiple files/multiple file urls on the edit page. It will swap the primary download/url with extra file/download.
+Database is now InnoDB tables by default and the install script will convert existing tables.
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/

Re: Deleting original download buttons
« Reply #8 on: »
Thanks very much VB.

Just tested this out on my test site and I cannot see a 'Make Primary'  when editing, in fact we've lost the visual of the secondary download.

If you look at the image 'editv6.3' that's how it looks before the update to 6.3.1
« Last Edit: February 16, 2026, 04:21:46 pm by davejo »

Re: Deleting original download buttons
« Reply #9 on: »
Thanks for the new update VB.

I apologies as I didn't put a figure in the  'Max number of additional files per download:'  now I've done that it's all working well

Re: Deleting original download buttons
« Reply #10 on: »
Glad it is working!
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
3 Replies
7727 Views
Last post November 25, 2007, 01:37:19 pm
by dlomneck
3 Replies
8474 Views
Last post April 09, 2009, 02:20:25 am
by onrozcn
1 Replies
8262 Views
Last post June 10, 2009, 10:35:42 pm
by blackking18
2 Replies
8615 Views
Last post August 18, 2013, 11:22:21 am
by CWVRV
16 Replies
9253 Views
Last post June 20, 2021, 12:41:48 pm
by robgratt

+- Recent Topics

Registration - anti bot pattern matching by SMFHacks
November 01, 2026, 07:20:17 pm

EZPortal 8 by davejo
October 21, 2026, 01:01:54 pm

Downloads Pro 7.0 Released by SMFHacks
October 07, 2026, 07:35:30 pm

[Mod]ActivityPub Federation for SMF 2.1 by SMFHacks
October 01, 2026, 05:03:45 pm

Newsletter Pro 4.0 Released by SMFHacks
September 23, 2026, 08:08:24 pm

Can't remove or restore any item from the recycle bin by SMFHacks
September 22, 2026, 11:01:51 am

MCP Server for SMF 2.1 - let Claude, ChatGPT or Cursor run your admin chores by SMFHacks
September 12, 2026, 02:50:45 pm

Suggestions for improvements to Ultimate Shoutbox & Chatroom by davejo
September 02, 2026, 01:35:09 am

Automatic Sorting of Categories by Kiwi
August 31, 2026, 12:36:09 am

' appears as ' in Most Viewed (and Recent Items ?) by SMFHacks
August 22, 2026, 11:01:56 pm

Powered by EzPortal