Code Monkey home page Code Monkey logo

opensourcewebsite-org / opensourcewebsite-org Goto Github PK

View Code? Open in Web Editor NEW
866.0 49.0 126.0 9.65 MB

OpenSourceWebsite (OSW) - Creating an Open and Democratic Online Community. We promote a free society where everyone can participate in decision-making through electronic voting and where open source guarantees data security.

Home Page: https://opensourcewebsite.org

License: MIT License

PHP 99.33% Batchfile 0.02% CSS 0.21% JavaScript 0.43% Hack 0.01%
osw open-source yii2 php opensourcewebsite php7 yii telegram-bot community social-network voting digital-future telegram hacktoberfest

opensourcewebsite-org's Introduction

Website Telegram Bot Telegram Telegram CodeTriage Helpers

License PHP Version MySQL Version Yii Framework Version

OpenSourceWebsite (OSW) - Creating an Open and Democratic Online Community

We promote a free society where everyone can participate in decision-making through electronic voting and where open source guarantees data security.

We welcome everyone who shares our mission and is ready to contribute to the development of the community - developers, activists, volunteers, employees, partners, sponsors. Join us and together we will create our future!

Welcome to our website https://opensourcewebsite.org and telegram bot https://t.me/opensourcewebsite_bot.

The repository is a part of the OpenSourceWebsite Organization. This project and everyone participating in it is governed by the Code of Conduct.

Getting Started

Contributing

This project exists thanks to all the people who contribute.

Your contributions increase your Rating in our community.

Please read through our Contribution Guidelines, Architecture Overview and Installation Instructions.

Donating

This project exists thanks to all the people who donate.

Your donations increase your Rating in our community.

Please read through our Donation Details.

Continuous Integration

Any commit pushed to a branch master gets deployed to https://opensourcewebsite.org via Git-Auto-Deploy.

Server Architecture managed by OpenSourceWebsite DevOps.

API Documentation (in development)

Please read through our API Documentation.

Feedback

Join our Telegram group, Telegram channel.

To request a new feature, submit a bug report, give us feedback, start a design discussion or have an idea to make this code better feel free to open an issue, or create a pull request.

Please send all security issues to [email protected].

Partners

This project is supported by:

DigitalOcean.com, Moqups.com.

Please send all partnership offers to [email protected].

License

This project is open source and available freely under the MIT license.

opensourcewebsite-org's People

Contributors

alisharafat123 avatar bakteriachan avatar blog-kopilka avatar chozaf avatar dimabeldii avatar dnlsu avatar egorrishe avatar grandmotivator avatar grytsenkoandrey avatar guzich avatar henonoah avatar komalkedia avatar kronos1390 avatar laker-ls avatar mader12 avatar makc2032 avatar mariohuq avatar nolinkspl avatar ohdaddyplease avatar pamaxa-s3 avatar rolmonk avatar sagifire avatar smriad avatar stsmolyanko avatar tzheldibayev avatar vadiwalker avatar wintersakuraa avatar wiperawa avatar zetamen avatar zubosem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensourcewebsite-org's Issues

Small changes

Account

  1. Add to the bottom of the page, called Profile. Inside the block one value Name. Name may be empty. On the right, the block has an edit button. Editing mode on a separate page, have only one field “Name (optional)”, its string(255 chars).

Moqups

  1. remove “delete” and “edit” buttons from moqup list
  2. open moqup view in same browser tab
  3. instead of user e-mails, show their Names, and if there is no Name, then show user ID

Issues

  1. remove ID with a link, instead add an edit button if the creator is looking. in the same way made viewing moqups
    screen shot 2018-11-17 at 11 50 10

  2. remove “delete” and “edit” buttons from issues list

Login for users with unconfirmed emails

When trying to enter the system for users with unconfirmed email addresses, show in the authorization form a notification (error) indicating that it is necessary to confirm the email address.

Support groups

Users. Statistics

Add independent tabs to the Users page with separate pages on which to display statistics on users (the number of users for different parameters).

Tabs:
Age (years)
Year of birth
Gender
Sexuality
Currency
Interface language
Languages and Levels
Citizenship


Добавить на страницу Users независимые вкладки с отдельными страницами, на которых вывести статистику по пользователям (количество пользователей по разным параметрам).

Вкладки:
Age (years)
Year of birth
Gender
Sexuality
Currency
Interface language
Languages and Levels
Количество языков у одного пользователя
Citizenship
Количество гражданств у одного пользователя

Moqups

  • html for moqups page

  • In the left menu, delete the Moqup preview and Moqup edit pages after they are used on the Moqups page. On the Moqups page, the All and Your tabs should be made to separate pages. | В левом меню удалить страницы Moqup preview и Moqup edit после того как они будут использованы на странице Moqups. На странице Moqups - вкладки All и Your должны быть сделаны отдельными страницами.

  • In the database, create the Setting table. This table stores dynamic site parameters. Add two parameters to it: 1. the total maximum number of html and css entries allowed for one rating unit per user. empty css entries are not considered. the default is 20 entries for one rating. 2. The total size in bytes of all html and css entries for one rating unit per user. the default is 1mb. | В базе данных создать таблицу Setting. В этой таблице хранятся динамические параметры сайта. Добавить в нее два параметра: 1. общее максимальное количество записей html и css разрешенных для одной единицы рейтинга одного пользователя. пустые записи css не считаются. по умолчанию 20 записей для одного рейтинга. 2. общий размер в байтах всех записей html и css для одной единицы рейтинга одного пользователя. по умолчанию 1mb.

  • In editing / creating Moqup. The html field is required, the css field is optional. The maximum size of each field is 100,000 characters. Cut JS code and connect JS scripts. css is stored separately from html, since in the future one html record can have several css entries. | В редактировании/создании Moqup. Поле html обязательное, поле css необязательное. Максимальный размер каждого поля 100000 символов. Вырезать JS код и подключение JS скриптов. css хранить отдельно от html, так как в будущем у одной html записи может быть несколько css записей.

  • In the Moqups list - all entries are available to other users. | В просмотре записей Moqups - все записи доступны другим пользователям.

Changes for Setting page

https://opensourcewebsite.org/data/setting

rename "moqup_entries_limit" to "moqup quantity value per one rating"

remove "moqup_bytes_limit" and all code where it is used
screen shot 2018-11-19 at 22 06 20

add "issue quantity value per one rating", it works the same as for moqups, and there should also be an information explanation on the Issues page on the tab yours. default is 3

add "moqup html field max value", default is 100000. add "moqup css field max value", default is 10000. use this to validate fields

add "issue text field max value", default is 10000. use this to validate the field

add "website setting min vote percent to apply change", default is 70

Comments for Moqups and Issues

Add comments block to Moqup View and Issue View pages.

Moqup - https://opensourcewebsite.org/moqup/design-view?id=36

  • At the first level of comments - the user can post only one comment per issue or moqup. For the user, his comment is always shown first. If the user has written a comment, the user will no longer have access to the form for adding a comment until he deletes the comment.
    • At the second level of comments (replies) - the user can leave any number of comments.
  • View replies or SHOW MORE REPLIES - should work like on YouTube (when clicking load up to 20 records without reloading the page).

Saving multiple languages in support group editing does not work

https://opensourcewebsite.org/support-groups

Try to create or edit some kind of support group.

After updating yii2 from 2.0.16 to 2.0.30, an error is shown when creating or editing a support group if you select several languages. It is possible to replace this choice of languages with a dropdown with multiple choice (kartik-v / yii2-widget-select2).

--

Попробуйте создать или отредактировать какую нибудь группу.

После обновление yii2 с 2.0.16 до 2.0.30, показывается ошибка при создании или редактировании support group, если выбрать несколько языков. Возможно заменить такой выбор языков на дропдаун с множественным выбором (kartik-v/yii2-widget-select2).

--

Screenshot 2020-01-05 at 18 25 39

