New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to delete old comments? #264

Closed
SnorlaxYum opened this Issue Jul 31, 2016 · 12 comments

Comments

Projects
None yet
4 participants
@SnorlaxYum

SnorlaxYum commented Jul 31, 2016

I just imported some comments from my old blog before I wanted to delete some of them......
So how to delete these old comments? There r no delete links for any of them......

@pozitron57

This comment has been minimized.

Contributor

pozitron57 commented Jul 31, 2016

There are few ways.

  1. Delete comments in your old blog and then export to Isso. If you can't do that, edit exported *.xml file with your favorite text editor to delete undesirable comments and then export to Isso.
  2. Install PR #256. You will have an access to admin panel through http://my-isso.installation.com/admin. There are Delete buttons, so you will be able to delete comments easily.
  3. You can edit directly the database file, which is by default /var/lib/isso/comments.db. Copy this file (create 2 copies in case you'll mess something up and won't notice it immediately) and edit it using Sqlite3:
cp /var/lib/isso/comments.db ~/
cp /var/lib/isso/comments.db ~/original_comments.db
cd
sqlite3

You will have an sqlite> prompt then. Use sqlite3 syntax to find and delete comment, e.g.:

sqlite> ATTACH 'comments.db' as isso;
sqlite> SELECT id,author,text from isso.comments;

Imagine that id of some comment you want to delete is 852. To delete it you should do:

sqlite> DELETE FROM isso.comments WHERE id=852;
@SnorlaxYum

This comment has been minimized.

SnorlaxYum commented Aug 1, 2016

Thanks solved with the third way.
Wondering how to install that PR request.......
Also could there be a way to reorder the id of comments and make the deleted unexist radically?

@pozitron57

This comment has been minimized.

Contributor

pozitron57 commented Aug 1, 2016

To use PR #256, you can just reinstall isso from https://github.com/blatinier/isso/tree/issue-10/admin-interface.

To change id of a comment from 892 to 890 in Sqlite3 you can do

sqlite> ATTACH 'comments.db' as isso;
sqlite> UPDATE isso.comments SET id='890' WHERE id=892;

What do you mean by unexist radically? Do deleted comments show up in some way? Note that there is also a .threads table in the database file. Its content you can see by doing

sqlite> SELECT * FROM isso.threads;
@SnorlaxYum

This comment has been minimized.

SnorlaxYum commented Aug 1, 2016

Thanks for ur patience! Still wondering how to reinstall......
Uninstall the isso I've installed first?Then install?
In the documentation(https://posativ.org/isso/docs/install/), to install from Github, just git clone https://github.com/posativ/isso.git first
But as we know that #256 is not the latest......
When I git clone https://github.com/blatinier/isso.git, it will clone the latest automatically.
Does the latest include that function?

@blatinier

This comment has been minimized.

Collaborator

blatinier commented Aug 5, 2016

To clone the branch having the admin interface use this:
git clone -b issue-10/admin-interface git@github.com:blatinier/isso.git
When you simply clone a repository it takes the branch master by default, not the latest work.

But be aware, I might change things time to time on this branch :)
I don't usually leave it broken for long but it can be. (At least until merge)

@SnorlaxYum

This comment has been minimized.

SnorlaxYum commented Aug 6, 2016

So is ur latest master branch still including that feature?
Also wondering if I could use Sqlite3 to edit the name,email and the URL of a comment author.
I know it's executable but I don't know how to do it.

@blatinier

This comment has been minimized.

Collaborator

blatinier commented Aug 7, 2016

My latest master is the same as posativ's one. It doesn't include administration.
And yes you can use sqlite3 to edit a comment. See @pozitron57 comments, he show you how to do it.

@SnorlaxYum

This comment has been minimized.

SnorlaxYum commented Aug 8, 2016

How to find? His profile only show few: https://github.com/pozitron57?tab=activity

@pozitron57

This comment has been minimized.

Contributor

pozitron57 commented Aug 8, 2016

@BabyBichu I think @blatinier meant my comments in this thread. If you want more examples on sqlite3, check out this tutorial.

@SnorlaxYum

This comment has been minimized.

SnorlaxYum commented Aug 13, 2016

@pozitron57 Just solved it thanks!

@somenxavier

This comment has been minimized.

somenxavier commented Oct 2, 2016

Perhaps @posativ could include #256 in master. What the state of this? Thx

@somenxavier

This comment has been minimized.

somenxavier commented Oct 2, 2016

Perhaps meanwhile admin interface is ready, we could fix the documentation. This is a FAQ question I think

@SnorlaxYum SnorlaxYum closed this Nov 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment