> 1 <
Kırık Link Bildir! #128273 08-10-2006 07:52 GMT-1 saat
Kod:
Kod:
##############################################################
##
## MOD Title: Fake Online Users
##
## MOD Author: aUsTiN => [email protected]
##
## MOD Description: This mod will allow you to keep users online so it always appears your board is active.
##
## MOD Version: 1.0.0
##
## MOD Help: http://www.phpbb-tweaks.com/
##
## Installation Level: Easy
##
## Installation Time: 3 Minutes
##
## Files To Edit: 4
##
## Included Files: 0
##
##############################################################
##############################################################
##
## Author Notes:
##
## Copyright © aUsTiN-Inc, 2003/5
##
##############################################################
##
## MOD History:
##
## Jul 19th 2005 - Version 1.0.0
## - Released
##
##############################################################
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##
##############################################################
##
## Definitions:
##
## Root: Folder your config.php is located
## templates/*/: Your template folder (All template folders are suggested)
## lang_*/: Your current language folder (All lang folders are suggested)
##
##############################################################
-----------------------------------
----[ SQL ]------------------------
-----------------------------------
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fake_online_users', '');
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
admin/admin_board.php
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
"L_YES" => $lang['Yes'],
-----------------------------------
----[ BEFORE, ADD ]----------------
-----------------------------------
#======================================================================= |
#==== Start: == Fake Online Users ====================================== |
#==== v1.0.0 =========================================================== |
#====
'L_FAKE_USERS' => $lang['fake_users_admin'],
'L_FAKE_USERS_EXP' => $lang['fake_users_admin_exp'],
'FAKE_USERS' => $board_config['fake_online_users'],
#====
#==== Author: aUsTiN [[email protected]] [http://phpbb-tweaks.com] = |
#==== End: ==== Fake Online Users ====================================== |
#======================================================================= |
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
includes/page_header.php
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
if ( empty($online_userlist) )
{
$online_userlist = $lang['None'];
-----------------------------------
----[ BEFORE, ADD ]----------------
-----------------------------------
#======================================================================= |
#==== Start: == Fake Online Users ====================================== |
#==== v1.0.0 =========================================================== |
#====
if ($board_config['fake_online_users'])
{
$fake_online_userlist = explode(',', $board_config['fake_online_users']);
$fake_online_users = array();
for ($x = 0; $x < count($fake_online_userlist); $x++)
$fake_online_users[] = $fake_online_userlist[$x];
$sql_split = explode('FROM', $sql);
$fake_sql = $sql_split[0];
$fake_select = explode(',', str_replace('SELECT', '', str_replace(" ", '', $fake_sql)));
$fake_field_count = $fake_online_count = 0;
for ($x = 0; $x < count($fake_select); $x++)
{
if (strstr($fake_select[$x], 'u.'))
$fake_field_count++;
}
for ($x = 0; $x < count($fake_select); $x++)
{
if (strstr($fake_select[$x], 'u.'))
$fake_fields .= ($x < ($fake_field_count - 1)) ? str_replace('u.', '', $fake_select[$x]) .', ' : str_replace('u.', '', $fake_select[$x]);
}
for ($x = 0; $x < count($fake_online_users); $x++)
$fake_sql_or .= (!$fake_sql_or) ? ' user_id = '. $fake_online_users[$x] : ' OR user_id = '. $fake_online_users[$x];
$q = 'SELECT '. $fake_fields
.' FROM '. USERS_TABLE .'
WHERE '. $fake_sql_or;
$r = $db->sql_query($q);
$rows = $db->sql_fetchrowset($r);
if (empty($online_userlist))
{
for ($x = 0; $x < count($rows); $x++)
{
if (!strstr($online_userlist, $rows[$x]['username']))
{
$style_color = $user_link = '';
if ($rows[$x]['user_level'] == ADMIN)
{
$rows[$x]['username'] = '<b>'. $rows[$x]['username'] .'</b>';
$style_color = 'style="color:#'. $theme['fontcolor3'] .'"';
}
elseif ($rows[$x]['user_level'] == MOD)
{
$rows[$x]['username'] = '<b>'. $rows[$x]['username'] .'</b>';
$style_color = 'style="color:#'. $theme['fontcolor2'] .'"';
}
$user_link = '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $rows[$x]['user_id']) .'"'. $style_color .'>'. $rows[$x]['username'] .'</a>';
$online_userlist .= ( ($x == count($rows)) || ($x == 0) ) ? $user_link : ', '. $user_link;
$fake_online_count++;
}
}
}
else
{
for ($x = 0; $x < count($rows); $x++)
{
if (!strstr($online_userlist, $rows[$x]['username']))
{
$style_color = $user_link = '';
if ($rows[$x]['user_level'] == ADMIN)
{
$rows[$x]['username'] = '<b>'. $rows[$x]['username'] .'</b>';
$style_color = 'style="color:#'. $theme['fontcolor3'] .'"';
}
elseif ($rows[$x]['user_level'] == MOD)
{
$rows[$x]['username'] = '<b>'. $rows[$x]['username'] .'</b>';
$style_color = 'style="color:#'. $theme['fontcolor2'] .'"';
}
$user_link = '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $rows[$x]['user_id']) .'"'. $style_color .'>'. $rows[$x]['username'] .'</a>';
$online_userlist .= ($x == count($rows)) ? $user_link : ', '. $user_link;
$fake_online_count++;
}
}
}
$logged_visible_online += $fake_online_count;
}
#====
#==== Author: aUsTiN [[email protected]] [http://phpbb-tweaks.com] = |
#==== End: ==== Fake Online Users ====================================== |
#======================================================================= |
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
language/lang_*/lang_admin.php
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
?>
-----------------------------------
----[ BEFORE, ADD ]----------------
-----------------------------------
#======================================================================= |
#==== Start: == Fake Online Users ====================================== |
#==== v1.0.0 =========================================================== |
#====
$lang['fake_users_admin'] = 'Fake Online Userlist';
$lang['fake_users_admin_exp'] = 'Seperate each user by a comma. For each user you want to show online, enter their user_id, not username.';
#====
#==== Author: aUsTiN [[email protected]] [http://phpbb-tweaks.com] = |
#==== End: ==== Fake Online Users ====================================== |
#======================================================================= |
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
templates/*/admin/board_config_body.tpl
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
<tr>
<td class="row1">{L_ENABLE_PRUNE}</td>
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES} <input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
</tr>
-----------------------------------
----[ AFTER, ADD ]-----------------
-----------------------------------
<!-- Start: Fake Online Users -->
<tr>
<td class="row1">{L_FAKE_USERS}<br /><span class="gensmall">{L_FAKE_USERS_EXP}</span></td>
<td class="row2"><input type="text" class="post" value="{FAKE_USERS}" name="fake_online_users"></td>
</tr>
<!-- End: Fake Online Users -->
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
EoM
##############################################################
##
## MOD Title: Fake Online Users
##
## MOD Author: aUsTiN => [email protected]
##
## MOD Description: This mod will allow you to keep users online so it always appears your board is active.
##
## MOD Version: 1.0.0
##
## MOD Help: http://www.phpbb-tweaks.com/
##
## Installation Level: Easy
##
## Installation Time: 3 Minutes
##
## Files To Edit: 4
##
## Included Files: 0
##
##############################################################
##############################################################
##
## Author Notes:
##
## Copyright © aUsTiN-Inc, 2003/5
##
##############################################################
##
## MOD History:
##
## Jul 19th 2005 - Version 1.0.0
## - Released
##
##############################################################
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##
##############################################################
##
## Definitions:
##
## Root: Folder your config.php is located
## templates/*/: Your template folder (All template folders are suggested)
## lang_*/: Your current language folder (All lang folders are suggested)
##
##############################################################
-----------------------------------
----[ SQL ]------------------------
-----------------------------------
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fake_online_users', '');
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
admin/admin_board.php
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
"L_YES" => $lang['Yes'],
-----------------------------------
----[ BEFORE, ADD ]----------------
-----------------------------------
#======================================================================= |
#==== Start: == Fake Online Users ====================================== |
#==== v1.0.0 =========================================================== |
#====
'L_FAKE_USERS' => $lang['fake_users_admin'],
'L_FAKE_USERS_EXP' => $lang['fake_users_admin_exp'],
'FAKE_USERS' => $board_config['fake_online_users'],
#====
#==== Author: aUsTiN [[email protected]] [http://phpbb-tweaks.com] = |
#==== End: ==== Fake Online Users ====================================== |
#======================================================================= |
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
includes/page_header.php
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
if ( empty($online_userlist) )
{
$online_userlist = $lang['None'];
-----------------------------------
----[ BEFORE, ADD ]----------------
-----------------------------------
#======================================================================= |
#==== Start: == Fake Online Users ====================================== |
#==== v1.0.0 =========================================================== |
#====
if ($board_config['fake_online_users'])
{
$fake_online_userlist = explode(',', $board_config['fake_online_users']);
$fake_online_users = array();
for ($x = 0; $x < count($fake_online_userlist); $x++)
$fake_online_users[] = $fake_online_userlist[$x];
$sql_split = explode('FROM', $sql);
$fake_sql = $sql_split[0];
$fake_select = explode(',', str_replace('SELECT', '', str_replace(" ", '', $fake_sql)));
$fake_field_count = $fake_online_count = 0;
for ($x = 0; $x < count($fake_select); $x++)
{
if (strstr($fake_select[$x], 'u.'))
$fake_field_count++;
}
for ($x = 0; $x < count($fake_select); $x++)
{
if (strstr($fake_select[$x], 'u.'))
$fake_fields .= ($x < ($fake_field_count - 1)) ? str_replace('u.', '', $fake_select[$x]) .', ' : str_replace('u.', '', $fake_select[$x]);
}
for ($x = 0; $x < count($fake_online_users); $x++)
$fake_sql_or .= (!$fake_sql_or) ? ' user_id = '. $fake_online_users[$x] : ' OR user_id = '. $fake_online_users[$x];
$q = 'SELECT '. $fake_fields
.' FROM '. USERS_TABLE .'
WHERE '. $fake_sql_or;
$r = $db->sql_query($q);
$rows = $db->sql_fetchrowset($r);
if (empty($online_userlist))
{
for ($x = 0; $x < count($rows); $x++)
{
if (!strstr($online_userlist, $rows[$x]['username']))
{
$style_color = $user_link = '';
if ($rows[$x]['user_level'] == ADMIN)
{
$rows[$x]['username'] = '<b>'. $rows[$x]['username'] .'</b>';
$style_color = 'style="color:#'. $theme['fontcolor3'] .'"';
}
elseif ($rows[$x]['user_level'] == MOD)
{
$rows[$x]['username'] = '<b>'. $rows[$x]['username'] .'</b>';
$style_color = 'style="color:#'. $theme['fontcolor2'] .'"';
}
$user_link = '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $rows[$x]['user_id']) .'"'. $style_color .'>'. $rows[$x]['username'] .'</a>';
$online_userlist .= ( ($x == count($rows)) || ($x == 0) ) ? $user_link : ', '. $user_link;
$fake_online_count++;
}
}
}
else
{
for ($x = 0; $x < count($rows); $x++)
{
if (!strstr($online_userlist, $rows[$x]['username']))
{
$style_color = $user_link = '';
if ($rows[$x]['user_level'] == ADMIN)
{
$rows[$x]['username'] = '<b>'. $rows[$x]['username'] .'</b>';
$style_color = 'style="color:#'. $theme['fontcolor3'] .'"';
}
elseif ($rows[$x]['user_level'] == MOD)
{
$rows[$x]['username'] = '<b>'. $rows[$x]['username'] .'</b>';
$style_color = 'style="color:#'. $theme['fontcolor2'] .'"';
}
$user_link = '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $rows[$x]['user_id']) .'"'. $style_color .'>'. $rows[$x]['username'] .'</a>';
$online_userlist .= ($x == count($rows)) ? $user_link : ', '. $user_link;
$fake_online_count++;
}
}
}
$logged_visible_online += $fake_online_count;
}
#====
#==== Author: aUsTiN [[email protected]] [http://phpbb-tweaks.com] = |
#==== End: ==== Fake Online Users ====================================== |
#======================================================================= |
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
language/lang_*/lang_admin.php
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
?>
-----------------------------------
----[ BEFORE, ADD ]----------------
-----------------------------------
#======================================================================= |
#==== Start: == Fake Online Users ====================================== |
#==== v1.0.0 =========================================================== |
#====
$lang['fake_users_admin'] = 'Fake Online Userlist';
$lang['fake_users_admin_exp'] = 'Seperate each user by a comma. For each user you want to show online, enter their user_id, not username.';
#====
#==== Author: aUsTiN [[email protected]] [http://phpbb-tweaks.com] = |
#==== End: ==== Fake Online Users ====================================== |
#======================================================================= |
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
templates/*/admin/board_config_body.tpl
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
<tr>
<td class="row1">{L_ENABLE_PRUNE}</td>
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES} <input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
</tr>
-----------------------------------
----[ AFTER, ADD ]-----------------
-----------------------------------
<!-- Start: Fake Online Users -->
<tr>
<td class="row1">{L_FAKE_USERS}<br /><span class="gensmall">{L_FAKE_USERS_EXP}</span></td>
<td class="row2"><input type="text" class="post" value="{FAKE_USERS}" name="fake_online_users"></td>
</tr>
<!-- End: Fake Online Users -->
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
EoM
Bunu ilk beğenen siz olun
Hata Oluştu