Website settings

  • https://opensourcewebsite.org/data/setting - relocate this page to https://opensourcewebsite.org/website-settings and place it in the left menu under item Ussues

  • https://opensourcewebsite.org/moqup/design-view?id=39, use this design for the page. entries are sorted into pages by "Last update" column, from new to old. in the "Value" column shows the current value of the variable.

  • https://opensourcewebsite.org/moqup/design-view?id=41, The current value of the variable is always shown first and has a crown icon.

    • Entries are sorted by decreasing votes (from a larger number to a smaller one) and then from old to new (that is, if the entries have the same number of votes, they are derived from old to new).
    • By default, all votes of new users are considered the current value of a variable in the system and when the current user sees this page and has not voted before, his vote is shown as the current value of the variable. User can vote for any value. The user can create a new unique value of the variable, and then his voice will be determined for this value of the variable. The user can change his voice at any time. If the proposed value of the variable does not have a single voice of users, then this value is removed from the list automatically. For each variable in the code, the minimum and maximum values must be defined in order for validation to work correctly when the variable is created. And this integer or fractional must also be defined.
    • website_setting_min_vote_percent_to_apply_change - using this parameter, if a sentence the value of any variable gains the required percentage of votes, then that value automatically becomes the current one.
    • when the user presses a Vote button, confirmation should be requested as it is done in Issues.

Users

  • make new page Users in left menu only for authorised users. on the page display the number of registered users with a confirmed email.

yii\base\ErrorException: Trying to get property 'key' of non-object in /www/opensourcewebsite.org/htdocs/views/setting/setting-values.php:9

https://opensourcewebsite.org/setting/values?id=100000

[error][yii\base\ErrorException:8]
yii\base\ErrorException: Trying to get property 'key' of non-object in
/www/opensourcewebsite.org/htdocs/views/setting/setting-values.php:9
Stack trace:
#0
/www/opensourcewebsite.org/htdocs/views/setting/setting-values.php(9):
yii\base\ErrorHandler->handleError(8, 'Trying to get p...',
'/www/opensource...', 9, Array)
#1
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/View.php(348):
require('/www/opensource...')
#2
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/View.php(257):
yii\base\View->renderPhpFile('/www/opensource...', Array)
#3
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/View.php(156):
yii\base\View->renderFile('/www/opensource...', Array,
Object(app\controllers\SettingController))
#4
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Controller.php(384):
yii\base\View->render('setting-values', Array,
Object(app\controllers\SettingController))
#5
/www/opensourcewebsite.org/htdocs/controllers/SettingController.php(80):
yii\base\Controller->render('setting-values', Array)
#6 [internal function]:
app\controllers\SettingController->actionValues('100000')
#7
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/InlineAction.php(57):
call_user_func_array(Array, Array)
#8
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Controller.php(157):
yii\base\InlineAction->runWithParams(Array)
#9
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Module.php(528):
yii\base\Controller->runAction('values', Array)
#10
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/web/Application.php(103):
yii\base\Module->runAction('setting/values', Array)
#11
/www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Application.php(386):
yii\web\Application->handleRequest(Object(yii\web\Request))
#12 /www/opensourcewebsite.org/htdocs/web/index.php(21):
yii\base\Application->run()
#13 {main}

Moqups bugs and features

  • Add "Edit" and "Delete" buttons to yours moqups on the Moqups list page in "All" and "Stared" tabs, like on "Yours" tab.

  • Add "Edit" button in Moqup view mode when it's a yours one.

  • In Moqup view mode, "Css" tab must be renamed to "CSS" (capitals). These css styles doesn't apply to preview block, in view mode. In edit mode "CSS" styles applying to preview block correctly,

  • In edit mode of Moqup, js (from AdminLTE/Bootstrap) doesn't work (example: modals doesn't open). In view mode js works fine.

Wikinews

Add a new section for an authorized user. In the left menu - Wikinews pages.

This page shows the records that are in the database in table "wikinews_pages". Only those entries that have a field "pageid".

Use pagination. On the page table with columns: Lang, Title. The title of the records displays a link to the wikinews page.

Right above the table is the "+" button, which causes the modal. Modal is called "Add Wikinews page". Modal contains field "Wikinews page url". Buttons: Save, Cancel.

The proposed url must be valid: do not contain a colon in title, have correct lang and title.

