phpBB2
, :



#############################################################
## :
## :
## .
##
## :
## : 15
## : 14
##
## index.php
## modcp.php
## posting.php
## viewforum.php
## search.php
## admin/admin_forumauth.php
## admin/admin_ug_auth.php
## includes/auth.php
## includes/constants.php
## includes/functions.php
## language/lang_bulgarian/lang_admin.php
## language/lang_bulgarian/lang_main.php
## templates/subSilver/subSilver.cfg
## templates/subSilver/viewforum_body.tpl
##
## : 2
##
## forum/templates/subSilver/images/folder_global_announce.gif
## forum/templates/subSilver/images/folder_global_announce_new.gif
##
## - -
##
##
##############################################################
## , Back Up
##############################################################
#
#-----[ SQL ]-------------------------------------------------
#
ALTER TABLE phpbb_forums ADD auth_globalannounce TINYINT (2) DEFAULT "3" NOT NULL AFTER auth_announce;
ALTER TABLE phpbb_auth_access ADD auth_globalannounce TINYINT (1) not null AFTER auth_announce;

#
#-----[ ]------------------------------------------------
#
copy root/templates/subSilver/images/folder_global_announce.gif to templates/subSilver/images/folder_global_announce.gif
copy root/templates/subSilver/images/folder_global_announce_new.gif to templates/subSilver/images/folder_global_announce_new.gif

#
#-----[ ]------------------------------------------------
#
index.php

#
#-----[ ]------------------------------------------------
#
FROM " . CATEGORIES_TABLE . " c

#
#-----[ ]------------------------------------------
#
".(($userdata['user_level']!=ADMIN)? "WHERE c.cat_id<>'".HIDDEN_CAT."'" :"" )."
#
#-----[ ]------------------------------------------------
#
modcp.php

#
#-----[ ]------------------------------------------------
#
if ( $row['topic_type'] == POST_ANNOUNCE )

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

// Start add - Global announcement MOD
if ( $row['topic_type'] == POST_GLOBAL_ANNOUNCE )
{
$folder_img = $images['folder_global_announce'];
$folder_alt = $lang['Global_announcement'];
}else
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
if ( $topic_type == POST_ANNOUNCE )

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

// Start add - Global announcement MOD
if ( $topic_type == POST_GLOBAL_ANNOUNCE )
{
$topic_type = $lang['Topic_global_announcement'] . ' ';
}else
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
posting.php

#
#-----[ ]------------------------------------------
#
$topic_type = ( in_array($topic_type, array(POST_NORMAL


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

#
#-----[ ]------------------------------------------
#
, POST_GLOBAL_ANNOUNCE


#
#-----[ ]------------------------------------------------
#
if ( $topic_type == POST_ANNOUNCE )

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

// Start add - Global announcement MOD
if ( $topic_type == POST_GLOBAL_ANNOUNCE )
{
$is_auth_type = 'auth_globalannounce';
}
else
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
$topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;

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

#
#-----[ ]---------------------------------
#
&& !$is_auth['auth_globalannounce']

#
#-----[ ]------------------------------------------------
#
$topic_type_toggle .= ' /> ' . $lang['Post_Announcement'] . '';
}

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

// Start add - Global announcement MOD
if( $is_auth['auth_globalannounce'] )
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_GLOBAL_ANNOUNCE . '"';
if ( $post_data['topic_type'] == POST_GLOBAL_ANNOUNCE || $topic_type == POST_GLOBAL_ANNOUNCE )

if ( $post_data['topic_type'] == POST_GLOBAL_ANNOUNCE )
{
$topic_type_toggle .= ' checked="checked"';
}
$topic_type_toggle .= ' /> ' . $lang['Post_global_announcement'] . '';
}
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
search.php

#
#-----[ ]------------------------------------------------
#
if ($topic_type == POST_ANNOUNCE)
{
$topic_type =
}

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

// Start add - Global announcement MOD
if($topic_type == POST_GLOBAL_ANNOUNCE )
{
$topic_type = $lang['Topic_global_announcement'] . " ";
} else
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
else if ( $searchset[$i]['topic_type'] == POST_ANNOUNCE )

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

// Start add - Global announcement MOD
else if ( $searchset[$i]['topic_type'] == POST_GLOBAL_ANNOUNCE )
{
$folder = $images['folder_global_announce'];
$folder_new = $images['folder_global_announce_new'];
}
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
$sql = "SELECT c.cat_title, c.cat_id, f.forum_name, f.forum_id
FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
WHERE f.cat_id = c.cat_id

#
#-----[ ]------------------------------------------
#
".(($userdata['user_level'] == ADMIN)? "" : " AND c.cat_id<>'".HIDDEN_CAT."'" )."
#
#-----[ ]------------------------------------------------
#
viewforum.php

#
#-----[ ]------------------------------------------------
#
//
// All announcement data, this keeps announcements
// on each viewforum page ...
//

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

//
// All GLOBAL announcement data, this keeps GLOBAL announcements
// on each viewforum page ...
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
WHERE t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_GLOBAL_ANNOUNCE . "
ORDER BY t.topic_last_post_id DESC ";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
}

