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.
justspy каза:Свали : http://4storing.com/n6qtd/be9fbf85ae78d328d4cded1508248f0d.html
Демо : http://85.196.150.129/digital/index.php
Ми този дето ти додох какъф е ?rlzche каза:Еми може ли урок като на този сайт последно от форума - http://sky-gaming.info/csss/ като тоя?
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include("$phpbb_root_path/includes/functions_display.php");
$privmsg = $user->data['user_unread_privmsg'];
if ($privmsg == 0)
{
$msg = "";
}
else
{
$msg = "($privmsg)";
}
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>
<?php
//Пътя до файла config.php
include "forum/config.php";
//Брой на последните теми, които искате да се показват
$latest = "10";
$link = $link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd");
if (!$link)
{
die('Not connected : ' . mysql_error());
}
$db_selected = mysql_select_db("$dbname", $link);
if (!$db_selected)
{
die ('Can\'t use foo : ' . mysql_error());
}
mysql_query("SET NAMES cp1251");
$get_url = "SELECT config_name, config_value FROM $table_prefix".config." WHERE config_name = 'server_name' LIMIT 0,1";
$url = mysql_query($get_url);
$url = mysql_fetch_array($url);
$latest_topics = "SELECT * FROM $table_prefix".topics." WHERE topic_approved = '1' ORDER BY topic_time DESC LIMIT 0,$latest";
$topics = mysql_query($latest_topics);
while($row = mysql_fetch_array($topics))
{
extract($row);
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
{
echo "<a href='".$phpbb_root_path."/viewtopic.php?f=".$forum_id."&t=".$topic_id."' target='_blank'>".$topic_title."</a> отговори: (".$topic_replies.")<br/>";
}
}
?>
Ето ти за phpbb2rlzche каза:Форума ми е в папка Forum
Със phpbb2 съм
<?php
define('IN_PHPBB', true);
$phpbb_root_path ='forum/';
include($phpbb_root_path . 'config.php');
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
?>
<?php
// ############ Edit below ########################################
$topic_length = '30'; // length of topic title
$topic_limit = '10'; // limit of displayed topics
$special_forums = '0'; // specify forums ('0' = no; '1' = yes)
$forum_ids = ''; // IDs of forums; separate them with a comma
$config_path = '/forum/'; // path to config.php
$root_path = '/forum/'; // link path
// ############ Edit above ########################################
$path = dirname(__FILE__);
include_once($path.$config_path .'config.php');
// ############## output ##############
echo '<table width="100%" cellpadding="1" cellspacing="1" border="0" align="center">
<tr>
<th colspan="2"><font color=green>'. $topic_limit .' Последни теми</font></th>
</tr>';
// ############## output ##############
$where_forums = ( $special_forums == '0' ) ? '' : 't.forum_id IN ('. $forum_ids .') AND ';
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username AS first_poster, u.user_id AS first_poster_id, u2.username AS last_poster, u2.user_id AS last_poster_id, p.post_username AS first_poster_name, p2.post_username AS last_poster_name, p2.post_time
FROM ". $table_prefix ."topics t, ". $table_prefix ."forums f, ". $table_prefix ."users u, ". $table_prefix ."posts p, ". $table_prefix ."posts p2, ". $table_prefix ."users u2
WHERE $where_forums t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id
ORDER BY t.topic_last_post_id DESC LIMIT $topic_limit";
$result = mysql_query($sql);
if( !$result )
{
die('SQL Statement Error: '. mysql_error());
exit();
}
$line = array();
while( $row = mysql_fetch_array($result) )
{
$line[] = $row;
}
for( $i = 0; $i < count($line); $i++ )
{
$forum_id = $line[$i]['forum_id'];
$forum_url = $root_path .'viewforum.php?f='. $forum_id;
$topic_id = $line[$i]['topic_id'];
$topic_url = $root_path .'viewtopic.php?t='. $topic_id;
$topic_title = ( strlen($line[$i]['topic_title']) < $topic_length ) ? $line[$i]['topic_title'] : substr(stripslashes($line[$i]['topic_title']), 0, $topic_length) .'...';
$topic_type = ( $line[$i]['topic_type'] == '2' ) ? 'Съобщение ': '';
$topic_type .= ( $line[$i]['topic_type'] == '3' ) ? 'Глобално съобщение ': '';
$topic_type .= ( $line[$i]['topic_type'] == '1' ) ? 'Важна ': '';
$topic_type .= ( $line[$i]['topic_vote'] ) ? 'Анкета ': '';
$views = $line[$i]['topic_views'];
$replies = $line[$i]['topic_replies'];
$first_time = date('d.m.Y', $line[$i]['topic_time']);
$first_author = ( $line[$i]['first_poster_id'] != '-1' ) ? '<a href="'. $root_path .'profile.php?mode=viewprofile&u='. $line[$i]['first_poster_id'] .'">'. $line[$i]['first_poster'] .'</a>' : ( ($line[$i]['first_poster_name'] != '' ) ? $line[$i]['first_poster_name'] : 'guest' );
$last_time = date('d.m.Y', $line[$i]['post_time']);
$last_author = ( $line[$i]['last_poster_id'] != '-1' ) ? $line[$i]['last_poster'] : ( ($line[$i]['last_poster_name'] != '' ) ? $line[$i]['last_poster_name'] : 'guest' );
$last_url = '<a href="'. $root_path .'viewtopic.php?p='. $line[$i]['topic_last_post_id'] .'#'. $line[$i]['topic_last_post_id'] .'">'. $last_author .'</a>';
// ############## output ##############
echo '<tr>
<td valign="top" nowrap="nowrap">'. $topic_type .'<a href="'. $topic_url .'">'. $topic_title .'</a></td>
</tr>
<tr>
<td><a href="'. $forum_url .'">'. $line[$i]['forum_name'] .'</a>: '. $last_url .' '. $last_time .'</td>
</tr>';
// ############## output ##############
}
echo '</table>';
mysql_close();
?>