Сергей Секирин
ок... в ближайшее время напишу...
Добавлено спустя 51 минуту 48 секунд:
автор темы...
Код: Выделить всё
##############################################################
## MOD Title: Glance Addon [Posters for recent topics]
## MOD Author: [R: R@m$e$ :U] < Ramses@FromRU.com > (Ramses) http://www.phpbbguru.net
## MOD Description: Display authors of recent topics
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~5 Minutes
## Files To Edit:
## glance.php
## templates/subSilver/glance_body.tpl
## Included Files:
## n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbbguru.net/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum.
##############################################################
## Author Notes:
## With respect to Xpert for Glance ;)
##
## Find bug? Please write me...
##
##############################################################
## MOD History:
##
## 2005-03-27 - Version 1.0.0
## - First release... =)))
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
glance.php
#
#-----[ FIND ]------------------------------------------
#
// Getting recent topics
$sql = "SELECT t.topic_id, t.topic_title, p.post_time
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p
WHERE t.forum_id NOT IN (" . $unauthed . ")
AND p.topic_id = t.topic_id
AND p.post_id = t.topic_last_post_id
AND t.topic_moved_id = 0
ORDER BY p.post_time DESC
LIMIT " . $recent_nm;
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// [start] Glance Addon [Posters for recent topics]
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [end] Glance Addon [Posters for recent topics]
#
#-----[ IN-LINE FIND ]------------------------------------------
#
p.post_time
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, p2.post_username, p2.poster_id, u.username
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, " . POSTS_TABLE . " AS p
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, " . USERS_TABLE . " AS u, " . POSTS_TABLE . " AS p2
#
#-----[ IN-LINE FIND ]------------------------------------------
#
WHERE t.forum_id NOT IN (" . $unauthed . ")
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
AND p2.post_id = t.topic_first_post_id
AND u.user_id = p2.poster_id
#
#-----[ FIND ]------------------------------------------
#
$topic_link = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id" . $newest_code);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [start] Glance Addon [Posters for recent topics]
$poster_link = append_sid('profile.$phpEx?mode=viewprofile&' . POST_USERS_URL . '=' . $latest_topics[$i]['poster_id']);
if (!empty($latest_topics[$i]['poster_username']))
{
$poster = $latest_topics[$i]['poster_username'];
}
else
{
$poster = $latest_topics[$i]['username'];
}
// [end] Glance Addon [Posters for recent topics]
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_LINK' => $topic_link,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [start] Glance Addon [Posters for recent topics]
'POSTER' => $poster,
'POSTER_LINK' => $poster_link,
// [end] Glance Addon [Posters for recent topics]
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/glance_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{recent.BULLET} <a href="{recent.TOPIC_LINK}" class="genmed">{recent.TOPIC_TITLE}</a>
#
#-----[ AFTER, ADD ]------------------------------------------
#
[<a href="{recent.POSTER_LINK}" class="genmed">{recent.POSTER}</a>]
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
400 символов первого поста...
Код: Выделить всё
##############################################################
## MOD Title: Glance Addon [First post of recent]
## MOD Author: [R: R@m$e$ :U] < Ramses@FromRU.com > (Ramses) http://www.phpbbguru.net
## MOD Description: Displays X symbols of first post
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~5 Minutes
## Files To Edit:
## glance.php
## templates/subSilver/glance_body.tpl
## Included Files:
## n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbbguru.net/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum.
##############################################################
## Author Notes:
## With respect to Xpert for Glance ;)
##
## Find bug? Please write me...
##
##############################################################
## MOD History:
##
## 2005-03-27 - Version 1.0.0
## - First release... =)))
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
glance.php
#
#-----[ FIND ]------------------------------------------
#
// Getting recent topics
$sql = "SELECT t.topic_id, t.topic_title, p.post_time
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f
WHERE t.forum_id NOT IN (" . $unauthed . ")
AND p.topic_id = t.topic_id
AND p.post_id = t.topic_last_post_id
AND t.topic_moved_id = 0
ORDER BY p.post_time DESC
LIMIT " . $recent_nm;
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// [start] Glance Addon [First post of recent]
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [end] Glance Addon [First post of recent]
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, p.post_time
#
#-----[ IN-LINE, AFTER ADD ]------------------------------------------
#
, p3.post_text
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, " . POSTS_TABLE . " AS p
#
#-----[ IN-LINE, AFTER ADD ]------------------------------------------
#
, " . POSTS_TEXT_TABLE . " AS p3
#
#-----[ IN-LINE FIND ]------------------------------------------
#
WHERE t.forum_id NOT IN (" . $unauthed . ")
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
AND p3.post_id = t.topic_first_post_id
#
#-----[ FIND ]------------------------------------------
#
$topic_link = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id" . $newest_code);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [start] Glance Addon [First post of recent]
$post = str_replace("\n", '<br />', ((strlen($latest_topics[$i]['post_text']) > 400) ? substr($latest_topics[$i]['post_text'], 0, 397) . '...' : $latest_topics[$i]['post_text']));
// [end] Glance Addon [First post of recent]
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_LINK' => $topic_link,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [start] Glance Addon [First post of recent]
'POST' => $post,
// [end] Glance Addon [First post of recent]
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/glance_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td valign=top nowrap="nowrap">
<span class="genmed">
<!-- BEGIN recent -->
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td valign=top>
<span class="genmed">
<!-- BEGIN recent -->
#
#-----[ FIND ]------------------------------------------
#
<br />
<!-- END recent -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<br /><span class="gensmall">{recent.POST}</span>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM