News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Quick way to delete attachemts

Started by aw06, July 02, 2014, 02:51:12 PM

Previous topic - Next topic

aw06

I wan't to delete a whole bunch of attachments,.. when I log into cpanel and go to attachments folder I'm not seeing all attachments.. and the files are not jpg.. where do I go to delete attachments?

Thanks in Advance.
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

You're gonna kick yourself...

Admin>Forum>Attachments and avatars>Browse files.

Illori

attachments are in the attachments folder but they are hashed, this keeps someone from being able to call them directly in the browser.

best way to delete them would be via the admin panel under attachments and avatar, this way you remove them from the forum and the file.

aw06

Quote from: K@ on July 02, 2014, 02:58:15 PM
You're gonna kick yourself...

Admin>Forum>Attachments and avatars>Browse files.

Yea... I know about this... but thing is I have some attachments that I don't wanna delete..

So If I set it to delete all posted after x days I'm gonna loose some attachments that I want to retain.
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Illori

when you browse the files you can select which you want to delete, check the box on the right side of the attachment line and click remove selected

aw06

Quote from: Illori on July 02, 2014, 03:17:30 PM
when you browse the files you can select which you want to delete, check the box on the right side of the attachment line and click remove selected

Yepp.. that's the way I have to be doing it.. but I can only select like 20 files at a time.. I waan select like 100  O:)

Can't I do some edit so that 100 will show instead of 20?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Illori

are you trying to remove attachments older then x date or larger then x size? if so you can do that automatically on the attachments and avatars file maintenance tab

aw06

Quote from: Illori on July 02, 2014, 03:27:28 PM
are you trying to remove attachments older then x date or larger then x size? if so you can do that automatically on the attachments and avatars file maintenance tab

Yes... But there are some attachments that I don't want to delete.

If I select delete all older than 90 days.. it's gonna delete some attachments I have from previous years that I want to keep.
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

As this topic is, essentially, the same as this one:

http://www.simplemachines.org/community/index.php?topic=524693

I'm gonna lock the other one, but leave a note, there, referring to this one.

To show more attachments, when you view them, is gonna take some coding. I've taken a look at the files and I can't see an obvious way of doing that. But, I'll have another look, tomorrow, to see if I can figure something out.

aw06

Quote from: K@ on July 03, 2014, 05:02:07 PM
As this topic is, essentially, the same as this one:

http://www.simplemachines.org/community/index.php?topic=524693

I'm gonna lock the other one, but leave a note, there, referring to this one.

To show more attachments, when you view them, is gonna take some coding. I've taken a look at the files and I can't see an obvious way of doing that. But, I'll have another look, tomorrow, to see if I can figure something out.

OK thanks..
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

It's bloody annoying, to be honest, coz I can't see the wood for the damned trees, with this. There doesn't seem to be anything obvious controlling the "Items per page" thing, which is odd.

I'll keep trying, though.

aw06

Quote from: K@ on July 04, 2014, 11:56:42 AM
It's bloody annoying, to be honest, coz I can't see the wood for the damned trees, with this. There doesn't seem to be anything obvious controlling the "Items per page" thing, which is odd.

I'll keep trying, though.

Yea.. I had searched and found nothing.. it's buried somewhere there.
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

I just found a small cluette...

Might be something totally unrelated, though. Gimme a while, coz I'm doing a lot of things involving being in hospital, soon... :(

kat

OK... I'm getting somewhere. Slowly.

In Sources\ManageAttachments.php there's this:

'items_per_page' => $modSettings['defaultMaxMessages']

Looks like I need to delve in the mod settings (Not "mod" as in "Modifications). But, I have bad feeling that this is gonna be a global setting which'll affect loads of other things, not just the attachment list... :(

Having avatars in the same area as attachments is a pain in the arse, too.

Still lookin'...

aw06

Well I would just change it delete a few pages then change it back.
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

In ModerationCenter.php there's this:

// This is all the information from the moderation log.
$listOptions = array(
'id' => 'moderation_actions_list',
'title' => $txt['mc_modreport_modactions'],
'items_per_page' => 15,


Seems an odd place for it to be... But, you could try changing "15" to something else and see what happens...

It could break all sorts of things, though. So, "Use at own risk" and all that kinda stuff.

Actually, cancel ALL of that. I've been a total wazzock and been doing this with SMF v2.x and you're on v1.x...

<<Insert appropriate expletives here>>

Let me start, again...

aw06

Quote from: K@ on July 04, 2014, 12:30:45 PM
In ModerationCenter.php there's this:

// This is all the information from the moderation log.
$listOptions = array(
'id' => 'moderation_actions_list',
'title' => $txt['mc_modreport_modactions'],
'items_per_page' => 15,


Seems an odd place for it to be... But, you could try changing "15" to something else and see what happens...

It could break all sorts of things, though. So, "Use at own risk" and all that kinda stuff.

Actually, cancel ALL of that. I've been a total wazzock and been doing this with SMF v2.x and you're on v1.x...

<<Insert appropriate expletives here>>

Let me start, again...

lol  :P yea.. cause in 1.x it's 20 items per page.
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

The bastard is, SMF files are, usually, well commented-out, so I can figure things out. But, with this bugger, the comments are a bit sparse... (For "Sparse" read "Non-existant"). :P

aw06

Quote from: K@ on July 04, 2014, 12:38:14 PM
The bastard is, SMF files are, usually, well commented-out, so I can figure things out. But, with this bugger, the comments are a bit sparse... (For "Sparse" read "Non-existant"). :P

You soon crack it  8)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

Don't hold your breath, or wait up, though... ;)

kat

A cluette...

defaultMaxMessages

Just got to find where that's defined, now...

kat

   $modSettings['defaultMaxMessages'] = 5;

in index.php... Can't be that, then. :(

God, I have such fun, here, don't I? ;)

kat

Now my bloody AV's decided to upgrade... FFS...

aw06

:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

In ManageAttachments.php it looks like the number of items is controlled by "defaultMaxMessages".

But, as mine's set to "5" and my attachments page is showing twenty, like yours, I'm totally baffled and I've run out of ideas.

I hope you don't mind waiting for a flash of inspiration, or for someone else to post something, coz I have php code running all around my brain, trying to make sense of itself, at the moment. :(

Illori

this would end up changing the number of messages per page for everyone but you can change it back when you are done [so not requiring file edits]

admin -> posts and topics -> topic settings "Number of topics per page in the message index:" change that value to what you want to see on the attachments page and revert back to 20 when you are done.

kat

There HAD to be an easier way... :)

Ta!

aw06

Wow ... So easy... I have to laugh... This was puzzling me for months on end..

Thanks Illori and thanks K@  8)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

I should've realised, what with what it was called... Please refer to my comment about wood and trees. :)

aw06

Quote from: K@ on July 04, 2014, 03:09:48 PM
I should've realised, what with what it was called... Please refer to my comment about wood and trees. :)

Well I just freed up about 50GB of space..

Would have never guessed that is where you would control the amount from..
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

kat

It's kinda weird that that setting affects things that are kinda unrelated, yeah. But, as I said, the fact that "defaultMaxMessages" was there, should've been a clue. Well, it was a clue. I just went off at the wrong tangent, when I found it. :P

It's a bit illogical, really, which is why a woman figured it out. ;)

aw06

Never even knew she was a woman.  :P great
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Advertisement: