Get started with PHP-Fusion

Start a New Thread

Users Participated

  • Moregelen
    Post made: 2
  • Ankur
    Post made: 1
  • edmunds
    Post made: 3

Similar Discussions


  1. PHP-Fusion Support Forums
  2. PHP-Fusion 7 Support
  3. Content Administration

How admin can change/delete Downloads ?

This forum is for questions regarding the addition of content to your site

5 Replies 1,485 Views Last Updated on 3 years ago

edmunds


Newbie

#1

Posted 3 years ago

Cannot find anything in Admin Panel. There is an Add Download screen and at the bottom of the screen there is a rather weird screen named Current Downloads, where I can see all the Download categories however no functions/menus are related with them.

Plz advise. In case no ideas, please give me an idea, how to delete the stuff from database.

Thanks in advance,
E.

Merged on Mar 02 2012 at 15:40:59:
Come on, guys...am I the only one to use Downloads ?
Edited by edmunds on 02-03-2012 16:40

Posts: 5

Joined: 01/03/2012

Ankur


Admin

#2

Posted 3 years ago

Please do not bump the thread.

You can simply add the Download Categories first in Admin Panel --> Content Admin --> Download Categories and then add Downloads y going to Admin Panel --> Content Admin --> Downloads
Hi! Its me, Ankur Thakur! :)

Posts: 1279

Joined: 02/11/2010

edmunds


Newbie

#3

Posted 3 years ago

Ankur wrote:

Please do not bump the thread.

You can simply add the Download Categories first in Admin Panel --> Content Admin --> Download Categories and then add Downloads y going to Admin Panel --> Content Admin --> Downloads


I have NO problems whatsoever ADDING downloads. I have problems EDITING and DELETING downloads.

Posts: 5

Joined: 01/03/2012

Moregelen


Junior Member

#4

Posted 3 years ago

Are you using the current version of phpFusion? If so, if you go to your content admin page, then click Download, at the very bottom there should be a list of the current downloads available, along with Edit and Delete links.

If you absolutely have to kill those downloads and you can't, you could manually drop the data with either a bit of code in a custom page:

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]<?php
$result = dbquery("SELECT download_file, download_image, download_image_thumb FROM ".DB_DOWNLOADS."");
if (dbrows($result)) {
while($data = dbarray($result)) {
if (!empty($data['download_file']) && file_exists(DOWNLOADS.$data['download_file'])) {
@unlink(DOWNLOADS.$data['download_file']);
}
if (!empty($data['download_image']) && file_exists(DOWNLOADS."images/".$data['download_image'])) {
@unlink(DOWNLOADS."images/".$data['download_image']);
}
if (!empty($data['download_image_thumb']) && file_exists(DOWNLOADS."images/".$data['download_image_thumb'])) {
@unlink(DOWNLOADS."images/".$data['download_image_thumb']);
}
$result = dbquery("DELETE FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['download_id']."'");
}
}
?>[/syntaxhighlighter]

That will delete all the downloads you have up.. and if you wanted to delete only certain downloads you could add a
WHERE download_id IN (1,2,3,4)
at the end of the query, and change 1,2,3,4 to a comma separated list of your download ids.

This is just a bit of a hack job though. Are you getting any errors or anything while trying to delete downloads? Need a bit more than

Cannot find anything in Admin Panel. There is an Add Download screen and at the bottom of the screen there is a rather weird screen named Current Downloads, where I can see all the Download categories however no functions/menus are related with them.


to help. It sounds like you don't see the Edit/Download links, but surely phpFusion is reporting some kind of error if that is the case?

unlockedpotential.net/screenshot_downloads_options.png
Edited by Moregelen on 04-03-2012 19:00
Oooooh.. is that what Deep Corruption does? Ooopsie...
.. so, how do I heal without Holy Radiance spam anyway? I forgot...

Posts: 37

Joined: 25/06/2007

edmunds


Newbie

#5

Posted 3 years ago

Thanks, mate! Nothing can stand against SQL and I am not afraid to use it ! Smile

I am using version v7.02.04 and I have got the answer to my problems. The problem I have is associated with Modern10 theme I use in my forum.

The thing is - other themes show the download categories list and there is a plus sign at the right. If you press it, you get your downloads list.

But not with Modern10. I guess the theme authors have missed some implementation details. If you will switch to the Modern10 theme and try to edit/delete downloads you will get my point.

Great thanks!
Edmunds

Posts: 5

Joined: 01/03/2012

Moregelen


Junior Member

#6

Posted 3 years ago

I went and looked, and it didn't show my test download; I viewed the source and the download was in fact there, but with a style='display:none;'. Odd that! I added another download just to see, and suddenly its visible! Very weird behavior; I'll take a poke into the code to see if I can't figure out what this thing is doing.

Merged on Mar 05 2012 at 16:00:12:
For some reason I can't actually reproduce the affect where they aren't showing up; after adding the second download it is working just fine for me now.
Edited by Moregelen on 05-03-2012 22:00
Oooooh.. is that what Deep Corruption does? Ooopsie...
.. so, how do I heal without Holy Radiance spam anyway? I forgot...

Posts: 37

Joined: 25/06/2007

Jump to Forum:
12 users are online
0 member and 12 guests