If the url is valid, then you need to save a unique entry in the table. If the table already has such an entry, then it needs to clear the field "parsed_at" (=NULL).

Please check this invalid urs in your website local copy:
https://00.wikinews.org/wiki/Test
https://en.wikinews.org/Test
https://en.wikinews.com/wiki/Test
https://en.wikinews.org/wiki/Test:test

--

Добавить новый раздел для авторизованного пользователя. В левом меню - Wikinews pages.

На этой странице показываются записи которые есть в базе в таблице "wikinews_pages". Только те записи у которых заполнено поле "pageid".

Используйте пагинацию. На странице таблица с колонками: Lang, Title. В title записей выводится ссылка на страницу сайта wikinews.

Справа над таблицей кнопка +, которая вызывает модалку. Модалка называется "Add Wikinews page". Модалка содержит поле "Wikinews page url". Кнопки: Save, Cancel.

Предлагаемый адрес должен быть валидным: не содержать двоеточие в title, иметь корректные lang и title.

Если адрес валиден то нужно сохранить уникальную запись в таблицу. Если в таблице уже есть такая запись, то у нее надо очистить поле "parsed_at" (=NULL).

Telegram Bot. Исправить расчет рейтинга и ранга пользователя

Переписать функцию которая рассчитывает рейтинг и ранг пользователя. Сейчас в боте ранг пользователя рассчитывается неправильно в каких то случаях. Правильно так: сортировать всех подтвержденных пользователей по величине рейтинга, сперва те у кого самый большой рейтинг, затем среди пользователей с одинаковым рейтингом, брать сперва пользователя с более старой датой регистрации. Самый высокий ранг = 1. Ранг всегда уникален, это сортировка пользователей в качестве приоритета по обслуживанию в разных разделах бота и сайта.

Bug. Wikipedia watchlists - Missing pages

Missing pages are such pages for which the user is not watched but which are related in different wikipedia languages, and the user subscribes to at least one page in any of the languages.

Have a bug with not correct missing pages. in the missing pages are listed all pages with categories, for all these pages I have watched. I have only 62 links in my missing pages, and rating 0 for them.

image_from_ios-2

For example. I watched this category, its cant be in missing pages.

image_from_ios-1

But I have same links in Your pages.

screen shot 2018-12-03 at 14 36 57

Small changes for issue votes

screen shot 2018-11-23 at 12 48 05

  • remove the neutral vote, remove the tab with a neutral vote

  • issues. Now there will be a count of only the green area on the left and the red on the right, between them you need to output a gray area without percents. in the green and red zones, you need to round off percentages to integer values, but you do not need to output 0.

  • if the issue has any votes of users other than the creator, then the creators no longer have access to editing or deleting the issue, in which case it’s for the creator not to show the edit and delete buttons.

Data models

  • in the left menu for authorized users show section Data models
  • inside the section put links (Countries, Currencies, Languages, Settings) with viewing data for such table in the database. tables with pagination for 20 entries.

Подтверждение электронной почты

После получения письма для подтверждения аккаунта (электронной почты) и нажатия на ссылку для перехода, подтверждения электронной почты не происходит (не засчитывается).

Telegram Bot. Currency Exchange service.

There is already a ready-made functionality for the web version at /currency-exchange-order in the Currency Exchange section, which is available after login.

Duplicate this functionality in our telegram bot, as it is approximately done for the service Jobs (Vacancies/Resumes).

Upgrade the code and use https://github.com/opensourcewebsite-org/opensourcewebsite-org/blob/master/modules/bot/components/crud/CrudController.php

Old task: https://docs.google.com/document/d/1V8db9AO2d4UCeX7bHE0kjF5orcaVCql_APKdyjlN7GI

We have already started doing the implementation in the bot earlier, but it is not working and is poorly designed: https://github.com/opensourcewebsite-org/opensourcewebsite-org/blob/master/modules/bot/controllers/privates/SCeController.php

Developer - Moqup - Edit/Add - Preview

  • Make Preview tab, working in frontend, without save and without use backend. Preview must show a result from current css+html code, code that is in the form.

  • for add/edit php views use single code for form, now the php code for form is duplicate.

Account. Add new fields.

