An open API service indexing awesome lists of open source software.

https://github.com/web-padawan/ng_guestbook

guestbook plugin for NG CMS
https://github.com/web-padawan/ng_guestbook

Last synced: about 2 months ago
JSON representation

guestbook plugin for NG CMS

Awesome Lists containing this project

README

          

# =========================================================================== #
# NG CMS // ������� // guestbook #
# =========================================================================== #

������ ��������� ������������ �� ����� �������� �����.

��� ��������� ������� ���������� �������� �������� �������: /plugin/guestbook/

��������� �������
=====================

[TWIG] guestbook.list.tpl
------------------------------------------------
������ ������������ ��� ������ ������ ������� �������� ����� � ����� ���������� ������.

������ ����������:

* entries - ������, ���������� ������ �������� �����:
* id - ID ������
* comnum - ���������� ����� ������
* date - ���� ���������� ������ (� �������, ��������� � ���������� �������)
* message - ����� ������
* answer - ����� ��������������
* author - ����� ������ ������, ���� guest (�����)
* ip - ip-����� ������ ������
* edit - ������ �� �������������� ������ (��� ��������������)
* del - ������ �� �������� ������ (��� ��������������)
* fields - ������ � ������������ ������� ���. ����� ������ (���� - id ����):
* id - id ����
* name - �������� ����
* value - �������� ����
* social - ������ � ������� �������� (���� - ��������: Vkontakte, Facebook, Google, Instagram):
* link - ������ �� ������� ������������
* photo - ������ �� ������ ������������

* fields - ������ ���� ���. ����� �������� ����� (���� - id ����):
* id - id ����,
* name - �������� ����;
* placeholder - ����������� ����;
* default_value - �������� ���� �� ���������;
* required - �������� �� ���� ������������;

* total_count - ����� ���������� ������� � �������� �����
* perpage - ���������� �������, ������������ �� ����� ��������
* errors - ��������� �� �������
* success - ��������� �� �������� ���������
* smilies - ������
* bbcodes - BB-����
* ip - ip-����� ������������ (������������ ��� ���������� ������)
* use_captcha - true, ���� ����� ��������
* use_guests - true, ���� ��������� ��������� ������ ��� ����� �� ����
* pages - ������ ������������ ���������

[TWIG] guestbook.edit.tpl
------------------------------------------------
������ ������������ ��� �������������� ������ ��� ����� � �������.
������������� ��������� ����������� - � ���������, ������ ������������� ������ ��������.

������ ����������:

* id - ID ������
* author - ����� ������ ������, ���� guest (�����)
* message - ����� ������
* answer - ����� ��������������
* error - ��������� �� �������
* fields - ������ ���� ���. ����� ������ (���� - id ����)
* id - id ����
* name - �������� ����
* placeholder - ����������� ����
* default_value - �������� ���� �� ���������
* required - �������� �� ���� ������������
* value - ��������, ��������� ������� ������

[TWIG] guestbook.block.tpl
------------------------------------------------
������ ������������ ��� ������ ����� ��������� ������� � main.tpl.
������ ���������� � ���������� entries, ��������� ������� ������� guestbook.list.tpl

��� ������ ����� ������������ �����������:

{{ callPlugin('guestbook.show', {'count': '2'}) }}

��� count - ����������� ���������� �������.

��������� ���
---------------------

�� ������ ������� ����������� ������ ������� �������. ��� ����� ����������:
1. �������� ��� � ���������� �������,
2. ��������� ��������� URL ��� ������� guestbook � "���������� �������� ������".

������:

guestbook edit �������������� /guestbook/edit/{id}
guestbook �������� ����� /guestbook/[{page}/][{act}]

���:
- {id} ��� �������� ��������������: ID ������������� ������
- {page} ��� �������� ������ �������: ����� ��������
- {act} ��� �������� ������ �������: ������� ��������� �������� (add = ������ ���������, upd = ������ ���������������, del = ������ �������)

��������� �������� ��������
---------------------

1. ������ ������������ �������� ��������: ���������, Facebook, Google Plus, Instagram

2. �������� ��������� ������������ ��� ���������� ������ ������ ��������������� ������ � ������ �����������

3. ����� ���������� ������ ����� ������������ �������� �� ���������� ���� � ������ �� ������� ������������

����������� ����������
---------------------

��� ������ ���������� ���� ����� �������� �������������� ����������, � ����� ������� � ���������� ���������� Client ID � Client Secret

���������:

- ������������ � ���� �������
- ������� �� ������: http://vk.com/editapp?act=create
- ������� �������� ���������� (�� �������), ����� �����, ��� ���������� - �������
- ������ ���-�������������
- �������� � ����������� Client ID � Client Secret

Facebook:

- ������������ � ���� �������
- ������� �� ������: https://developers.facebook.com/apps
- ������ "Add new app" � �� ����������� ���� ������ ����� Advanced setup
- ������� ��� (�� �������), ��������� - �������
- � ����� ���� ������� Settings � ��������� ���� Contact Email
- ��������� �� �������� Settings, ������ Add Platform, ������� Website, ������� ����� ������ �����
- � ����� ���� ������� App Details, ������� User Support Email
- � ����� ���� ������� Status & Review, ��������� ������� "Make this app available to the general public"
- � ����� ���� ������� Dashboard
- �������� � ����������� Client ID � Client Secret

Google:

- ������������ � ���� �������
- ������� �� ������: https://console.developers.google.com/project
- ������ Create new project, ��� ������� �� �������
- ��������� ��������� �� �������� �������� �������
- ������ Enable & manage API's
- ������ Google+ API, �� ����������� �������� ������ Enable API
- � ����� ���� ������� Credentials ����� ������� OAuth consent screen
- ������� �������� (�� �������), ��������� ���������
- �������� ���� � ������� Create new credentials - ������ � ������� OAuth CLient ID
- ������� ���: Web application, �������� ������� �� �������
- � ���� Authorized redirect URIs �������: http://example.com/engine/plugins/guestbook/lib/hybridauth/?hauth.done=Google
- � ��������� ������ ����� �� ���� - �������������� ������������� ������ � www
- �������� � ����������� Client ID � Client Secret

Instagram:

- ������������ � ���� �������
- ������� �� ������: https://instagram.com/developer/clients/manage/
- ������ Register new client
- ������� �������� � �������� (�� �������), ����� �����, Privacy policy URL, Contact Email
- � ���� Valid redirect URI �������: http://example.com/engine/plugins/guestbook/lib/hybridauth/?hauth.done=Instagram
- � ��������� ������ ����� �� ���� - �������������� ������������� ������ � www
- �������� � ����������� Client ID � Client Secret
- ��� ����, ����� ����� �� ������ ��������� (Sandbox Mode) - ������ Permissions � ��������� ���������� �� ������������ (Submit for review)