Знатоки, подскажите
-
- phpBB 1.4.1
- Сообщения: 44
- Стаж: 20 лет 3 месяца
Знатоки, подскажите
Мод, который показывает последние десять сообщений форума?
А может и больше, кто знает, где такой лежит?
А может и больше, кто знает, где такой лежит?
-
- phpBB Guru
- Сообщения: 5484
- Стаж: 21 год 1 месяц
- Поблагодарили: 2 раза
-
- Former team member
- Сообщения: 582
- Стаж: 20 лет 3 месяца
- Откуда: Москва
Этот мод называется Glance v.2
выделенный сервер по цене обычного хостинга - менее 150 рублей в месяц
Благодарности принимаются в Яндекс.Деньгах на счет 4100143316948
Благодарности принимаются в Яндекс.Деньгах на счет 4100143316948
-
- phpBB 1.4.1
- Сообщения: 44
- Стаж: 20 лет 3 месяца
спасибо!
Добавлено спустя 59 минут 18 секунд:
Еще столкнулся при установке с sql:
#
#-----[ SQL ]------------------------------------------------
#
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('glance_anno_post', '');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('glance_recent', 5);
куда эти строки добавлять?
Добавлено спустя 59 минут 18 секунд:
Еще столкнулся при установке с sql:
#
#-----[ SQL ]------------------------------------------------
#
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('glance_anno_post', '');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('glance_recent', 5);
куда эти строки добавлять?
-
- Former team member
- Сообщения: 4463
- Стаж: 20 лет 5 месяцев
- Поблагодарили: 1 раз
-
- phpBB 1.4.1
- Сообщения: 44
- Стаж: 20 лет 3 месяца
-
- Former team member
- Сообщения: 6517
- Стаж: 20 лет 9 месяцев
- Откуда: Бердск
Митяй
поставить phpmyadminсложно, как самому эту sql базу найти?
Как правильно задавать вопросы
Для особо одаренных: поиск - это есть круто.
FAQ v.2 | FAQ v.3 | Шаблон запроса
Для особо одаренных: поиск - это есть круто.
FAQ v.2 | FAQ v.3 | Шаблон запроса
-
- phpBB 1.4.1
- Сообщения: 44
- Стаж: 20 лет 3 месяца
-
- Former team member
- Сообщения: 4463
- Стаж: 20 лет 5 месяцев
- Поблагодарили: 1 раз
-
- Former team member
- Сообщения: 955
- Стаж: 20 лет 3 месяца
- Откуда: Москва
Митяй, создавай файл glance_db_update.php в корневой папке форума, в него копируй код, что ниже, и запускай. Никакого знания sql не требуется. 
Xpert
Это файл можно было бы и к моду приаттачить и инструкцию для несведущих написать при желании, естественно.

Код: Выделить всё
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
$sql=array(
'INSERT INTO '.CONFIG_TABLE.' (config_name , config_value ) VALUES ("glance_anno_post", "")',
'INSERT INTO '.CONFIG_TABLE.' (config_name , config_value ) VALUES ("glance_recent", 5)'
);
$mods = array (
'Glance Mod','Glance Mod'
);
############################################### Do not change anything below this line #######################################
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if ($userdata['user_level']!=ADMIN)
message_die(GENERAL_ERROR, "You are not Authorised to do this");
$n=0;
$message="<b>This list is a result of the SQL queries needed for this Mod</b><br/><br/>";
while($sql[$n])
{
$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
if(!$result = $db->sql_query($sql[$n]))
$message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
$n++;
}
message_die(GENERAL_MESSAGE, $message);
?>
Это файл можно было бы и к моду приаттачить и инструкцию для несведущих написать при желании, естественно.
-
- phpBB 1.4.1
- Сообщения: 44
- Стаж: 20 лет 3 месяца
-
- Former team member
- Сообщения: 955
- Стаж: 20 лет 3 месяца
- Откуда: Москва
Митяй
Если есть желание, поэкспериментировать, можешь попробовать вот такой мод (его лучше доработать):
Если есть желание, поэкспериментировать, можешь попробовать вот такой мод (его лучше доработать):
Код: Выделить всё
########################################################
## Mod Title: The last Five and the Five popular (answers/views) on index.php
## Mod Version: 1.0.0
## Author: Andrey Politov aka Sergeant < andypolv@mail.ru >
## Description: Adds small table (3 columns) on the top of the forum index with 5 last posts, 5 popular
## (with maximum answers) and 5 popular (with maximum views). It helps to provide easy access to the last topics
## and keep on the top interesting topics. You can see example of this Mod: http://playland.ru/forum/
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 3 (4 if you have Russian language installed)
## index.php
## templates/subSilver/index_body.tpl
## language/lang_english/lang_main.php
## language/lang_russian/lang_main.php
##
## Included Files: none
##
########################################################
##
## Before Adding This hack To Your Forum,
## You Should Back Up All Files Related To This hack
##
########################################################
##
## Installation Notes:
##
## Follow the steps below.
##
########################################################
#
#-----[ OPEN ]---------------------------------------------
#
index.php
#
#-----[ FIND ]---------------------------------------------
#
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
#
#-----[ AFTER, ADD ]--------------------------------------
#
'L_TOPICSRECENT' => $lang['TopicsRecent'],
'L_TOPICSPOPULAR' => $lang['TopicsPopular'],
'L_TOPICSPOPULARVIEW' => $lang['TopicsPopularView'],
#
#-----[ FIND ]---------------------------------------------
#
//
// Okay, let's build the index
//
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];
#
#-----[ BEFORE, ADD ]--------------------------------------
#
//
// Okay, let's build the topic recent and popular
//
$active_topics_sql="SELECT a.topic_id,a.topic_title, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_last_post_id DESC
LIMIT 5";
$active_topics = $db->sql_query($active_topics_sql);
$active_topics_sql2="SELECT a.topic_id,a.topic_title, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_replies DESC
LIMIT 5";
$active_topics2 = $db->sql_query($active_topics_sql2);
$active_topics_sql3="SELECT a.topic_id,a.topic_title, a.topic_views, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_views DESC
LIMIT 5";
$active_topics3 = $db->sql_query($active_topics_sql3);
while (($line = mysql_fetch_array($active_topics)) and ($line2 = mysql_fetch_array($active_topics2)) and ($line3 = mysql_fetch_array($active_topics3)))
{
if (strlen($line['topic_title']) > 40)
{
$line_topic_title = substr($line['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title = $line['topic_title'];
}
if (strlen($line2['topic_title']) > 40)
{
$line_topic_title2 = substr($line2['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title2 = $line2['topic_title'];
}
if (strlen($line3['topic_title']) > 40)
{
$line_topic_title3 = substr($line3['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title3 = $line3['topic_title'];
}
$lastpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line['topic_id'] . "\" title=\"" . $line['topic_title'] ."\">" . $line_topic_title . "</a>";
$poppost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line2['topic_id'] . "\" title=\"" . $line2['topic_title'] ."\">" . $line_topic_title2 . "</a>";
$poppostc = $line2['topic_replies'];
$popviewpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line3['topic_id'] . "\" title=\"" . $line3['topic_title'] ."\">" . $line_topic_title3 . "</a>";
$popviewpostc = $line3['topic_views'];
$template->assign_block_vars('topicrecentpopular', array(
'TOPICSPOPULAR' => $poppost,
'TOPICSPOPULARC' => $poppostc,
'TOPICSPOPULARVIEW' => $popviewpost,
'TOPICSPOPULARVIEWC' => $popviewpostc,
'TOPICSRECENT' => $lastpost)
);
}
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
<!-- BEGIN catrow -->
#
#-----[ BEFORE, ADD ]------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th width="25%" class="thTop" nowrap="nowrap"> {L_TOPICSRECENT} </th>
<th width="38%" colspan="2" class="thTop" nowrap="nowrap"> {L_TOPICSPOPULAR} </th>
<th width="37%" colspan="2" class="thTop" nowrap="nowrap"> {L_TOPICSPOPULARVIEW} </th>
</tr>
<!-- BEGIN topicrecentpopular -->
<tr>
<td width="29%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSRECENT}</span></td>
<td width="31%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULAR}</span></td>
<td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARC}</span></td>
<td width="29%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEW}</span></td>
<td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEWC}</span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_russian/lang_main.php
#
#-----[ FIND ]---------------------------------------------
#
$lang['Topics'] = 'Темы';
#
#-----[ BEFORE, ADD ]--------------------------------------
#
$lang['TopicsRecent'] = 'Последние темы';
$lang['TopicsPopular'] = 'Популярные темы (по ответам)';
$lang['TopicsPopularView'] = 'Популярные темы (по просмотрам)';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
-
- phpBB 1.4.3
- Сообщения: 75
- Стаж: 20 лет 3 месяца