Módulo gnusocial para drupal8

(English README).

El módulo gnusocial  habilita los comentarios de gnusocial a cualquier tipo de contenido de Drupal 8. Depende únicamente del módulo composer manager  para solucionar las dependencias del plugin de guzzle oauth-subscriber.

Puedes usar este módulo para postear un status cuando nuevo contenido es publicado en drupal, o simplemente para añadir cualquier conversación  que viva en una instancia gnusocial que implementa la api de statusnet.

Basándome en el plugin de wpgnusocial y su idea de fondo: permitir comentarios de una red federada de conversaciones. 

Esto se consigue teniendo una cuenta del site en gnusocial (léase communiabot por ejemplo), esta será la que publicará la "notice" en gnusocial cuando un blog post se publique.

Hay algunos cambios respeto a wpgnusocial:

  • El método de autentificación entre gnusocial y drupal se hace via Oauth 3-legged. Eso requiere crear previamente una aplicación en tu nodo de gnusocial. Ganamos evitar ir pasando contraseñas de un sitio a otro, y permitimos revocación de la conexión por parte de gnusocial.
  • Posibilidad de asociar manualmente cualquier conversación de cualquier instancia gnusocial (configurada en el drupal o no) a un blog post generado, o editarla posteriormente.
  • Se asocia a un elemento de la api de statusnet conversation (as in https://git.gnu.io/gnu/gnu-social/blob/master/actions/apiconversation.p…https://github.com/andstatus/andstatus/issues/328 ).
  • Está previsto (no implementado aún) de que si la publicación de comentarios sea en dos sentidos, o sea permitir comentarios en el site y  que la cuenta de gnu social asociada al site publique respuestas-comentarios.
  • En un futuro se podrá configurar la visualización de la conversación de dos formas, obteniendo el hilo en el lado del servidor via php, (tal como está desarrollado actualmente), o en el lado cliente(pendiente), para evitar trabajos en el servidor.
  • Theming de la lista de comentarios y de cada status vía plantillas twig.

Intenta seguir en todo lo que puede las recomendaciones de drupal, usando las librerías que usa drupal (Guzzle, symfony...), y usa la field api de drupal para insertar los comentarios en las entidades, con toda la flexibilidad que permite esto.

Pasos para configurarlo

(copiado del README.txt en inglés) :

If you want to simply attach the conversation
---------------------------------------------
You'll have to add the field to the content you want in field configuration
check  "Gnusocial Comments" and uncheck "Post to GnuSocial". For every post
you'll have to manually fill the field with the conversation json url. It's your
job to get it.

To get full functionality (attach comments and post to gnusocial):
------------------------------------------------------------------
You'll need to configure both in gnusocial and drupal.
For Gnusocial part create the user that will act as bot. It will create the 
statuses anouncing your blog entries, allowing to create a conversation over.  
Go to: Settings >connections; There click on register an Oauth client applic-
ation in right sidebar (https://gnusocialurl/settings/oauthapps).

You'll have to register a new application, so fill the fields:
- Icon if you want it,
- Name: a descriptive name of the app, for example drupal_gnusocial.
- Description: Explain this application, for example: Communicates with a 
  drupal site.
- Source Url: The drupal url.
- Organization: Optionally, the name of the organization that owns the drupal 
  with gnusocial integration.
- Homepage: The homepage of the organization .
- Callback url: http://yourdrupal/admin/config/services/gnusocial.
- Type of application: Browser.
- Read-write

After that a "Consumer key" and "Consumer secret" will be provided. Copy these
in a text editor. Don't close the gnusocial tab (session) yet.

We'll go to your drupal instance, there configure in: configuration > services >
gnusocial. It will do a 3-legged authentication against the provided gnusocial
url, so add the base url of gnusocial ( https://yourgnusocial.url.com ), OAuth
consumer key, the "Consumer secret" and click save. After saving, click "update
tokens", it will redirect to gnusocial url to complete the authentication,
allowing the application to interact with gnusocial, after that it will redirect
to drupal and the process will be completed.

Developer info:
---------------
You can use templates to theme the comments:
- field: You can use the field template as gnusocial comments is a field.
- gnusocial-conversation.html.twig will be the container of each conversation 
  (between field wrapper and each status). It has the statuses list, the more 
  link, and the conversation link.
- gnusocial-status.html.twig will be the template used to render each status.

Add new comment

The content of this field is kept private and will not be shown publicly.

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.