Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

База данных в Pages

Featured Replies

3 минуты назад, ipb323 сказал:

Может кто сталкивался? Нужно делать импорт допустим RSS-ленты в созданную базу (не Mysql, а ту которая в Pages). 

Я через API по расписанию добавляю всякие записи на сайте, в том числе и базу данных 

  • Author
5 часов назад, accop сказал:

Я через API по расписанию добавляю всякие записи на сайте, в том числе и базу данных 

Если не сложно - можно код увидеть (добавления в базу) и как это реализовано - в виде расширения? 

5 часов назад, ipb323 сказал:

Если не сложно - можно код увидеть (добавления в базу) и как это реализовано - в виде расширения? 

//<?php

//Purchase Data
$member = $purchase->member->member_id;

//REST API URL and KEY

$communityUrl = '...';
$apiKey = '...';

//Upload File from filesystem

// REST Endpoint
$endpoint = '/downloads/files';
$curl = curl_init( $communityUrl . 'api' . $endpoint );

// File Description
$file_desc = '<p>File Description</p>';

// File name
$filename = 'test.txt';

// Path to file
$file_url = '/home/acct/public_html/' . $filename;

// Download Page Settings
$curl_post_data = array(
		'category' => 1,
        'author' => $member,
		'title' => 'REST Downloads POST',
        'description' => $file_desc,
  		'files' => array(
          	$filename => urlencode(file_get_contents($file_url))
        	),
  		'hidden' => 1,
  );

// Prepare data for cURL POST
$curl_post_data = urldecode(http_build_query($curl_post_data));

// POST Data
curl_setopt_array( $curl, array(
  	CURLOPT_RETURNTRANSFER	=> TRUE,
	CURLOPT_HTTPAUTH	=> CURLAUTH_BASIC,
	CURLOPT_USERPWD		=> "{$apiKey}:",
  	CURLOPT_POST		=> TRUE,
  	CURLOPT_POSTFIELDS  => $curl_post_data
  	
) );

// Get Response
$response = curl_exec( $curl );

// Get file info array
$download_file = json_decode($response);

return "action complete";

Просто через запуск задач CRON

  • Author

accop наконец-то, посмотрел повнимательнее. Не вижу - где именно идёт обмен с базой :) . Под базой я подразумеваю произвольные бд со своим набором полей, создаваемые в Страницах...

5 часов назад, ipb323 сказал:

accop наконец-то, посмотрел повнимательнее. Не вижу - где именно идёт обмен с базой :) . Под базой я подразумеваю произвольные бд со своим набором полей, создаваемые в Страницах...

В данном примере идёт отправка файла в загрузки, Документация по API с БД (страницами) тут: https://invisioncommunity.com/developers/rest-api?endpoint=cms/records/GETindex

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.