Перейти к публикации
View in the app

A better way to browse. Learn more.

Дизайн и модификация 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.

API создание сообщения в теме

Опубликовано:

единственное что нашел это

 

<?php
       if (!defined('IPB3_ROOT')) {
           define('IPB3_ROOT', '/home/admin/domains//public_html');
       }

       define('IPB_THIS_SCRIPT', 'public');
       define('IPS_PUBLIC_SCRIPT', 'index.php');
       define('IPS_ENFORCE_ACCESS', true);

       require_once IPB3_ROOT.'/initdata.php';
       require_once IPS_ROOT_PATH.'sources/base/ipsRegistry.php';
       require_once IPS_ROOT_PATH.'sources/base/ipsController.php';

       ipsRegistry::init();

$classToLoad			= IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php', 'classPost', 'forums' );
$classToLoad			= IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' );
$this->post				= new $classToLoad($this->registry);

try
{
$this->post->setBypassPermissionCheck( true );
$this->post->setIsAjax( true );
$this->post->setPublished( true );
$this->post->setTopicID( 123 );
$this->post->setForumID( 2 );
$this->post->setForumData( $this->registry->class_forums->getForumById( 2 ) );
$this->post->setAuthor( IPSMember::load( 1 ) );
$this->post->setPostContentPreFormatted( "This is the already formatted post" );
$this->post->setSettings( array( 'enableSignature' => 1,
						   'enableEmoticons' => 1,
						   'post_htmlstatus' => 0 ) );

if( $this->post->addReply() === false )
{
	print_r( $this->post->getPostError() );

	return false;
}

$post	= $this->post->getPostData();
}
catch( Exception $e )
{
print $e->getMessage();

return false;
}
?>

 

 

но оно не работает выдает ошибку Fatal error: Using $this when not in object context in /home/admin/domains//public_html/444.php on line 22

Изменено пользователем voodu191

Рекомендованные сообщения

Опубликовано:
  • Автор

по ссылке создание темы, а мне нужно сообщение в теме. Вот в чем дело

Опубликовано:

По ссылке еще говорится о некоем методе addReply того же класса, с ссылкой на документацию.

Очевидно нужно заменить addTopic на addReply, добавить ид темы setTopicID() и убрать ненужный setTopicTitle. В итоге получится http://ipbskins.ru/forum/topic8466.html#entry84784

Опубликовано:
  • Автор

попробую, пасиб)

Создайте аккаунт или войдите в него для комментирования

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу.

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.