Add the output of user data that are set in the telegram bot. So that the user can edit them both on the site and in the telegram bot.

In the Profile section. Each line is edited separately, and not as it is now in one form. To do this, on each line make a button for editing, by clicking on the button call the modal for editing the field.

The data:
birthday
gender
sexuality
timezone
currency

Maybe use modals https://github.com/loveorigami/yii2-modal-ajax


Добавить вывод данных пользователя которые устанавливаются в телеграм боте. Чтобы пользователь мог их редактировать и на сайте и в телеграм боте.

В раздел Profile. Каждую строку редактировать отдельно, а не как сейчас одной формой. Для этого у каждой строки сделать кнопку для редактирования, по клику на кнопку вызывать модалку для редактирования поля.

Такие данные:
birthday
gender
sexuality
timezone
currency

У пользователя есть возможность в боте выбрать множество языков которые он знает (с уровнем владения по каждому) и множество гражданств которые связаны с таблицей стран. В профиле на сайте тоже вывести эти данные, с возможностью их редактировать/добавлять и удалять. Двумя отдельными таблицами на странице.

Возможно использовать модальные окна для редактирования полей https://github.com/loveorigami/yii2-modal-ajax

Telegram Bot. Add new feature "/voteban" for groups

For example:
@banofbot
https://github.com/backmeupplz/banofbot

——

Пользователь не может отдать голос за себя. Пользователь не может активировать голосование за себя или администратора группы.

Бот должен игнорировать команду если она не написана как reply к другому сообщению. После команды может быть любой текст, бот его пока должен игнорить.

Username

  • Account

Add Username to the user's account in the Profile section.

Username field is also optional, and must be unique in the system. Permitted characters are “Only use letters, numbers and ‘ _ ’”

Now editing the profile in the account opens in a new tab - should open in the same tab.

  • Profile

If someone goes to view a user profile, then for an unauthorized users to set a referrer’s cookie (as with url /invite/) and show 403. For an authorized users when viewing a profile, redirect to a profile by nickname if it is, and show the same information in the account in the Profile section, these are ID, Name and Username. Example for public profile url: /u/12 or /u/username


  • Account

Добавить Username в Account пользователя в раздел Profile.

Username это поле тоже optional, и должно быть уникальным в системе. Разрешаются символы - “Only use letters, numbers and ‘_’”

Сейчас редактирование профиля в аккаунте открывается в новой вкладке - должно открываться в той же вкладке.

  • Profile

Если кто то переходит на просмотр профиля пользователя, то для неавторизованного ставить куки реферера (также как при /invite/)и показывать 403. Для авторизованнного при просмотре профиля по id, редиректить на профиль по никнейму если он есть, и показывать такую же информацию как в аккаунте в разделе Profile - это ID, Name и Username. Пример для урл профиля: /u/12 или /u/username

Telegram Bot. Отключить лишние баглоги для бота (400/403 errors), исправить ошибки подключения

Указанные ниже баглоги лишние и по ним не должны приходить письма на почту. Правильно обрабатывать такие кейсы, возможно игнорить. Например для сайта 400-е ошибки отключены и пишутся в файл. Таким же образом надо настроить для бота.

Текущая конфигурация для сайта: https://github.com/opensourcewebsite-org/opensourcewebsite-org/blob/master/config/web.php#L99

Примеры лишних баглогов:

[-][-][error][bot] [my_rating/update] [app\modules\bot\components\response\EditMessageTextCommand] 400 Bad Request: message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message

[-][-][error][bot] [my_language/language-list] [app\modules\bot\components\response\EditMessageTextCommand] 400 Bad Request: message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message

[-][-][error][bot] [refresh/index] [app\modules\bot\components\response\SendMessageCommand] 400 Bad Request: reply message not found

[-][-][error][bot] [system_message/index] [app\modules\bot\components\response\DeleteMessageCommand] 403 Forbidden: bot was kicked from the supergroup chat

[-][-][error][bot] [menu/index] [app\modules\bot\components\response\SendMessageCommand] 100 Continue

Иногда бот не может удалить сообщение в публичном чате:

