Keyword

Deleting K2 comments - plugin suggestion

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
13 years 5 months ago #95548 by Oceanwatcher
Deleting K2 comments - plugin suggestion was created by Oceanwatcher
It happens now and then that there is a need to clean out some thousand comments because somehow a spammer found a way to bombard you with crap.

First - turn on reCaptcha.

BUT - how do we delete it?

One method is to use PhpMyAdmin and delete the content of the k2_comments table.

What I really would like to see is a new K2 plugin that do one thing for us - mark all comments as unpublished.

If we could do this, we then could go and mark the valid comments as published, then click "Delete all unpublished". And the problem would be solved...

Is anyone up for this? Make a plugin that unpublish ALL comments - not only the ones you can list on a page.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #95549 by Chad Foreman
Replied by Chad Foreman on topic Deleting K2 comments - plugin suggestion
Thank you very much. Except now my site won't open and I get an "unable to connect to database" error message. I didn't do anything else other than delete the content of the k2_comments table. Hmmmmmmmm, any guesses as to something I might have done?

Please Log in or Create an account to join the conversation.

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
13 years 5 months ago #95550 by Oceanwatcher
Replied by Oceanwatcher on topic Deleting K2 comments - plugin suggestion
You did make a backup first, right?

 

Being unable to connect to the database usually means that the database as a whole is offline. So it could be that your host has a problem. Or that you deleted a bit more...

 

How exactly did you delete the content of the table?

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #95551 by Chad Foreman
Replied by Chad Foreman on topic Deleting K2 comments - plugin suggestion
Backup? Nahhhhh, who needs it? Yeah, Yeah, I know. First rule of dealing with databases. As mostly a designer, I need to work on my database-ness.

 

I woke up at 3 am, couldn't sleep. Decided I wanted to work on my site that I started a year ago. Discovered I had left comments turned on and of course no re-capcha. That's where all those comments came from. It's really no big deal because there's not that much content on there right now anyway. In the future I will back up my database.

 

In the process I reset my password. Again, it was 3am so I wasn't thinking clearly. I know better than to work in that situation but did anyway. This site is hosted at GoDaddy, so I went to the php admin. Clicked on the jos_k2_comments. Then I selected one of the 9 fields. I started with "published." Then I clicked "empty." Then I did the same thing with the other 8 fields: "commentURL," "
commentEmail" and the other 6.

 

Here's a note that I just recognized while searching other forum topics similar to this one, about the mysql being offline. Is that in the process I changed my password. After reading the post I remembered where I stored my original password and then changed it back.

 

Still no luck. In the overall picture it will probably be best to just scrap the whole site and re-install Joomla and K2. I didn't have that much content up there anyway, I've been working on a new template and I think that Joomla 1.6 might be out. 

 

Either way, I'm an optimist.

 

 

 

 

Please Log in or Create an account to join the conversation.

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
13 years 5 months ago #95552 by Oceanwatcher
Replied by Oceanwatcher on topic Deleting K2 comments - plugin suggestion
Hi Chad,

 

The easy way of just emptying the tables is to use PhpMyAdmin. It is a one button thing!

 

Regarding your password change: Change it to anything you want, but also remember to change it in configuration.php in the root of your site as well. As long as you are able to log in to the database to work on it, you should be able to connect to it from Joomla unless your host has changed firewall settings etc.

 

Joomla 1.6 is fine for a personal blog or a smaller site that do not need much special stuff. But for a bigger site that needs to be stable and reliable, I would stay on 1.5 for now.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #95553 by Chad Foreman
Replied by Chad Foreman on topic Deleting K2 comments - plugin suggestion
I thought I was using PhpMyAdmin. It sure looked like it to me (without going back and double-checking)

I don't mind starting over. It's all good. Live and learn.

Thank you for the tip about the configuration.php info with the username and password. I really appreciate that.

Also, thanks for the advice on 1.5 vs 1.6. I kind of thought that, since it's so new. I'll just check it out locally for now and stick with 1.5 on my live site.

When it's time to upgrade to 1.6 I'll be sure to back up my database first! :) 

Thanks again for the help!

Please Log in or Create an account to join the conversation.

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
13 years 5 months ago #95554 by Oceanwatcher
Replied by Oceanwatcher on topic Deleting K2 comments - plugin suggestion
No problem. We try to help where we can :-)

 

For backup: Nothing beats AkeebaBackup. It also backs up your database.

 

If I remember correct, there is another thread about how to delete the content of the comments table (not the table itself) her somewhere as well. But if you need some more help, just let me know.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #95555 by Chad Foreman
Replied by Chad Foreman on topic Deleting K2 comments - plugin suggestion
Well, I didn't delete the table (according to what I witnessed.) I could still read the table descriptions and what was in each field (URL and name and that kind of stuff. So I thought that I had done it right. Actually I think that I did do it right. What I think is that somewhere in the process is where I did something wrong. I may have done one little thing wrong and that's where the problem is. Again though, being more of an html/css kind of guy, I don't know exactly what I did wrong. Or, more importantly, how to fix it or how to look at where to begin to fix it.

 

Again though I do appreciate the help on the technical side of the back end stuff. Sounds like you know your gig pretty well. Thanks again. And thanks for the tip on AkeebaBackup. I'll look in to that.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum