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

Vk Repost API - Постинг на стену в группу вконтакте

Здесь авторы могут постить бета-версии своих модификаций для phpBB 3.0.x. Внимание! Не устанавливайте бета-версии модов на работающие форумы!
Правила форума
Местная Конституция | Шаблон запроса | Документация (phpBB3) | Переход на 3.0.6 и выше | FAQ-3 (phpbb3) | Как задавать вопросы | Как устанавливать моды

Ваш вопрос может быть удален без объяснения причин, если на него есть ответы по приведённым ссылкам (а вы рискуете получить предупреждение ;) ).
Anvar
Former team member
Сообщения: 1965
Стаж: 14 лет
Благодарил (а): 67 раз
Поблагодарили: 799 раз
Контактная информация:

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение Anvar »

holpa, Токен необходимо скопировать в ссылке после access_token= и до & , затем вставить в поле, а не полностью ссылку как на скрине.
Вконтакте не даёт других возможностей, только избранным.
Не пишите вопросы лично, если можете задать их на форуме!
Спецзаказы не интересуют!
holpa
phpBB 1.2.0
Сообщения: 11
Стаж: 9 лет 4 месяца

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение holpa »

В каком смысле избранным?
Сделал так как ты сказал, пока тоже самое.
Anvar
Former team member
Сообщения: 1965
Стаж: 14 лет
Благодарил (а): 67 раз
Поблагодарили: 799 раз
Контактная информация:

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение Anvar »

igorbond, Что-то не так установил наверное.

functions_posting.php содержимое 2824 и 2899 строки напиши.
holpa
phpBB 1.2.0
Сообщения: 11
Стаж: 9 лет 4 месяца

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение holpa »

их нет. последняя 2825
Аватара пользователя
southklad
phpBB 3.1.0 RC2
Сообщения: 3232
Стаж: 12 лет 2 месяца
Благодарил (а): 797 раз
Поблагодарили: 175 раз

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение southklad »

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

