Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: [1] 2

Author Topic: delete category ?  (Read 11766 times)

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
delete category ?
« on: March 31, 2007, 02:45:22 PM »

hey all :)

on my site i had a category i deleted, then i saw all articles
from that category was not deleted but now has a url of home/name-of-article,
i can not see those articles in admin panel, or site map,
i can see those articles listed in the archive page :o



any idea ?????


awesome day
mo

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
delete category ?
« Reply #1 on: March 31, 2007, 03:07:47 PM »

category deletion does not remove the 'contained' articles.
On deletion, articles lose their category assignment, and return to the 'Home" psuedo category
Logged
Of all the things I have lost, it is my mind that I miss the most.

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
delete category ?
« Reply #2 on: March 31, 2007, 03:21:05 PM »

hey philmoz, thanks

so if i wanted to delet all articles in category and the category it self,
would i have to go to phpmyadmin to that ??

think its worth a mod hehe
awesome day/night to all
mo

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
delete category ?
« Reply #3 on: March 31, 2007, 03:30:01 PM »

various ways to do it.
1. give no option, just remove articles from db when delete is confirmed for category.
2. option to delete or not articles in category.
3. checkbox next to each article in admin view, with optional delete button (Delete Selected), for bulk article delete, prior to category deletion. (remainder would then be thrown into psuedo cat 'Home')

I have a bit on my plate at present...  :P  
care to have a go?
Logged
Of all the things I have lost, it is my mind that I miss the most.

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
delete category ?
« Reply #4 on: March 31, 2007, 03:37:32 PM »

hehe bonapetit  :D
for start i think i will try option 2,
its easy and simple function for end user

very good idea philmoz  :cool:
thanks
mo

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
delete category ?
« Reply #5 on: April 02, 2007, 01:25:18 AM »

Quote from: philmoz
category deletion does not remove the 'contained' articles.
On deletion, articles lose their category assignment, and return to the 'Home" psuedo category
Hmm that's an interesting decision... I've never played around with deleting a category while it had articles assigned to it.. what would be a good idea would be to have an option to either a) delete all articles assigned to the category being deleted or b) re-assign the articvles to a different category.
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
delete category ?
« Reply #6 on: April 02, 2007, 10:47:34 AM »

eh-hem um, pix, 2 posts up ;)
Logged
Of all the things I have lost, it is my mind that I miss the most.

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
delete category ?
« Reply #7 on: April 02, 2007, 01:25:56 PM »

so far i did a button to delete all articles in cat,
but then i realised that i need to delete comments that are
attached to those articles  :P

 awesome day to all
mo

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
delete category ?
« Reply #8 on: April 03, 2007, 01:49:51 PM »

update on the deleted category:

in phpmyadmin, i wanted to delete those articles
from the category that i have deleted via the snews admin cp,

i have noticed:
category was deleted, it does not show in category table.


all articles in that cat, still have the deleted category ID listed in the article table


wasn't the artlicles get new category id  ?

awesome day to all :cool:
mo

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
delete category ?
« Reply #9 on: April 03, 2007, 06:20:23 PM »

May be in theory that id has to cleared (like set category=0), but what is in code should and works as You described, mo  ;)  Actually, I think that reasonable approach to handle articles on deletion of category would be to un-publish them (set publish=0) to ensure that site's home page isn't flooded with whatever was under category deleted.

AFAIK same story is valid for deletion of articles as statement for deleting all related comments ends with option 'LIMIT 1'. Thus only first related comment will be deleted ;)
Logged

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
delete category ?
« Reply #10 on: April 03, 2007, 06:58:09 PM »

you are right codetwist,  the Unpublish option is a good one to add to the list of option needed for manage larg amount of articles + comments  :cool:

awesome day 2 all  :D

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
delete category ?
« Reply #11 on: April 04, 2007, 01:39:39 AM »

I'm following this thread with interest mo and codie... and I think your ideas about unpublishing articles when category is deleted is an excellent one  :cool:
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
delete category ?
« Reply #12 on: April 04, 2007, 09:15:36 AM »

i guess those functions are needed   :D

i have added to my test installtion a button to delete cat,arts,comments
all are deleted nice from the site, but the comments still left in database humm  :P

ill do some more exploring today  :D
very cool day to all
mo

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: delete category ?
« Reply #13 on: July 23, 2008, 07:48:25 PM »

For anyone who may come upon this thread wanting a "fix" for lost content after deleting a Category... this has been fixed with a minor modification now assigns "unpublished" status to content associated with a Category that has been deleted. The content remains listed in the Articles View list and can then be edited and re-located to another category from there. These changes were added to the official sNews 1.6 download on July 23.08.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Nicu Alecu

  • Full Member
  • ***
  • Karma: 12
  • Posts: 224
    • BLUEBYTE.ro // IT consultant
Re: delete category ?
« Reply #14 on: July 24, 2008, 05:38:49 PM »

Keyrocks, you busy little bee, you ...  ;D
Maybe it's not the right place to ask, but is there a DIFF version of the applied patches?
Cause I really don't want to start modding and altering yet another snews.php file on my installs ... or maybe the patches are too complicated to be applied separately?
Logged
Pages: [1] 2