$topic_rowset = array();
$total_announcements = 0;
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_announcements++;
}

$db->sql_freeresult($result);
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
$topic_rowset = array();
$total_announcements = 0;

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

// 2 rows deleted - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
AND t.topic_type <> " . POST_ANNOUNCE . "

#
#-----[ ]------------------------------------------
#
AND t.topic_type <> " . POST_GLOBAL_ANNOUNCE . "
#
#-----[ ]------------------------------------------------
#
'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'],

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

// Start add - Global announcement MOD
'FOLDER_GLOBAL_ANNOUNCE_IMG' => $images['folder_global_announce'],
'FOLDER_GLOBAL_ANNOUNCE_NEW_IMG' => $images['folder_global_announce_new'],
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
'L_ANNOUNCEMENT' => $lang['Post_Announcement'],

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

// Start add - Global announcement MOD
'L_GLOBAL_ANNOUNCEMENT' => $lang['Post_global_announcement'],
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}

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

// Start add - Global announcement MOD
else if( $topic_type == POST_GLOBAL_ANNOUNCE )
{
$topic_type = $lang['Topic_global_announcement'] . ' ';
}
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = $images['folder_announce'];

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

// Start add - Global announcement MOD
if( $topic_rowset[$i]['topic_type'] == POST_GLOBAL_ANNOUNCE )
{
$folder = $images['folder_global_announce'];
$folder_new = $images['folder_global_announce_new'];
}
else
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
admin/admin_forumauth.php

#
#-----[ ]------------------------------------------------
#
// View Read Post Reply Edit Delete Sticky Announce Vote Poll

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

// Globalannounce added

#
#-----[ ]------------------------------------------------
#
$simple_auth_ary = array(
0 => array(

#
#-----[ ]----------------------------------------
#
),

#
#-----[ ]---------------------------------
#
, AUTH_MOD

#
#-----[ ]------------------------------------------------
#
1 => array(

#
#-----[ ]----------------------------------------
#
),

#
#-----[ ]---------------------------------
#
, AUTH_MOD

#
#-----[ ]------------------------------------------------
#
2 => array(

#
#-----[ ]----------------------------------------
#
),

#
#-----[ ]---------------------------------
#
, AUTH_MOD

#
#-----[ ]------------------------------------------------
#
3 => array(

#
#-----[ ]----------------------------------------
#
),

#
#-----[ ]---------------------------------
#
, AUTH_MOD

#
#-----[ ]------------------------------------------------
#
4 => array(

#
#-----[ ]----------------------------------------
#
),

#
#-----[ ]---------------------------------
#
, AUTH_MOD

#
#-----[ ]------------------------------------------------
#
5 => array(

#
#-----[ ]----------------------------------------
#
),

#
#-----[ ]---------------------------------
#
, AUTH_MOD

#
#-----[ ]------------------------------------------------
#
6 => array(

#
#-----[ ]----------------------------------------
#
),

#
#-----[ ]---------------------------------
#
, AUTH_MOD

#
#-----[ ]------------------------------------------------
#
$forum_auth_fields = array(

#
#-----[ ]----------------------------------------
#
);

#
#-----[ ]---------------------------------
#
, 'auth_globalannounce'

#
#-----[ ]------------------------------------------------
#
']);

#
#-----[ ]----------------------------------------
#
);

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

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

// Start add - Global announcement MOD
'auth_globalannounce' => $lang['Globalannounce']);
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
admin/admin_ug_auth.php

#
#-----[ ]------------------------------------------------
#
$forum_auth_fields = array(

#
#-----[ ]----------------------------------------
#
);

#
#-----[ ]---------------------------------
#
, 'auth_globalannounce'

#
#-----[ ]------------------------------------------------
#
'auth_announce' => AUTH_ANNOUNCE,

#
#-----[ ]------------------------------------------------
#
);

#
#-----[ ]----------------------------------------
#
);

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

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

