2015-05-25 18:01:29 +02:00
|
|
|
# friendica-comment #
|
2015-05-25 17:50:36 +02:00
|
|
|
|
|
|
|
Script shows comments from your friendica server in your (static website) blog. Possible replacement for disqus.
|
|
|
|
|
2015-06-01 20:36:26 +02:00
|
|
|
![screenshot](screenshot.png)
|
|
|
|
|
|
|
|
|
2015-05-25 18:01:29 +02:00
|
|
|
# Requirements #
|
2015-05-25 17:50:36 +02:00
|
|
|
|
2015-05-25 18:01:29 +02:00
|
|
|
## CORS ##
|
2015-05-25 17:50:36 +02:00
|
|
|
[CORS] (http://enable-cors.org) (Cross Site Scripting) must be activated:
|
|
|
|
in .htaccess:
|
2015-05-25 18:01:29 +02:00
|
|
|
|
2015-05-25 17:50:36 +02:00
|
|
|
Header add Access-Control-Allow-Origin "*"
|
2015-05-25 18:01:29 +02:00
|
|
|
|
2015-05-25 17:50:36 +02:00
|
|
|
Header add Access-Control-Allow-Methods: "GET"
|
|
|
|
|
|
|
|
In apache module headers must be activated:
|
2015-05-25 18:01:29 +02:00
|
|
|
|
2015-05-25 17:50:36 +02:00
|
|
|
a2enmod headers
|
|
|
|
|
2015-05-25 18:01:29 +02:00
|
|
|
## Friendica ##
|
2015-05-25 17:50:36 +02:00
|
|
|
|
|
|
|
RSS of your blog must be in your contacts and configured as 'remote_self' (articles are shown in your public friendica timeline).
|
|
|
|
|
2015-05-25 18:01:29 +02:00
|
|
|
## Blog ##
|
2015-05-25 17:50:36 +02:00
|
|
|
In blog html:
|
|
|
|
|
|
|
|
friendica_domain must be set
|
2015-05-25 18:10:32 +02:00
|
|
|
```html
|
|
|
|
<script type="text/javascript"><!--
|
|
|
|
var friendica_domain = "http://friendica_instance.com"
|
|
|
|
//--></script>
|
|
|
|
```
|
2015-05-25 18:01:29 +02:00
|
|
|
Name of the blog entry is in
|
2015-05-25 18:10:32 +02:00
|
|
|
```html
|
2015-05-25 18:01:29 +02:00
|
|
|
<article><h1> article </h1></article>
|
2015-05-25 18:10:32 +02:00
|
|
|
```
|
2015-05-25 17:50:36 +02:00
|
|
|
|
2015-05-25 18:10:32 +02:00
|
|
|
Placeholder for comments:
|
|
|
|
```html
|
|
|
|
<div id ="comments"></div>
|
|
|
|
```
|
2015-05-25 17:50:36 +02:00
|
|
|
|