$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
						$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
						$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
						$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
						$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
						$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
					}
					else
					{
						// just our luck, the last topic in the forum has just been turned unapproved...
						$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0';
						$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''";
						$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0';
						$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0';
						$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''";
						$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''";
					}
				}
			}
		}
	}
	else if ($make_global)
	{
		// somebody decided to be a party pooper, we must recalculate the whole shebang (maybe)
		$sql = 'SELECT forum_last_post_id
			FROM ' . FORUMS_TABLE . '
			WHERE forum_id = ' . (int) $data['forum_id'];
		$result = $db->sql_query($sql);
		$forum_row = $db->sql_fetchrow($result);
		$db->sql_freeresult($result);

		// we made a topic global, go get new data
		if ($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL && $forum_row['forum_last_post_id'] == $topic_row['topic_last_post_id'])
		{
			// we need a fresh change of socks, everything has become invalidated
			$sql = 'SELECT MAX(topic_last_post_id) as last_post_id
				FROM ' . TOPICS_TABLE . '
				WHERE forum_id = ' . (int) $data['forum_id'] . '
					AND topic_approved = 1';
			$result = $db->sql_query($sql);
			$row = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);

			// any posts left in this forum?
			if (!empty($row['last_post_id']))
			{
				$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
					FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
					WHERE p.poster_id = u.user_id
						AND p.post_id = ' . (int) $row['last_post_id'];
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

				// salvation, a post is found! jam it into the forums table
				$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
				$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
				$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
				$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
				$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
				$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
			}
			else
			{
				// just our luck, the last topic in the forum has just been globalized...
				$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0';
				$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''";
				$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0';
				$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0';
				$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''";
				$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''";
			}
		}
		else if ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL && $forum_row['forum_last_post_id'] < $topic_row['topic_last_post_id'])
		{
			// this post has a higher id, it is newer
			$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
				FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
				WHERE p.poster_id = u.user_id
					AND p.post_id = ' . (int) $topic_row['topic_last_post_id'];
			$result = $db->sql_query($sql);
			$row = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);

			// salvation, a post is found! jam it into the forums table
			$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
			$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
			$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
			$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
			$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
			$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
		}
	}

	// topic sync time!
	// simply, we update if it is a reply or the last post is edited
	if ($post_approved)
	{
		// reply requires the whole thing
		if ($post_mode == 'reply')
		{
			$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $data['post_id'];
			$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $user->data['user_id'];
			$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
			$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . (($user->data['user_id'] != ANONYMOUS) ? $db->sql_escape($user->data['user_colour']) : '') . "'";
			$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
			$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $current_time;
		}
		else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
		{
			// only the subject can be changed from edit
			$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";

			// Maybe not only the subject, but also changing anonymous usernames. ;)
			if ($data['poster_id'] == ANONYMOUS)
			{
				$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape($username) . "'";
			}
		}
	}
	else if (!$data['post_approved'] && ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies'])))
	{
		// like having the rug pulled from under us
		$sql = 'SELECT MAX(post_id) as last_post_id
			FROM ' . POSTS_TABLE . '
			WHERE topic_id = ' . (int) $data['topic_id'] . '
				AND post_approved = 1';
		$result = $db->sql_query($sql);
		$row = $db->sql_fetchrow($result);
		$db->sql_freeresult($result);

		// any posts left in this forum?
		if (!empty($row['last_post_id']))
		{
			$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
				FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
				WHERE p.poster_id = u.user_id
					AND p.post_id = ' . (int) $row['last_post_id'];
			$result = $db->sql_query($sql);
			$row = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);

			// salvation, a post is found! jam it into the topics table
			$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $row['post_id'];
			$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
			$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $row['post_time'];
			$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $row['poster_id'];
			$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
			$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
		}
	}

	// Update total post count, do not consider moderated posts/topics
	if ($post_approval)
	{
		if ($post_mode == 'post')
		{
			set_config_count('num_topics', 1, true);
			set_config_count('num_posts', 1, true);
		}

		if ($post_mode == 'reply')
		{
			set_config_count('num_posts', 1, true);
		}
	}

	// Update forum stats
	$where_sql = array(POSTS_TABLE => 'post_id = ' . $data['post_id'], TOPICS_TABLE => 'topic_id = ' . $data['topic_id'], FORUMS_TABLE => 'forum_id = ' . $data['forum_id'], USERS_TABLE => 'user_id = ' . $poster_id);

	foreach ($sql_data as $table => $update_ary)
	{
		if (isset($update_ary['stat']) && implode('', $update_ary['stat']))
		{
			$sql = "UPDATE $table SET " . implode(', ', $update_ary['stat']) . ' WHERE ' . $where_sql[$table];
			$db->sql_query($sql);
		}
	}

	// Delete topic shadows (if any exist). We do not need a shadow topic for an global announcement
	if ($make_global)
	{
		$sql = 'DELETE FROM ' . TOPICS_TABLE . '
			WHERE topic_moved_id = ' . $data['topic_id'];
		$db->sql_query($sql);
	}

	// Committing the transaction before updating search index
	$db->sql_transaction('commit');

	// Delete draft if post was loaded...
	$draft_id = request_var('draft_loaded', 0);
	if ($draft_id)
	{
		$sql = 'DELETE FROM ' . DRAFTS_TABLE . "
			WHERE draft_id = $draft_id
				AND user_id = {$user->data['user_id']}";
		$db->sql_query($sql);
	}

	// Index message contents
	if ($update_search_index && $data['enable_indexing'])
	{
		// Select the search method and do some additional checks to ensure it can actually be utilised
		$search_type = basename($config['search_type']);

		if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
		{
			trigger_error('NO_SUCH_SEARCH_MODULE');
		}

		if (!class_exists($search_type))
		{
			include("{$phpbb_root_path}includes/search/$search_type.$phpEx");
		}

		$error = false;
		$search = new $search_type($error);

		if ($error)
		{
			trigger_error($error);
		}

		$search->index($mode, $data['post_id'], $data['message'], $subject, $poster_id, ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
	}

	// Topic Notification, do not change if moderator is changing other users posts...
	if ($user->data['user_id'] == $poster_id)
	{
		if (!$data['notify_set'] && $data['notify'])
		{
			$sql = 'INSERT INTO ' . TOPICS_WATCH_TABLE . ' (user_id, topic_id)
				VALUES (' . $user->data['user_id'] . ', ' . $data['topic_id'] . ')';
			$db->sql_query($sql);
		}
		else if (($config['email_enable'] || $config['jab_enable']) && $data['notify_set'] && !$data['notify'])
		{
			$sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
				WHERE user_id = ' . $user->data['user_id'] . '
					AND topic_id = ' . $data['topic_id'];
			$db->sql_query($sql);
		}
	}

	if ($mode == 'post' || $mode == 'reply' || $mode == 'quote')
	{
		// Mark this topic as posted to
		markread('post', $data['forum_id'], $data['topic_id']);
	}

	// Mark this topic as read
	// We do not use post_time here, this is intended (post_time can have a date in the past if editing a message)
	markread('topic', (($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']), $data['topic_id'], time());

	//
	if ($config['load_db_lastread'] && $user->data['is_registered'])
	{
		$sql = 'SELECT mark_time
			FROM ' . FORUMS_TRACK_TABLE . '
			WHERE user_id = ' . $user->data['user_id'] . '
				AND forum_id = ' . (($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
		$result = $db->sql_query($sql);
		$f_mark_time = (int) $db->sql_fetchfield('mark_time');
		$db->sql_freeresult($result);
	}
	else if ($config['load_anon_lastread'] || $user->data['is_registered'])
	{
		$f_mark_time = false;
	}

	if (($config['load_db_lastread'] && $user->data['is_registered']) || $config['load_anon_lastread'] || $user->data['is_registered'])
	{
		// Update forum info
		if ($topic_type == POST_GLOBAL)
		{
			$sql = 'SELECT MAX(topic_last_post_time) as forum_last_post_time
				FROM ' . TOPICS_TABLE . '
				WHERE forum_id = 0';
		}
		else
		{
			$sql = 'SELECT forum_last_post_time
				FROM ' . FORUMS_TABLE . '
				WHERE forum_id = ' . $data['forum_id'];
		}
		$result = $db->sql_query($sql);
		$forum_last_post_time = (int) $db->sql_fetchfield('forum_last_post_time');
		$db->sql_freeresult($result);

		update_forum_tracking_info((($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']), $forum_last_post_time, $f_mark_time, false);
	}

	// Send Notifications
	if (($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_approval)
	{
		// If a username was supplied or the poster is a guest, we will use the supplied username.
		// Doing it this way we can use "...post by guest-username..." in notifications when
		// "guest-username" is supplied or ommit the username if it is not.
		$username = ($username !== '' || !$user->data['is_registered']) ? $username : $user->data['username'];
		//-- mod: Prime Notify ------------------------------------------------------//
		include ($phpbb_root_path . 'includes/prime_notify.' . $phpEx);
		$prime_notify->setup_post($data);
//-- end: Prime Notify ------------------------------------------------------//
		user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id'], $username);
	}

	$params = $add_anchor = '';

	if ($post_approval)
	{
		$params .= '&t=' . $data['topic_id'];

		if ($mode != 'post')
		{
			$params .= '&p=' . $data['post_id'];
			$add_anchor = '#p' . $data['post_id'];
		}
	}
	else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
	{
		$params .= '&t=' . $data['topic_id'];
	}

	$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
	$url = append_sid($url, 'f=' . $data['forum_id'] . $params) . $add_anchor;

	return $url;
}

/**
* Handle topic bumping
* @param int $forum_id The ID of the forum the topic is being bumped belongs to
* @param int $topic_id The ID of the topic is being bumping
* @param array $post_data Passes some topic parameters:
*				- 'topic_title'
*				- 'topic_last_post_id'
*				- 'topic_last_poster_id'
*				- 'topic_last_post_subject'
*				- 'topic_last_poster_name'
*				- 'topic_last_poster_colour'
* @param int $bump_time The time at which topic was bumped, usually it is a current time as obtained via time().
* @return string An URL to the bumped topic, example: ./viewtopic.php?forum_id=1&amptopic_id=2&ampp=3#p3
*/
function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
{
	global $config, $db, $user, $phpEx, $phpbb_root_path;

	if ($bump_time === false)
	{
		$bump_time = time();
	}

	// Begin bumping
	$db->sql_transaction('begin');

	// Update the topic's last post post_time
	$sql = 'UPDATE ' . POSTS_TABLE . "
		SET post_time = $bump_time
		WHERE post_id = {$post_data['topic_last_post_id']}
			AND topic_id = $topic_id";
	$db->sql_query($sql);

	// Sync the topic's last post time, the rest of the topic's last post data isn't changed
	$sql = 'UPDATE ' . TOPICS_TABLE . "
		SET topic_last_post_time = $bump_time,
			topic_bumped = 1,
			topic_bumper = " . $user->data['user_id'] . "
		WHERE topic_id = $topic_id";
	$db->sql_query($sql);

	// Update the forum's last post info
	$sql = 'UPDATE ' . FORUMS_TABLE . "
		SET forum_last_post_id = " . $post_data['topic_last_post_id'] . ",
			forum_last_poster_id = " . $post_data['topic_last_poster_id'] . ",
			forum_last_post_subject = '" . $db->sql_escape($post_data['topic_last_post_subject']) . "',
			forum_last_post_time = $bump_time,
			forum_last_poster_name = '" . $db->sql_escape($post_data['topic_last_poster_name']) . "',
			forum_last_poster_colour = '" . $db->sql_escape($post_data['topic_last_poster_colour']) . "'
		WHERE forum_id = $forum_id";
	$db->sql_query($sql);

	// Update bumper's time of the last posting to prevent flood
	$sql = 'UPDATE ' . USERS_TABLE . "
		SET user_lastpost_time = $bump_time
		WHERE user_id = " . $user->data['user_id'];
	$db->sql_query($sql);

	$db->sql_transaction('commit');

	// Mark this topic as posted to
	markread('post', $forum_id, $topic_id, $bump_time);

	// Mark this topic as read
	markread('topic', $forum_id, $topic_id, $bump_time);

	// Update forum tracking info
	if ($config['load_db_lastread'] && $user->data['is_registered'])
	{
		$sql = 'SELECT mark_time
			FROM ' . FORUMS_TRACK_TABLE . '
			WHERE user_id = ' . $user->data['user_id'] . '
				AND forum_id = ' . $forum_id;
		$result = $db->sql_query($sql);
		$f_mark_time = (int) $db->sql_fetchfield('mark_time');
		$db->sql_freeresult($result);
	}
	else if ($config['load_anon_lastread'] || $user->data['is_registered'])
	{
		$f_mark_time = false;
	}

	if (($config['load_db_lastread'] && $user->data['is_registered']) || $config['load_anon_lastread'] || $user->data['is_registered'])
	{
		// Update forum info
		$sql = 'SELECT forum_last_post_time
			FROM ' . FORUMS_TABLE . '
			WHERE forum_id = ' . $forum_id;
		$result = $db->sql_query($sql);
		$forum_last_post_time = (int) $db->sql_fetchfield('forum_last_post_time');
		$db->sql_freeresult($result);

		update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time, false);
	}

	add_log('mod', $forum_id, $topic_id, 'LOG_BUMP_TOPIC', $post_data['topic_title']);

	$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";

	return $url;
}
function vkRepost($text = false, $link = false)
{
	global $config;

	$link = ( $link ) ? trim($link) : '';
	$text = ( $text ) ?  urldecode($text) : '';

	$params = array(
		'owner_id'		=> '-' . $config['vk_repost_group'],
		'from_group'	=> $config['vk_repost_admin'],
		'access_token'	=> $config['vk_token'],
		'message'		=> $text,
		'attachments'	=> $link,
	);

	$url = 'https://api.vk.com/method/wall.post?' . http_build_query($params);

	$ch = curl_init($url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	$response = curl_exec($ch);
	curl_close($ch);
}

?>
Изображение
Anvar
Former team member
Сообщения: 1965
Стаж: 14 лет
Благодарил (а): 67 раз
Поблагодарили: 799 раз
Контактная информация:

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение Anvar »

igorbond, Функция vkRepost (последняя в файле) она с инструкции из первого поста.

Не полностью удалён старый и добавлен новый код в includes/functions_posting.php

Vk Repost API - Постинг на стену в группу вконтакте
holpa
phpBB 1.2.0
Сообщения: 11
Стаж: 9 лет 4 месяца

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение holpa »

Интересно, а автор мода будет его для 3.1.1 переделывать?
Anvar
Former team member
Сообщения: 1965
Стаж: 14 лет
Благодарил (а): 67 раз
Поблагодарили: 799 раз
Контактная информация:

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение Anvar »

holpa, Автор там обитает Запросы расширений для phpBB 3.1.x и нужды в этом не видит..
Аватара пользователя
southklad
phpBB 3.1.0 RC2
Сообщения: 3232
Стаж: 12 лет 2 месяца
Благодарил (а): 797 раз
Поблагодарили: 175 раз

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение southklad »

Все равно ен пойму, где моя ошибка, выскакивает

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

Warning: Cannot modify header information - headers already sent by (output started at forum/includes/functions.php:3892) in /forum/includes/functions.php on line 4832

Warning: Cannot modify header information - headers already sent by (output started at /forum/includes/functions.php:3892) in /forum/includes/functions.php on line 4834

Warning: Cannot modify header information - headers already sent by (output started at /forum/includes/functions.php:3892) in /forum/includes/functions.php on line 4835

Warning: Cannot modify header information - headers already sent by (output started at forum/includes/functions.php:3892) in /forum/includes/functions.php on line 4836
Изображение
Аватара пользователя
xisp
phpBB 3.0.0 RC7
Сообщения: 1798
Стаж: 11 лет 10 месяцев
Благодарил (а): 152 раза
Поблагодарили: 215 раз
Забанен: Бессрочно

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение xisp »

В редакторе. Используйте редактор с поддержкой UTF8 без BOM. Проверьте, чтобы перед <?php и после ?> не было никаких символов.
phpBBex
Аватара пользователя
apollion
phpBB 2.0.22
Сообщения: 1382
Стаж: 10 лет
Откуда: Юг Руси
Благодарил (а): 50 раз
Поблагодарили: 99 раз
Контактная информация:

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение apollion »

Кстати, вопрос по API ВК. Есть ли смысл прикручивать возможность постить пользователя комменты в темах напрямую из ВК? И незарегистрированным на форуме - тоже, (там возможности разграничить тех и других нет). Кто делал такое? Какой результат?
Erlang
phpBB 2.0.15
Сообщения: 1033
Стаж: 19 лет 8 месяцев
Откуда: Москва
Благодарил (а): 293 раза
Поблагодарили: 6 раз
Контактная информация:

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение Erlang »

Нет реакции совсем :(

Писать в ID группы:
club19500884
или
19500884
?

Добавлено спустя 9 минут 59 секунд:
Правда статистика приложения показывает что были обращения и ошибки.
Как лечить?
С уважением,
Сергей
Anvar
Former team member
Сообщения: 1965
Стаж: 14 лет
Благодарил (а): 67 раз
Поблагодарили: 799 раз
Контактная информация:

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение Anvar »

id только цифры.
Что-то все пытаются вписать туда различные префиксы и названия группы?! Надо будет явно подписать.

Какие обращения и какие ошибки?
Erlang
phpBB 2.0.15
Сообщения: 1033
Стаж: 19 лет 8 месяцев
Откуда: Москва
Благодарил (а): 293 раза
Поблагодарили: 6 раз
Контактная информация:

Re: Vk Repost API - Постинг на стену в группу вконтакте

Сообщение Erlang »

Просто ничего не происходит.
Статистика выдаёт
vk.jpg
С уважением,
Сергей
Закрыто

Вернуться в «Бета-версии модов для phpBB 3.0.x»