[-][-][error][bot] [default/command-not-found] [app\modules\bot\components\response\DeleteMessageCommand] 28 Connection timed out after 5000 milliseconds

[-][-][error][bot] [default/command-not-found] [app\modules\bot\components\response\DeleteMessageCommand] 100 Continue

[-][-][error][bot] [system_message/index] [app\modules\bot\components\response\DeleteMessageCommand] 28 Operation timed out after 5001 milliseconds with 0 bytes received

[-][-][error][bot] [my-timezone/list] [app\modules\bot\components\response\EditMessageTextCommand] 400 Bad Request: message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message

Fixes for support groups "/support-groups"

  1. When the user creates a support group, you need to automatically create a "/start" command, in all languages that are connected to the support group, with the message "Welcome!". This command will automatically enable the value "Is default".

  2. Bug. When a command is created in a group with several languages, it is not possible for English to increase the height of the input field (although this works correctly for other languages).

Screenshot 2019-11-22 at 20 37 15

And for the input field in other languages there is no way to insert emojis (since this works for English)

Screenshot 2019-11-22 at 20 37 34

Telegram Bot. Fix for "timed out"

It is possible to remove unnecessary requests to Telegram Api

[-][-][error][TelegramBot\Api\HttpException] TelegramBot\Api\HttpException: Operation timed out after 0 milliseconds with 0 out of 0 bytes received in /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php:260 Stack trace: #0 /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php(227): TelegramBot\Api\BotApi->executeCurl(Array) #1 /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php(1555): TelegramBot\Api\BotApi->call('getChatMember', Array) #2 /www/opensourcewebsite.org/htdocs/modules/bot/Module.php(178): TelegramBot\Api\BotApi->getChatMember(-REMOVED, REMOVED) #3 /www/opensourcewebsite.org/htdocs/modules/bot/Module.php(80): app\modules\bot\Module->initialize(Object(TelegramBot\Api\Types\Update), 1) #4 /www/opensourcewebsite.org/htdocs/modules/bot/WebHookAction.php(26): app\modules\bot\Module->handleInput('{"update_id":28...', 'REMOVED') #5 [internal function]: app\modules\bot\WebHookAction->run('REMOVED') #6 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array) #7 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\Action->runWithParams(Array) #8 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('telegram-bot', Array) #9 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('webhook/telegra...', Array) #10 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request)) #11 /www/opensourcewebsite.org/htdocs/web/index.php(21): yii\base\Application->run() #12 {main}

[-][-][error][TelegramBot\Api\HttpException] TelegramBot\Api\HttpException: Connection timed out after 5000 milliseconds in /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php:260 Stack trace: #0 /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php(227): TelegramBot\Api\BotApi->executeCurl(Array) #1 /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php(1555): TelegramBot\Api\BotApi->call('getChatMember', Array) #2 /www/opensourcewebsite.org/htdocs/modules/bot/Module.php(178): TelegramBot\Api\BotApi->getChatMember(-REMOVED, REMOVED) #3 /www/opensourcewebsite.org/htdocs/modules/bot/Module.php(80): app\modules\bot\Module->initialize(Object(TelegramBot\Api\Types\Update), 1) #4 /www/opensourcewebsite.org/htdocs/modules/bot/WebHookAction.php(26): app\modules\bot\Module->handleInput('{"update_id":28...', 'REMOVED') #5 [internal function]: app\modules\bot\WebHookAction->run('REMOVED') #6 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array) #7 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\Action->runWithParams(Array) #8 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('telegram-bot', Array) #9 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('webhook/telegra...', Array) #10 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request)) #11 /www/opensourcewebsite.org/htdocs/web/index.php(21): yii\base\Application->run() #12 {main}