// Start add - Global announcement MOD
'auth_globalannounce' => AUTH_GLOBALANNOUNCE);
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
']);

#
#-----[ ]----------------------------------------
#
);

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

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

// Start add - Global announcement MOD
'auth_globalannounce' => $lang['Globalannounce']);
// End add - Global announcement MOD

#
#-----[ ]------------------------------------------------
#
SET auth_view = 0,
WHERE

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

#
#-----[ ]---------------------------------
#
, auth_globalannounce = 0

#
#-----[ ]------------------------------------------------
#
SET auth_view = 0,
WHERE

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

#
#-----[ ]---------------------------------
#
, auth_globalannounce = 0

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

#
#-----[ ]------------------------------------------------
#
case AUTH_ALL:
$a_sql = '

#
#-----[ ]----------------------------------------
#
';

#
#-----[ ]---------------------------------
#
, a.auth_globalannounce

#
#-----[ ]------------------------------------------------
#
$auth_fields = array(

#
#-----[ ]----------------------------------------
#
);

#
#-----[ ]---------------------------------
#
, 'auth_globalannounce'

#
#-----[ ]------------------------------------------------
#
default:
break;

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

// Start add - Global announcement MOD
case AUTH_GLOBALANNOUNCE:
$a_sql = 'a.auth_globalannounce';
$auth_fields = array('auth_globalannounce');
break;
// End add - Global announcement MOD

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

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

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

// Start add - Global announcement MOD
define('AUTH_GLOBALANNOUNCE', 12);
define('HIDDEN_CAT', 0); // NOTE: change this value to the forum id, of the forum, witch you would like to be hidden
// End add - Global announcement MOD

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

#
#-----[ ]------------------------------------------------
#
function make_jumpbox
{
global

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

#
#-----[ ]---------------------------------
#
, $userdata

#
#-----[ ]------------------------------------------------
#
$sql = "SELECT
FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
WHERE f.cat_id = c.cat_id

#
#-----[ ]------------------------------------------
#
".(($userdata['user_level'] == ADMIN)? "" : " AND c.cat_id<>'".HIDDEN_CAT."'" )."
#
#-----[ ]------------------------------------------------
#
language/lang_bulgarian/lang_admin.php

#
#-----[ ]------------------------------------------------
#
?>

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

// Start add - Global announcement MOD
$lang['Globalannounce'] ='Global Announce';
// End add - Global announcement MOD

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

#
#-----[ ]------------------------------------------------
#
?>

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

// Start add - Global announcement MOD
$lang['Topic_global_announcement']='<b> :</b>';
$lang['Post_global_announcement'] = ' ';
// End add - Global announcement MOD

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

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

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

// Start add - Global announcement MOD
$images['folder_global_announce'] = "$current_template_images/folder_global_announce.gif";
$images['folder_global_announce_new'] = "$current_template_images/folder_global_announce_new.gif";
// End add - Global announcement MOD

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

#
#-----[ ]------------------------------------------------
#
<td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ANNOUNCEMENT}" width="19" height="18" /></td>
<td class="gensmall">{L_ANNOUNCEMENT}</td>

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

<!-- Start replacement - Global announcement MOD -->
<td width="20" align="center"><img src="{FOLDER_GLOBAL_ANNOUNCE_IMG}" alt="{L_GLOBAL_ANNOUNCEMENT}" width="19" height="18" /></td>
<td class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</td>
<!-- End replacement - Global announcement MOD -->

#
#-----[ ]------------------------------------------------
#
<td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_STICKY}" width="19" height="18" /></td>
<td class="gensmall">{L_STICKY}</td>

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

<!-- Start replacement - Global announcement MOD -->
<td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ANNOUNCEMENT}" width="19" height="18" /></td>
<td class="gensmall">{L_ANNOUNCEMENT}</td>
<!-- End replacement - Global announcement MOD -->

#
#-----[ ]------------------------------------------------
#
<td class="gensmall"><img src="{FOLDER_LOCKED_IMG}"
<td class="gensmall">{L_NO_NEW_POSTS_LOCKED}</td>

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

<!-- Start add - Global announcement MOD -->
<td></td>
<td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_STICKY}" width="19" height="18" /></td>
<td class="gensmall">{L_STICKY}</td>
<!-- End add - Global announcement MOD -->

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

- , .
!


/ /
: BuLLDoZeRa
1:54 05-05-2010
! !
: pro
19:00 06-05-2010
?
: Angry
14:51 07-05-2010
pro, .
1