Xwab
Форумыnavigate_nextphpBB-WAP

Вывод последних тем с форума!
Сообщения
spb

Ребят помогите! Извините за темку ненашёл файл если таков есть! Мне надо готовый индекс.пхп с кодом вывода на главную последних тем форума, кто сможет дать или кто с компа вставти код на 7Версию, у меня чистый бе3 модов. Ниже архив

10 Дек 2011, 19:49
фанат_ТК

spb, у тебя какие нибудь моды установлены затрагивающие index.php?
добавлено спустя 2 минуты:
а ссори первый пост не до конца дочитал.. сейчас попробую сделать

10 Дек 2011, 20:38
spb

фанат_ТК, Нет чистый форум
добавлено спустя 1 минуту:
фанат_ТК, заранее спасибо с меня хак скрипт тебе платный!

10 Дек 2011, 20:41
spb

Kastet, Не по теме!

10 Дек 2011, 20:48
фанат_ТК

вот.. там в архиве сразу файл index.php

10 Дек 2011, 20:52
spb

Непашит всё по ридми сделал итог http://wap.d-mast.in стоит мод сокращённых сылок и всё

20 Дек 2011, 4:09
waproducer

у меня он стоял, так показал последние, а как начал новые темы добавлять то он как будто завис, 0 внимания..мож переделать мод новостей и все ))

20 Дек 2011, 18:22
1RON1

вот код
<td class="row1" align="left">
<small>Последние темы</small>:<br/>
<!-- BEGIN topicrow -->
<a href="{topicrow.U_LAST_POST}">{topicrow.TOPIC_TITLE}</a><br/>
<!-- END topicrow -->
</td>
</tr>

ставь в фаил

index_body.tpl

20 Дек 2011, 19:02
spb

В общем вот ниже код индекс.пхп
добавлено спустя 27 секунд:
<?php
/
****************************
****************************
*******************
* index.php (phpBB-WAP
v7)
* -------------------
* Разработка: phpBB
Group.
* Оптимизация под WAP:
Гутник Игорь ( чел ).
* 2009 год
****************************
****************************
*******************/
/
****************************
****************************
*******************
*
* Эта версия phpBB-WAP
является бесплатным
* программным
обеспечением и
распространяется
* в рамках лицензии
GNU General Public
License.
* Автор модификации
настоятельно не
* рекомендует
распрострянять её так,
как
* распространялась 5
версия мода.
*
****************************
****************************
*******************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_
path . 'extension.inc');
include($phpbb_root_
path . 'common.'.$phpEx);
if (!empty($board_config
['index_announcement']))
{
include($phpbb_root_
path . 'includes/bbcode.'.$
phpEx);
}
$userdata = session_
pagestart($user_ip, PAGE_
INDEX);
init_userprefs($userdata);
$viewcat = ( !empty($
HTTP_GET_VARS[POST_
CAT_URL]) ) ? $HTTP_
GET_VARS[POST_CAT_
URL] : -1;
if( (!$board_config['index_
spisok'] && !$userdata
['session_logged_in']) || ($
userdata['session_
logged_in'] && !$
userdata['user_index_
spisok']) )
{
if ( $viewcat < 0 )
$viewcat = -2 ;
}
$verh = '';
$niz = '';
$sql = "SELECT *
FROM ".$table_
prefix."shop_sites
ORDER BY id ASC";
if( !($result = $db->sql_
query($sql)) )
{
message_die(GENERAL_
ERROR, 'Could not query
users', '', __LINE__, __
FILE__, $sql);
}
if ( $row = $db->sql_
fetchrow($result) )
{
$i = 0;
do
{
if ( $row['site_order'] )
{
if ( $row['site_time'] <
time() )
{
$sqldel = "DELETE FROM
".$table_prefix."shop_sites
WHERE id = " . $row['id'];
$resultdel = $db->sql_
query($sqldel);
} else {
$niz .= '<a href="http://' .
$row['site_url'] . '">' . $
row['site_desc'] . '</
a><br/>';
}
} else {
if ( $row['site_time'] <
time() )
{
$sqldel = "DELETE FROM
".$table_prefix."shop_sites
WHERE id = " . $row['id'];
$resultdel = $db->sql_
query($sqldel);
} else {
$verh .= '<a
href="http://' . $row['site_
url'] . '">' . $row['site_
desc'] . '</a><br/>';
}
}
$i++;
}
while ( $row = $db->sql_
fetchrow($result) );
$db->sql_freeresult($
result);
}
$tracking_topics = ( isset
($HTTP_COOKIE_VARS[$
board_config['cookie_
name'] . '_t']) ) ?
unserialize($HTTP_
COOKIE_VARS[$board_
config['cookie_name'] . "_
t"]) : array();
$tracking_forums = ( isset
($HTTP_COOKIE_VARS[$
board_config['cookie_
name'] . '_f']) ) ?
unserialize($HTTP_
COOKIE_VARS[$board_
config['cookie_name'] . "_
f"]) : array();
$total_posts = get_db_
stat('postcount');
$total_users = get_db_
stat('usercount');
$total_attach = get_db_
stat('attachcount');
$newest_userdata = get_
db_stat('newestuser');
$newest_user = $newest_
userdata['username'];
$newest_uid = $newest_
userdata['user_id'];
$statistika = "<p>".sprintf
($lang['Posted_articles_
total'], $total_posts)
."<br/>\n".sprintf($lang
['Attach_total'], $total_
attach)."<br/>\n".sprintf($
lang['Registered_users_
total'], $total_users)."<br/
>\n".sprintf($lang
['Newest_user'], '<a
href="' . append_sid
("profile.$phpEx?
mode=viewprofile&amp;" .
POST_USERS_URL . "=$
newest_uid") . '">', $
newest_user, '</a>')."</
p>";
$ban_information =
session_userban($user_ip,
$userdata['user_id']);
if ($ban_information)
{
$ban = '<div class="text"
style="color: red; font-
weight:
bold;">Внимание!<br/
></div><div
style="border: 1px solid
#d4d6d4; background: #
ffffa0;">Ваш '.$ban_
information.'</div>';
} else {
$ban = '';
}
$sql = "SELECT c.cat_id,
c.cat_title, c.cat_order
FROM " . CATEGORIES_
TABLE . " c
ORDER BY c.cat_order";
if( !($result = $db->sql_
query($sql)) )
{
message_die(GENERAL_
ERROR, 'Could not query
categories list', '', __LINE_
_, __FILE__, $sql);
}
$category_rows = array();
while ($row = $db->sql_
fetchrow($result))
{
$category_rows[] = $row;
}
$db->sql_freeresult($
result);
$total_categories = count
($category_rows);
$sql = "SELECT f.*, p.post_
time, p.post_username,
u.username, u.user_id
FROM (( " . FORUMS_
TABLE . " f
LEFT JOIN " . POSTS_
TABLE . " p ON p.post_id
= f.forum_last_post_id )
LEFT JOIN " . USERS_
TABLE . " u ON u.user_id
= p.poster_id )
ORDER BY f.cat_id,
f.forum_order" ;
if ( !($result = $db->sql_
query($sql)) )
{
message_die(GENERAL_
ERROR, 'Could not query
forums information', '', __
LINE__, __FILE__, $sql);
}
$forum_data = array();
while( $row = $db->sql_
fetchrow($result) )
{
$forum_data[] = $row;
}
$db->sql_freeresult($
result);
$total_forums = count($
forum_data);
if ($userdata['session_
logged_in'])
{
if ($userdata['user_
lastvisit'] < (time() -
5184000))
{
$userdata['user_lastvisit']
= time() - 5184000;
}
$sql = "SELECT t.forum_
id, t.topic_id, p.post_time
FROM " . TOPICS_TABLE .
" t, " . POSTS_TABLE . " p
WHERE p.post_id =
t.topic_last_post_id
AND p.post_time > " . $
userdata['user_lastvisit'] .
"
AND t.topic_moved_id =
0" ;
if ( !($result = $db->sql_
query($sql)) )
{
message_die(GENERAL_
ERROR, 'Could not query
new topic information', '',
__LINE__, __FILE__, $sql);
}
$new_topic_data = array()
;
while( $topic_data = $db-
>sql_fetchrow($result) )
{
$new_topic_data[$topic_
data['forum_id']][$topic_
data['topic_id']] = $topic_
data['post_time'];
}
$db->sql_freeresult($
result);
}
$admin_link = ( $userdata
['user_level'] ==
ADMIN ) ? '- <a
href="admin/index.' . $
phpEx . '?sid=' . $userdata
['session_id'] . '">' . $lang
['Admin_panel'] . '</a>' :
'';
$is_auth_ary = array();
$is_auth_ary = auth
(AUTH_VIEW, AUTH_
LIST_ALL, $userdata, $
forum_data);
$sql = ($board_config
['birthday_check_day']) ?
"SELECT user_id,
username, user_
birthday,user_level FROM
" . USERS_TABLE. "
WHERE user_birthday!
=999999 ORDER BY
username" :"";
if($result = $db->sql_
query($sql))
{
if (!empty($result))
{
$time_now = time();
$this_year = create_date
('Y', $time_now, $board_
config['board_timezone'])
;
$date_today = create_
date('Ymd', $time_now, $
board_config['board_
timezone']);
$date_forward = create_
date('Ymd', $time_now+($
board_config['birthday_
check_day']*86400), $
board_config['board_
timezone']);
while ($birthdayrow = $
db->sql_fetchrow($result)
)
{
$user_birthday2 = $this_
year.($user_birthday =
realdate("md",$
birthdayrow['user_
birthday'] ));
if ( $user_birthday2 < $
date_today ) $user_
birthday2 += 10000;
if ( $user_birthday2 > $
date_today && $user_
birthday2 <= $date_
forward )
{
$user_age = ( $this_year.$
user_birthday < $date_
today ) ? $this_year -
realdate ('Y',$birthdayrow
['user_birthday'])+1 : $
this_year- realdate ('Y',$
birthdayrow['user_
birthday']);
switch ($birthdayrow
['user_level'])
{
case ADMIN :
$birthdayrow['username']
= $birthdayrow
['username'];
$style_color =
'style="color:#ffcc00"';
break;
case MOD :
$birthdayrow['username']
= $birthdayrow
['username'];
$style_color =
'style="color:#943043"';
break;
default: $style_color = '';
}
$birthday_week_list .= '
<a href="' . append_sid
("profile.$phpEx?
mode=viewprofile&amp;" .
POST_USERS_URL . "=" . $
birthdayrow['user_id']) .
'"' . $style_color .'>' . $
birthdayrow['username'] .
' ('.$user_age.')</a>,';
} else if ( $user_birthday2
== $date_today ) {
$user_age = $this_year -
realdate ( 'Y',$
birthdayrow['user_
birthday'] );
switch ($birthdayrow
['user_level'])
{
case ADMIN :
$birthdayrow['username']
= $birthdayrow
['username'];
$style_color =
'style="color:#ffcc00"';
break;
case MOD :
$birthdayrow['username']
= $birthdayrow
['username'];
$style_color =
'style="color:#943043"';
break;
default: $style_color = '';
}
$birthday_today_list .= '
<a href="' . append_sid
("profile.$phpEx?
mode=viewprofile&amp;" .
POST_USERS_URL . "=" . $
birthdayrow['user_id']) .
'"' . $style_color .'>' . $
birthdayrow['username'] .
' ('.$user_age.')</a>,';
}
}
if ($birthday_today_list) $
birthday_today_list[ strlen
( $birthday_today_list)-1]
= ' ';
if ($birthday_week_list) $
birthday_week_list[ strlen(
$birthday_week_list)-1] =
' ';
}
$db->sql_freeresult($
result);
}
define('SHOW_ONLINE',
true);
$page_title = $lang
['Index'];
include($phpbb_root_
path . 'includes/page_
header.'.$phpEx);
$template->set_filenames
(array(
'body' => 'index_
body.tpl')
);
$template->assign_vars
(array(
'STATISTIKA' => $
statistika,
'L_WHOSBIRTHDAY_
WEEK' => ($board_config
['birthday_check_day'] >
1) ? sprintf( (($birthday_
week_list) ? $lang
['Birthday_week'] : $lang
['Nobirthday_week']), $
board_config['birthday_
check_day']).$birthday_
week_list : '',
'L_WHOSBIRTHDAY_
TODAY' => ($board_
config['birthday_check_
day']) ? ($birthday_today_
list) ? $lang['Birthday_
today'].$birthday_today_
list : $lang['Nobirthday_
today'] : '',
'ADMIN_LINK' => $
admin_link,
'VERH' => $verh,
'NIZ' => $niz,
'BAN_INFO' => $ban)
);
if (!empty($board_config
['index_announcement']))
{
$announcement = smilies_
pass($board_config
['index_announcement']);
$announcement = str_
replace("\n", "\n<br/>\n",
$announcement);
$template->assign_block_
vars('announcement',
array(
'ANNOUNCEMENT' => $
announcement)
);
}
$display_categories =
array();
for ( $i = 0; $i < $total_
forums; $i++ )
{
if ($is_auth_ary[$forum_
data[$i]['forum_id']]
['auth_view'])
{
$display_categories[$
forum_data[$i]['cat_id']] =
true;
}
}
for($i = 0; $i < $total_
categories; $i++)
{
$cat_id = $category_rows
[$i]['cat_id'];
if (isset($display_
categories[$cat_id]) && $
display_categories[$cat_
id])
{
$template->assign_block_
vars('catrow', array(
'CAT_DESC' => $
category_rows[$i]['cat_
title'],
'U_VIEWCAT' =>
append_sid("index.$
phpEx?" . POST_CAT_
URL . "=$cat_id"))
);
if ( $viewcat == $cat_id ||
$viewcat == -1 )
{
for($j = 0; $j < $total_
forums; $j++)
{
if ( $forum_data[$j]['cat_
id'] == $cat_id )
{
$forum_id = $forum_data
[$j]['forum_id'];
if ( $is_auth_ary[$forum_
id]['auth_view'] )
{
$posts = $forum_data[$j]
['forum_posts'];
if($userdata['user_index_
spisok'] == 0)
{
$template->set_filenames
(array('body' => 'cat_
body.tpl'));
}
$template->assign_block_
vars('catrow.forumrow',
array(
'FORUM_NAME' => $
forum_data[$j]['forum_
name'],
'POSTS' => $forum_data
[$j]['forum_posts'],
'TOPICS' => $forum_data
[$j]['forum_topics'],
'U_VIEWFORUM' =>
append_sid("viewforum.$
phpEx?" . POST_FORUM_
URL . "=$forum_id"))
);
}
}
}
}
}
}
$template->pparse
('body');
//
$cfg_ignore_forums =
'0'; // id форумов
которые будут
$cfg_nm_topics = 3; //
кол-во теи для вывода
$cfg_max_topic_length =
75; // длина названия
темы
$orig_word = array();
$replacement_word =
array();
obtain_word_list($orig_
word, $replacement_
word);
$server_protocol = ($
board_config['cookie_
secure']) ? 'https://' :
'http://';
$server_name = preg_
replace('#^\/?(.*?)\/?$#',
'\1', trim($board_config
['server_name']));
$server_port = ($board_
config['server_port'] <>
80) ? ':' . trim($board_
config['server_port']) : '';
$script_name = preg_
replace('#^\/?(.*?)\/?$#',
'\1', trim($board_config
['script_path']));
$script_name = ($script_
name == '') ? $script_
name : '/' . $script_name;
$board_path = $server_
protocol . $server_name .
$server_port . $script_
name;
$viewtopic_url = $board_
path . '/viewtopic.' . $
phpEx;
// Fetching topics of
public forums
$sql = "SELECT t.topic_id,
t.topic_title, t.topic_last_
post_id, t.topic_replies,
t.topic_replies
FROM " . TOPICS_TABLE .
" AS t, " . POSTS_TABLE .
" AS p, " . FORUMS_
TABLE . " AS f
WHERE t.forum_id =
f.forum_id
AND f.auth_read = " .
AUTH_ALL . "
AND t.forum_id NOT IN
(" . $cfg_ignore_forums .")
AND p.post_id = t.topic_
last_post_id
AND t.topic_moved_id =
0
ORDER BY p.post_time
DESC LIMIT $cfg_nm_
topics";
if ( !$result = $db->sql_
query($sql) )
{
message_die(GENERAL_
ERROR, "Could not fetch
recent topics
information." , '', __LINE__,
__FILE__, $sql);
}
while ( $row = $db->sql_
fetchrow($result) )
{
$full_topic_title = $topic_
title = $row['topic_title'];
if ( count($orig_word) )
$topic_title = ( strlen($
topic_title) > $cfg_max_
topic_length ) ? substr($
topic_title, 0, $cfg_max_
topic_length) . '&hellip;' :
$topic_title;
$poster = ( $searchset[$i]
['user_id'] !=
ANONYMOUS ) ? '<a
href="' . append_sid
("profile.$phpEx?
mode=viewprofile&amp;" .
POST_USERS_URL . "=" . $
searchset[$i]['user_id']) .
'">' : '';
$poster .= ( $searchset[$i]
['user_id'] !=
ANONYMOUS ) ? $
searchset[$i]['username'] :
( ( $searchset[$i]['post_
username'] != "" ) ? $
searchset[$i]['post_
username'] : $lang
['Guest'] );
$poster .= ( $searchset[$i]
['user_id'] !=
ANONYMOUS ) ? '</a>' :
'';
$template->assign_block_
vars('topicrow', array(
'BOARD_PATH' => $
board_path,
'U_LAST_POST' => $
viewtopic_url . '?' . POST_
POST_URL . '=' . $row
['topic_last_post_id'] . '#' .
$row['topic_last_post_id'],
'TOPIC_REPLIES' => $
row['topic_replies'],
'FULL_TOPIC_TITLE' =>
str_replace("'", "\'", $full_
topic_title),
'U_TOPIC' => $
viewtopic_url . '?' . POST_
TOPIC_URL . '=' . $row
['topic_id'],
'TOPIC_TITLE' => str_
replace("'", "\'", $topic_
title))
);
}
//
include($phpbb_root_
path . 'includes/page_
tail.'.$phpEx);
?>
добавлено спустя 1 минуту:
А ниже Индекс боду тпл

20 Дек 2011, 21:12
FeST

spb, блин в txt закинь код

20 Дек 2011, 21:14
Ответить на тему