Значи трябва ми система като тази за плъгини http://amxmodxbg.org/plugins_amxmodx.php
Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
bobskaut каза:е как да го направа като се пусне нова тема в даден форум да се изкарва информация в дадена страница не в форума ами в някоя друга
Parse error: parse error in C:\xamp\htdocs\index.php on line 4
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<?php
$forum = '1'; кой е форума ( раздела ) от който искаш да показва
$limit = '2'; / колко да показва
$show = 'full';
$date_time = 'short';
$topic_link_type = 'topic';
$comment = 'topic';
$phpbb_root_path = './phpbb2 forum/'; / пътя до форума
if ( !defined('IN_PHPBB') )
{
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'config.'.$phpEx);
}
if ($show == '' || $show == 'full')
{
$grab_topics = $db->sql_query("SELECT * FROM `{$table_prefix}topics` WHERE `forum_id` = '{$forum}' AND `topic_moved_id` = '0' ORDER BY `topic_id` DESC LIMIT {$limit}");
}
else if ($show == 'topic')
{
$grab_topics = $db->sql_query("SELECT * FROM `{$table_prefix}topics` WHERE `forum_id` = '{$forum}' AND `topic_id` = '{$_GET['t']}' ORDER BY `topic_id` DESC");
}
while ($echo_topic = $db->sql_fetchrow($grab_topics))
{
$grab_posts = $db->sql_query("SELECT * FROM `{$table_prefix}posts` WHERE `forum_id` = '{$forum}' AND `topic_id` = '{$echo_topic['topic_id']}' LIMIT 1");
while ($echo_post = $db->sql_fetchrow($grab_posts))
{
$grab_posts_text = $db->sql_query("SELECT * FROM `{$table_prefix}posts_text` WHERE `post_id` = '{$echo_post['post_id']}'");
while($echo_text = $db->sql_fetchrow($grab_posts_text))
{
$find_user = $db->sql_query("SELECT * FROM `{$table_prefix}users` WHERE `user_id` = '{$echo_post['poster_id']}'");
while ($echo_user = $db->sql_fetchrow($find_user))
{
$echo_text = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $echo_text);
// BBCode
$echo_text = str_replace("","<strong>",$echo_text);
$echo_text = str_replace("","</strong>",$echo_text);
$echo_text = str_replace("","<em>",$echo_text);
$echo_text = str_replace("","</em>",$echo_text);
$echo_text = str_replace("","<u>",$echo_text);
$echo_text = str_replace("","</u>",$echo_text);
$echo_text = preg_replace('/\(.*)\ каза:(.*)\[\/quote\]/Usi','<div style="padding: 7px">$2</div>',$echo_text);
$echo_text = str_replace("","</em>",$echo_text);","<strong>Quote</strong><em>",$echo_text);
$echo_text = str_replace("
$echo_text = str_replace("[ code]","<strong>Code</strong><em>",$echo_text);
$echo_text = str_replace("[ /code]","</em>",$echo_text);
$echo_text = preg_replace('/\[list\](.*)\[\/list\]/si',"<div style="padding: 7px">$1</div>",$echo_text);
$echo_text = preg_replace('/\
- (.*)\[\/list\]/si',"<div style="padding: 7px">$1</div>",$echo_text);
$echo_text = str_replace("","<img src="",$echo_text);
$echo_text = str_replace("","" alt="image" />",$echo_text);
$echo_text = preg_replace('/\[url\](.*)\[\/url\]/Usi','<a href="$1">$1</a>',$echo_text);
$echo_text = preg_replace('/\(.*)\[\/url\]/Usi','<a href="$1">$2</a>',$echo_text);
$echo_text = preg_replace('/\[color=(.*)\](.*)\[\/color\]/Usi','<span style="{color:$1}">$2</span>',$echo_text);
$echo_text = preg_replace('/\[size=(.*)\](.*)\[\/size\]/Usi','<span style="{font-size:$1pt}">$2</span>',$echo_text);
$echo_text = str_replace("\n", "\n<br />\n", $echo_text);
if($date_time == "long")
{
$echo_topic['topic_time'] = strftime("%A %e %B %H:%M",$echo_topic['topic_time']);
}
if ($date_time == "short")
{
$echo_topic['topic_time'] = strftime("%a %e %b %H:%M",$echo_topic['topic_time']);
}
if ($comment == 'topic')
{
$comment_link = "{$phpbb_root_path}viewtopic.php?t={$echo_topic['topic_id']}";
}
if ($comment == 'reply')
{
$comment_link = "{$phpbb_root_path}posting.php?mode=reply&t={$echo_topic['topic_id']}";
}
if ($topic_link_type == 'topic')
{
$topic_link = "?show1=topic&t={$echo_topic['topic_id']}";
}
if ($topic_link_type == 'phpbb')
{
$topic_link = "{$phpbb_root_path}viewtopic.php?t={$echo_topic['topic_id']}";
}
if ($show != 'full' && !isset($_GET['show1']))
{
echo "<a href='{$topic_link}'>{$echo_text['post_subject']}</a><br />";
}
else if ($show == 'full')
{
echo "
<strong>{$echo_text['post_subject']}</strong> <br />
<br />
{$echo_text['post_text']}
<br />
<br />
<a href="{$comment_link}">Коментари {$echo_topic['topic_replies']}</a>пустнато на <strong>{$echo_topic['topic_time']}</strong> от <strong>{$echo_user['username']}</strong>
<hr size="1">
";
}
if ($_GET['show1'] == 'topic')
{
echo "
<strong>{$echo_text['post_subject']}</strong>
<br />
<br />
{$echo_text['post_text']}
<br />
<br />
<a href="{$comment_link}">Коментари {$echo_topic['topic_replies']}</a> пустнато на <strong>{$echo_topic['topic_time']}</strong> от <strong>{$echo_user['username']}</strong>
<hr size="1">
";
}
}
}
}
}
?>