[-][-][error][TelegramBot\Api\HttpException] TelegramBot\Api\HttpException: Continue in /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php:281 Stack trace: #0 /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php(258): TelegramBot\Api\BotApi::curlValidate(Resource id #8, false) #1 /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php(227): TelegramBot\Api\BotApi->executeCurl(Array) #2 /www/opensourcewebsite.org/htdocs/vendor/telegram-bot/api/src/BotApi.php(1555): TelegramBot\Api\BotApi->call('getChatMember', Array) #3 /www/opensourcewebsite.org/htdocs/modules/bot/Module.php(178): TelegramBot\Api\BotApi->getChatMember(-REMOVED, REMOVED) #4 /www/opensourcewebsite.org/htdocs/modules/bot/Module.php(80): app\modules\bot\Module->initialize(Object(TelegramBot\Api\Types\Update), 1) #5 /www/opensourcewebsite.org/htdocs/modules/bot/WebHookAction.php(26): app\modules\bot\Module->handleInput('{"update_id":28...', 'REMOVED') #6 [internal function]: app\modules\bot\WebHookAction->run('REMOVED') #7 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array) #8 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\Action->runWithParams(Array) #9 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('telegram-bot', Array) #10 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('webhook/telegra...', Array) #11 /www/opensourcewebsite.org/htdocs/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request)) #12 /www/opensourcewebsite.org/htdocs/web/index.php(21): yii\base\Application->run() #13 {main}

Add language selector to a main layout

In the user's account there is a choice of language for the site. Add the same choice for the language on the main page of the site when the user is unauthorized.

--

В кабинете пользователя есть выбор языка для сайта. Добавьте такой же выбор для языка на главной странице сайта когда пользователь неавторизован.

13E2EE4A-2258-4488-90D2-E1DEA0EA9911
29B49C9F-9985-491A-B134-B9A6633F0BD6

Contact book with vcard and phone synchronization using CardDAV

  1. Use CardDAV to import/export contacts from phones.

  2. To connect phones, in the phone settings you need to specify a domain, for example
    https://opensourcewebsite.org/carddav

  3. To connect phones, in the phone settings you need to specify a username and password. Username is the user's email address. The password must be separate and do not match the user's password on the site. This password will be used only for CardDAV.

  4. The user on the site selects which contacts to synchronize with the phone.

View ready-made import solutions for yii2, for example:
https://www.yiiframework.com/wiki/488/implementing-a-webdav-server-using-sabredav

Setup for iOS:
https://support.soverin.net/hc/en-us/articles/115004810753-How-to-set-up-CalDAV-or-CardDAV-on-iPhone-or-iPad

Examples of servers:
https://webnote.satin-pl.com/2017/12/13/CardDav_CalDav_server/
https://helpdesk.bitrix24.ru/open/6800919/
https://habr.com/post/212621/

About data formats:
https://en.m.wikipedia.org/wiki/VCard
https://devguide.calconnect.org/vCard/vcard-4/
https://en.m.wikipedia.org/wiki/CardDAV
https://en.m.wikipedia.org/wiki/WebDAV
https://tools.ietf.org/html/rfc6350
https://tools.ietf.org/html/rfc6351
https://tools.ietf.org/html/rfc6868
https://github.com/search?q=php+vcard

DB:
https://ondras.zarovi.cz/sql/demo/?keyword=osw_vcard

Sources:
https://github.com/sabre-io/dav
https://github.com/search?l=PHP&q=carddav&type=Repositories


Русская версия:

https://docs.google.com/document/d/19J8SthT3ODjGCLNV7xDtteMNc045Z-kPT_FIFoItPus/

User rating db table

Create a table in the database with transactions to increase or decrease the rating of users. Add the balance value in each transaction after each transaction, so that the most recent transaction has the current user rating. remove the rating field from the user table. when confirm a email for a new user, add a transaction with +1 rating and type = 1 to him. add migration "upgrade" in which to create registration transactions for all existing users (with confirm email).

types of transactions:
1 - register and confirm email
2 - team
3 - donate
in the future there will be other types

In the user account, show the user rating from the new table in the database. Show how much is the total rating in the system. Show the percentage of user rating relative to the overall rating of the system. Show "ranked" and count of users with confirm email like a screenshot (https://www.yiiframework.com/user/2)

screen shot 2018-10-04 at 11 44 27

Telegram Bot. Добавить часовой пояс в профиль.

Выбор часового пояса должен быть со стандартной пагинацией которая используется для других экранов бота.

По умолчанию у каждого пользователя установлен часовой пояс в UTC+0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.