Unofficial modifications
nieoficjalne modyfikacje for?w phpBB by Przemo

Modyfikacje mniejsze - ShoutBox na Portalu i/lub w widoku temat?w

karalajna3 - Nie 29 Kwi, 2007
Temat postu: ShoutBox na Portalu i/lub w widoku temat?w
Jest to w 100% moja modyfikacja, stworzona dla w?asnych potrzeb,
udost?pniam, bo mo?e si? komu? przyda? :)

Modyfikacja jest ?atwa i szybka.

Wiadomo?? ukryta / Hidden message
Aby zobaczy? wiadomo?? postaw piwo autorowi piwo.
SB NA PORTALU

//

w pliku root/portal.php znajd?:
Kod
// Generate the page
if ( !$userdata['session_logged_in'] )
{
$template->assign_block_vars('logged_out', array());
}
else
{
$template->assign_block_vars('logged_in', array());
}


dodaj po:
Kod
if ( $check_cache = sql_cache('check', 'shoutbox_config') )
{
include($check_cache);
}
else
{
$sql = "SELECT *
FROM " . SHOUTBOX_CONFIG_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query shoutbox config information', '', __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
$shoutbox_config[$row['config_name']] = $row['config_value'];
}
sql_cache('write', 'shoutbox_config', $shoutbox_config);
}

if ( $shoutbox_config['shoutbox_on'] && $userdata['shoutbox'] )
{
$shoutbox_config['banned_user_id_view'] = $GLOBALS['shoutbox_config']['banned_user_id_view'];
if ( strstr($shoutbox_config['banned_user_id_view'], ',') )
{
$fids = explode(',', $shoutbox_config['banned_user_id_view']);
while( list($foo, $id) = each($fids) )
{
$fid[] = intval( trim($id) );
}
}
else
{
$fid[] = intval( trim($shoutbox_config['banned_user_id_view']) );
}
reset($fid);

if ( in_array($userdata['user_id'], $fid) == false && ($shoutbox_config['allow_users_view'] || $userdata['session_logged_in']) && ($shoutbox_config['allow_users'] || $shoutbox_config['allow_users_view'] || $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD))
{
include($phpbb_root_path . 'shoutbox.'.$phpEx);
}
}


w pliku templates/NAZWA_STYLU/portal_body.tpl (na samym dole) znajd?:
Kod

{END_RIGHT_PANEL_OFF}
</tr>
</table>


dodaj po:
Kod
{SHOUTBOX_DISPLAY}


SB W WIDOKU TEMAT?W

//

w root/viewforum.php znajd?:
Kod
$template->assign_block_vars('switch_no_topics', array() );

}


dodaj po:
Kod
if ( $check_cache = sql_cache('check', 'shoutbox_config') )
{
include($check_cache);
}
else
{
$sql = "SELECT *
FROM " . SHOUTBOX_CONFIG_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query shoutbox config information', '', __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
$shoutbox_config[$row['config_name']] = $row['config_value'];
}
sql_cache('write', 'shoutbox_config', $shoutbox_config);
}

if ( $shoutbox_config['shoutbox_on'] && $userdata['shoutbox'] )
{
$shoutbox_config['banned_user_id_view'] = $GLOBALS['shoutbox_config']['banned_user_id_view'];
if ( strstr($shoutbox_config['banned_user_id_view'], ',') )
{
$fids = explode(',', $shoutbox_config['banned_user_id_view']);
while( list($foo, $id) = each($fids) )
{
$fid[] = intval( trim($id) );
}
}
else
{
$fid[] = intval( trim($shoutbox_config['banned_user_id_view']) );
}
reset($fid);

if ( in_array($userdata['user_id'], $fid) == false && ($shoutbox_config['allow_users_view'] || $userdata['session_logged_in']) && ($shoutbox_config['allow_users'] || $shoutbox_config['allow_users_view'] || $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD))
{
include($phpbb_root_path . 'shoutbox.'.$phpEx);
}
}


w templates/NAZWA_STYLU/viewforum_body.tpl znajd? (na samym dole):

Kod
<td><span>{S_AUTH_LIST}</span></td>
</tr>
</table>


dodaj po:
Kod

{SHOUTBOX_DISPLAY}


dema chyba nie potrzebujecie?! ;)


Pozdrawiam

Morgu? - Czw 17 Maj, 2007

Niez?a jest. przyda mi si
Jarek 11 - Nie 12 Sie, 2007

co znaczy to w pliku root

[ Dodano: Nie 12 Sie, 2007 ]
a ju? wiem.


Powered by phpBB modified by Przemo © 2003 phpBB Group