phpBB2
##############################################################
## :
## : phpBB2
##
## :
## : 30
## : 6
## viewtopic.php
## includes/constants.php
## includes/topic_review.php
## language/lang_bulgarian/lang_main.php
## templates/subSilver/subSilver.cfg
## templates/subSilver/viewtopic_body.tpl
##
## : 4
##
## ignore.php
## templates/subSilver/ignore_body.tpl
## templates/subSilver/imagesicon_mini_ignore.gif
## templates/subSilver/images/lang_bulgarian/icon_ignore.gif
##
##############################################################
## -, Back Up
##############################################################

- - !!!

#
#-----[ ]------------------------------------------
#

- root\ignore.php
- forum/ignore.php

- root\templates\subSilver\ignore_body.tpl
- forum/templates/subSilver/ignore_body.tpl

- root\templates\subSilver\images\icon_mini_ignore.gif
- forum/templates/subSilver/images/icon_mini_ignore.gif

- root\templates\subSilver\images\icon_ignore.gif
- forum/templates/subSilver/images/icon_ignore.gif

- root\templates\subSilver\images\lang_bulgarian\icon_ignore.gif
- forum/templates/subSilver/images/lang_bulgarian/icon_ignore.gif

#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE phpbb_ignore (
user_id mediumint(8) NOT NULL default '0',
user_ignore mediumint(8) NOT NULL default '0'
) TYPE=MyISAM;

#
#-----[ ]------------------------------------------
#
language/lang_bulgarian/lang_main.php

#
#-----[ ]------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------

#
#-----[ ]------------------------------------------
#
//
// Ignore User Function
//
$lang['Ignore_list'] = " ";
$lang['Ignore_users'] = " ";
$lang['Ignore_add'] = " ";
$lang['Ignore_delete'] = " ";
$lang['Ignore_added'] = " ";
$lang['Ignore_deleted'] = " ";
$lang['Ignore_submit'] = " ";
$lang['Ignore_exists'] = " ";
$lang['Click_return_ignore'] = " %s%s ";
$lang['Ignore_user_warn'] = " !!!";
$lang['Post_user_ignored'] = " <b> </b> .";
$lang['Click_view_ignore'] = " %s%s .";

#
#-----[ ]------------------------------------------
#
includes/constants.php

#
#-----[ ]------------------------------------------
#
define('PAGE_GROUPCP', -11);

#
#-----[ ]------------------------------------------
#
define('PAGE_IGNORE', -12);

#
#-----[ ]------------------------------------------
#
define('GROUPS_TABLE', $table_prefix.'groups');

#
#-----[ ]------------------------------------------
#
define('IGNORE_TABLE', $table_prefix.'ignore');

#
#-----[ ]------------------------------------------
#
includes/topic_review.php

#
#-----[ ]------------------------------------------
#
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_id, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
AND p.post_id = pt.post_id
ORDER BY p.post_time DESC
LIMIT " . $board_config['posts_per_page'];

#
#-----[ ]------------------------------------------
#
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_id, u.user_level, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
AND p.post_id = pt.post_id
ORDER BY p.post_time DESC
LIMIT " . $board_config['posts_per_page'];

#
#-----[ ]------------------------------------------
#
//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//

#
#-----[ ]------------------------------------------
#
$user_id = $userdata['user_id'];

#
#-----[ ]------------------------------------------
#
$poster_id = $row['user_id'];

#
#-----[ ]------------------------------------------
#
if ( $user_id != ANONYMOUS )
{
$sql = "SELECT user_ignore
FROM " . IGNORE_TABLE . "
WHERE user_id = $user_id
AND user_ignore = $poster_id";
if( !$res = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not get data from ignore table', __LINE__, __FILE__, $sql);
}
}

if(($db->sql_numrows($res) == 0) || ($user_id == ANONYMOUS) || ($row['user_level'] == ADMIN) || ($row['user_level'] == MOD))
{



#
#-----[ ]------------------------------------------
#
}
while ( $row = $db->sql_fetchrow($result) );

#
#-----[ ]------------------------------------------
#
}


#
#-----[ ]------------------------------------------
#
viewtopic.php

#
#-----[ ]------------------------------------------
#
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;

#
#-----[ ]------------------------------------------
#
if ( !isset($bypass) )
{
$post_bypass = 0;
}
else
{
$post_bypass = $bypass;
}

#
#-----[ ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
$limit_posts_time
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id
ORDER BY p.post_time $post_time_order
LIMIT $start, ".$board_config['posts_per_page'];


#
#-----[ ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_level, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
$limit_posts_time
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id
ORDER BY p.post_time $post_time_order
LIMIT $start, ".$board_config['posts_per_page'];

#
#-----[ ]------------------------------------------
#
for($i = 0; $i < $total_posts; $i++)

#
#-----[ ]------------------------------------------
#
$user_id = $userdata['user_id'];
$counter = 0;

#
#-----[ ]------------------------------------------
#
$poster_id = $postrow[$i]['user_id'];


#
#-----[ ]------------------------------------------
#
if ( $user_id != ANONYMOUS )
{
$sql = "SELECT user_ignore
FROM " . IGNORE_TABLE . "
WHERE user_id = $user_id
AND user_ignore = $poster_id";
if( !$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not get data from ignore table', __LINE__, __FILE__, $sql);
}
$post_ignored = $db->sql_numrows($result);
}
else
{
$post_ignored = 0;
}

$counter++;

#
#-----[ ]------------------------------------------
#
$poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username'];

#
#-----[ ]------------------------------------------
#
if (( $post_ignored > 0 ) && ( $poster_id != ANONYMOUS ) && ( $post_bypass != $postrow[$i]['post_id'] ) && ($postrow[$i]['user_level'] != ADMIN) && ($postrow[$i]['user_level'] != MOD))
{

$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']);

//
// Define the little post icon
//
if ( $userdata['session_logged_in'] && $postrow[$i]['post_time'] > $userdata['user_lastvisit'] && $postrow[$i]['post_time'] > $topic_last_read )
{
$mini_post_img = $images['icon_minipost_new'];
$mini_post_alt = $lang['New_post'];
}
else
{
$mini_post_img = $images['icon_minipost'];
$mini_post_alt = $lang['Post'];
}

$message = $lang['Post_user_ignored'] . ' ' . sprintf($lang['Click_view_ignore'], '<a href="' . append_sid("viewtopic.$phpEx?p=" . $postrow[$i]['post_id'] . "&bypass=" . $postrow[$i]['post_id'] . "#" . $postrow[$i]['post_id']) . '">', '</a>');

$ignore = '';

$poster_rank = '';
$rank_image = '';
$poster_joined = '';
$poster_posts = '';
$poster_from = '';
$poster_avatar = '';
$poster_member = '';
$post_subject = '';

$user_sig = '';
$l_edited_by = '';

$mini_post_img = '';
$search_img = '';
$search = '';

$edit_img = '';
$edit = '';
$quote_img = '';
$quote = '';
$ip_img = '';
$ip = '';

$delpost_img = '';
$delpost = '';

$profile_img = '';
$profile = '';
$pm_img = '';
$pm = '';
$email_img = '';
$email = '';
$www_img = '';
$www = '';
$icq_status_img = '';
$icq_img = '';
$icq = '';
$aim_img = '';
$aim = '';
$msn_img = '';
$msn = '';
$yim_img = '';
$yim = '';

}
else
{

#
#-----[ ]------------------------------------------
#
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';

#
#-----[ ]------------------------------------------
#
$temp_url = append_sid("ignore.$phpEx?mode=add&username=$poster&topic=$topic_id");
$ignore = '<a href="' . $temp_url . '"><img src="' . $images['icon_ignore'] . '" alt="' . $lang['Ignore_add'] . '" title="' . $lang['Ignore_add'] . '" border="0" /></a>';


#
#-----[ ]------------------------------------------
#
}
else
{
$profile_img = '';
$profile = '';

#
#-----[ ]------------------------------------------
#
$ignore = '';


#
#-----[ ]------------------------------------------
#
else
{
$l_edited_by = '';
}


#
#-----[ ]------------------------------------------
#
}

#
#-----[ ]------------------------------------------
#
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];


#
#-----[ ]------------------------------------------
#
$row_color = ( !($counter % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($counter % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

#
#-----[ ]------------------------------------------
#
'MINI_POST_IMG' => $mini_post_img,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,

#
#-----[ ]------------------------------------------
#
'IGNORE' => $ignore,

#
#-----[ ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ ]------------------------------------------
#
<td valign="top" align="right" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
#
#-----[ ]------------------------------------------
#
<td valign="top" align="right" nowrap="nowrap">{postrow.IGNORE} {postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>

#
#-----[ ]------------------------------------------
#
templates/subSilver/subSilver.cfg

#
#-----[ ]------------------------------------------
#
$images['icon_latest_reply'] = "$current_template_images/icon_latest_reply.gif";
$images['icon_newest_reply'] = "$current_template_images/icon_newest_reply.gif";

#
#-----[ ]------------------------------------------
#
$images['icon_ignore'] = "$current_template_images/{LANG}/icon_ignore.gif";

#
#-----[ ]------------------------------------------
#

, - .
!


/ /
: webdeveloper
12:11 17-12-2010
...? ? ?! ...
1