Уважаемые пользователи!
C 7 ноября 2020 года phpBB Group прекратила выпуск обновлений и завершила дальнейшее развитие phpBB версии 3.2.
С 1 августа 2024 года phpBB Group прекращает поддержку phpBB 3.2 на официальном сайте.
Сайт официальной русской поддержки phpBB Guru продолжит поддержку phpBB 3.2 до 31 декабря 2024 года.
С учетом этого, настоятельно рекомендуется обновить конференции до версии 3.3.

Upload files to forum over yandex disk

У вас есть идея для расширения функциональности phpBB? Расскажите о ней здесь!
Правила форума
Местная Конституция | Шаблон запроса | Документация (phpBB3) | Мини [FAQ] по phpBB3.1.x/3.3.x | FAQ | Как задавать вопросы | Как устанавливать расширения

Ваш вопрос может быть удален без объяснения причин, если на него есть ответы по приведённым ссылкам (а вы рискуете получить предупреждение ;) ).
Bymemor
phpBB 1.0.0
Сообщения: 7
Стаж: 4 года 3 месяца

Upload files to forum over yandex disk

Сообщение Bymemor »

I am really sorry about writing in English, but I have to.
I hope, someone will help.

I use my forum website like files category system, so I need to upload a lot of files. That's why I want upload files over https://disk.yandex.com/ . But to make it easy I want users be able to do that just by clicking "Add files"

Before phpbb I used to have other forum software where I was able to upload files to yandex disk, get link and paste it into post by just clicking "Add files" via help some codes. Developer made some changes in my forum files.

Firstly, he add file to my server named "yandex.php" below:
yandex.php
I looked at yandex.php and saw that this file all about yandex disk, there is no code spesific to my previous forum software.

After that, he made 2 changes in file named dyukle.php:
dyukle.php
dyukle.php is file that similar to plupload.php in phpbb/

Those changes were below

1) Firstly, adding code below :

Код: Выделить всё

require 'yandex.php';
2) Then, these codes:

Код: Выделить всё

echo YandexDisk::uploadFile($_FILES["yukle"]["tmp_name"], $dosya_adi);
$dosya_adresi = YandexDisk::setPublic($dosya_adi);
$dosya_adi = $file_name ; $dosya_adresi = $file_path and yukle = upload

That's it and I am sure he commented some codes that upload files directory inside server.

After these changes I was able to upload files over yandex disk to my forum.

Now I want to do same thing in phpbb. I upload yandex.php to my server. But I don't know where to add those 2 changes in plupload.php.

Please, help me complete doing this.
Аватара пользователя
rxu
phpBB Guru
phpBB Guru
Сообщения: 16313
Стаж: 17 лет 10 месяцев
Откуда: Красноярск
Благодарил (а): 533 раза
Поблагодарили: 2119 раз
Контактная информация:

Re: Upload files to forum over yandex disk

Сообщение rxu »

Hey. Could you attach yandex.php here (archived)?
Изображение
Форумъ
phpBB 1.4.4
Сообщения: 128
Стаж: 5 лет 8 месяцев
Благодарил (а): 52 раза
Поблагодарили: 2 раза

Re: Upload files to forum over yandex disk

Сообщение Форумъ »

Всем добра, коллеги, с наступающим!
Автор пропал, а жаль, очень интересует тема загрузки файлов на Яндекс диск , возможно ли сделать загрузку с автоматической вставкой ссылок, как, например, это реализовано в расширении от хостинга https://imgbb.com/ ?
Аватара пользователя
demonlibra
phpBB 2.0.2
Сообщения: 338
Стаж: 14 лет 5 месяцев
Откуда: Ростов-на-Дону
Благодарил (а): 25 раз
Поблагодарили: 40 раз
Контактная информация:

Re: Upload files to forum over yandex disk

Сообщение demonlibra »

Загрузка точно возможна через протокол WebDAV при помощи curl. В bash`е будет такой код^:

Код: Выделить всё

# PARAMETERS
dest="zzz"
yandexdisk_email='xxx@yandex.ru'		# Mail yandex.disk
yandexdisk_pass='xxx'					# Password yandex.disk
yandexdisk_dir='yyy'					# Path to save yandex.disk

# Send backup to Yandex Disk
curl -v --user $yandexdisk_email:$yandexdisk_pass -T $dest https://webdav.yandex.ru/$yandexdisk_dir
Bymemor
phpBB 1.0.0
Сообщения: 7
Стаж: 4 года 3 месяца

Re: Upload files to forum over yandex disk

Сообщение Bymemor »

rxu писал(а): 23.12.2019 5:25 Could you attach yandex.phphere (archived)
Yes, sure I can.

Here it is yandex.php : https://yadi.sk/d/DtcFroT2JiXCRg

yandex.php allow to connect my yandex application and also it is needed to connect to phpbb upload system.

But I don't know how to connect yandex.php with phpbb upload system.

It is dyukle.php: https://yadi.sk/d/s7EBoLv9rL9Sag

This is php file that is responsible for uploading files from my previous forum software.

There is connection these 2 files : echo YandexDisk::uploadFile($_FILES["yukle"]["tmp_name"], $file_name);

So, I want to make connection like this between phpbb and yandex.php. How can I do that?
Bymemor
phpBB 1.0.0
Сообщения: 7
Стаж: 4 года 3 месяца

Re: Upload files to forum over yandex disk

Сообщение Bymemor »

Форумъ писал(а): 29.12.2019 17:05 is it possible to download with automatic insertion of links
Actually, it is possible. Yandex disk gives this feature available for developers.

For example, in my previous forum software , I was clicking "upload file" button, and then immediately file was uploading to my yandex disk account and the link of this document automatically was implementing into post_message section.

But it is not possible to get direct download link of files from yandex disk. But that's not something I need
Bymemor
phpBB 1.0.0
Сообщения: 7
Стаж: 4 года 3 месяца

Re: Upload files to forum over yandex disk

Сообщение Bymemor »

demonlibra писал(а): 30.12.2019 17:21 the WebDAV protocol with curl.
I don't understand. Please, explain. Where should I add these codes? How will it be work?
Аватара пользователя
southklad
phpBB 3.1.0 RC2
Сообщения: 3232
Стаж: 12 лет 2 месяца
Благодарил (а): 797 раз
Поблагодарили: 175 раз

Re: Upload files to forum over yandex disk

Сообщение southklad »

Вот бы кто-то оформил это в расширение готовое
Изображение
Форумъ
phpBB 1.4.4
Сообщения: 128
Стаж: 5 лет 8 месяцев
Благодарил (а): 52 раза
Поблагодарили: 2 раза

Re: Upload files to forum over yandex disk

Сообщение Форумъ »

Да, сделайте, пожалуйста, расширение для загрузки файлов на ЯД, :applause :applause
Аватара пользователя
demonlibra
phpBB 2.0.2
Сообщения: 338
Стаж: 14 лет 5 месяцев
Откуда: Ростов-на-Дону
Благодарил (а): 25 раз
Поблагодарили: 40 раз
Контактная информация:

Re: Upload files to forum over yandex disk

Сообщение demonlibra »

Bymemor писал(а): 01.01.2020 14:52
demonlibra писал(а): 30.12.2019 17:21 the WebDAV protocol with curl.
I don't understand. Please, explain. Where should I add these codes? How will it be work?
I dont know how to use it with phpbb. Only want to say that it is possible.
I use this code in script to automatic backup my forum files and database.
https://yandex.com/support/disk/cli-clients.html
Bymemor
phpBB 1.0.0
Сообщения: 7
Стаж: 4 года 3 месяца

Re: Upload files to forum over yandex disk

Сообщение Bymemor »

demonlibra писал(а): 02.01.2020 0:32 I dont know how to use it with phpbb. Only want to say that it is possible.
Okay, thanks anyway.
Аватара пользователя
demonlibra
phpBB 2.0.2
Сообщения: 338
Стаж: 14 лет 5 месяцев
Откуда: Ростов-на-Дону
Благодарил (а): 25 раз
Поблагодарили: 40 раз
Контактная информация:

Re: Upload files to forum over yandex disk

Сообщение demonlibra »

Можно в настройках хостинга задать исполнение сценария с заданной периодичностью.
У меня работают следующие сценарии:
https://github.com/demonlibra/site_backup

Для восстановления базы данных пользуюсь bigdump:
https://www.ozerov.de/bigdump/
Bymemor
phpBB 1.0.0
Сообщения: 7
Стаж: 4 года 3 месяца

Re: Upload files to forum over yandex disk

Сообщение Bymemor »

But, I don't want it for backup. I just want to upload files to yandex disk and get the links of those files inserted into post directly.

It should work like that:

1) When user click upload and choose file to upload extension should send file to my yandex disk

2) After sending it should get the link and paste it into post_message

I am ready to donate extension maker and this forum website, if such kind of extension is created
Bymemor
phpBB 1.0.0
Сообщения: 7
Стаж: 4 года 3 месяца

Re: Upload files to forum over yandex disk

Сообщение Bymemor »

Boost !

I will pay developers who want to make such an extension, write me.

My email : emil.aghayev12@gmail.com or just pm here to deal.
Ответить

Вернуться в «Запросы расширений для phpBB»