hoaproject / W3

The W3 repository contains the website of Hoa.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Admin interface for comments

Hywan opened this issue · comments

We need this. This is REALLY easy to do, and fun. We use isso.
The database schema is here:

Our needs:

  • Login,
  • Logout,
  • List all comments,
  • List all threads,
  • Sort them.
    Optional: Delete or edit comments (but not really useful so far).

Any volunteers? /cc @hoaproject/hoackers

Also, there is this issue: isso-comments/isso#10, but no progress. We can do something really simple with PHP for the server part and we can use Ember or anything else for the client. A single-page application does fit in this case.

"The database schema is here:" ... where ?

@marmotz it's two SQLite tables.

I'm able to do a quick ember app and light php service for handle isso.

There is the ugly schema :

CREATE TABLE comments (
     tid REFERENCES threads(id), 
     id INTEGER PRIMARY KEY, 
     parent INTEGER,     
     created FLOAT NOT NULL, 
     modified FLOAT, 
     mode INTEGER, 
     remote_addr VARCHAR,     
     text VARCHAR, 
     author VARCHAR, 
     email VARCHAR, 
     website VARCHAR,     
     likes INTEGER DEFAULT 0, 
     dislikes INTEGER DEFAULT 0, 
     voters BLOB NOT NULL
);

CREATE TABLE threads (     
     id INTEGER PRIMARY KEY, 
     uri VARCHAR(256) UNIQUE, 
     title VARCHAR(256)
);

@marmotz Sorry… forget them :-p.
@Pierozi Thanks! You got my back!

I've finished, i will publish soon on my repo.
first time i used Ember, be kind :D

@Pierozi Looks great :-).

@Hywan you can test on my repo, but it's need a few correction and cleaning. https://github.com/Pierozi/isso-admin

@Hywan no it uses database.

@Hywan the PR you reference also use SQL. If i remember well, the API doesn't allow to make action on comments.

@Pierozi The PR uses the API, there is an endpoint moderate which I use. The SQL added in the PR concerns the comment retrieval only and is integrated in a new view of isso.

I think that what @Hywan means by "using the API" is that you integrate directly with isso to manage the comments and do not use an isso-external connection to the database. This ensures the admin interface won't break with isso upgrades.

This being said my PR does not include sorting nor editing and even less JS fancyness (ember/angular/react). And my login/logout mechanism is really basic (could not be more simplistic). Which you might have done.

@blatinier Thanks for the comment! @Pierozi can be off for some days (as we most of us are because of summer holiday…).

Now we have discourse.