| how i fix this errror>?? | |
Posted: 01/18/2006 5:31 PM |
|
|
|
|
Owl |
Posts |
153 |
Word Cnt. |
5,208 |
BDay |
Feb 2 |
Sign |
Aquarius |
Sex |
|
|
|
|
Joined: Oct 13, 2005
Local time: 6:55 PM
Location: Rajan Pur
|
|
|
|
|
|
MY SECOND ERROR
I INSTAIL THIS MOD IN 2.0.19
Code:
|
##############################################################
## MOD Title: Posts Per Day
## MOD Author: mattyblah < > (matthew galaviz) www.generic-studios.com
## MOD Description: Limits a user's posts per day, which is set through the ACP.
## 0 is no limit, with any other value > 0 the number of posts.
## MOD Version: 1.1.0 BETA
##
## Installation Level: (easy)
## Installation Time: 10 Minutes
## Files To Edit: lang_admin.php,
## user_edit_body.tpl,
## admin_users.php,
## lang_main.php,
## functions_post.php,
## board_config_body.tpl,
## admin_board.php
## Included Files: (n/a)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes:
## None
##############################################################
## MOD History:
##
## ------------
## 07-10-2004 - 1.1.0 BETA - Added support for an all-user posts per day limit.
## 07-09-2004 - 1.0.0 BETA
## 07-06-2004 - 0.9.0 ALPHA
## - Beta
##############################################################
## Please back up all files and databases prior to installing mod.
##############################################################
#
#-----[ SQL ]-------------------------------------------
#
alter table phpbb_users add column user_postsperday int not null default 0
insert into phpbb_config (config_name, config_value) VALUES ('posts_per_day_limit', '0')
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['User_allowavatar'] = 'Can display avatar';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['User_postsperday'] = 'Posts Per Day';
#
#-----[ FIND ]------------------------------------------
#
$lang['Flood_Interval_explain'] = 'Number of seconds a user must wait between posts';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Board_Posts_Per_Day_Limit'] = 'Posts Per Day Limit';
$lang['Board_Posts_Per_Day_Limit_explain'] = 'Number of posts all users are allotted each day (0 is unlimited)';
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_SELECT_RANK}</span></td>
<td class="row2"><select name="user_rank">{RANK_SELECT_BOX}</select></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_POSTS_PER_DAY}</span></td>
<td class="row2"><input type="text" name="postsperday" value="{POSTS_PER_DAY}" size="3" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_FLOOD_INTERVAL} <br /><span class="gensmall">{L_FLOOD_INTERVAL_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="flood_interval" value="{FLOOD_INTERVAL}" /></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_BOARD_POSTS_PER_DAY_LIMIT} <br /><span class="gensmall">{L_BOARD_POSTS_PER_DAY_LIMIT_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="posts_per_day_limit" value="{BOARD_POSTS_PER_DAY_LIMIT}" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
$user_avatar_type = $this_userdata['user_avatar_type'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$user_postsperday = $this_userdata['user_postsperday'];
#
#-----[ FIND ]------------------------------------------
#
'ALLOW_AVATAR_NO' => (!$user_allowavatar) ? 'checked="checked"' : '',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POSTS_PER_DAY' => $user_postsperday,
#
#-----[ FIND ]------------------------------------------
#
$user_avatar_type = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar_type'] : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$user_postsperday = ( !empty($HTTP_POST_VARS['postsperday']) ) ? intval( $HTTP_POST_VARS['postsperday'] ) : 0;
#
#-----[ FIND ]------------------------------------------
#
SET " . $username_sql . $passwd_sql . "
after user_popup_pm = $popuppm,
#
#-----[ AFTER, ADD ]------------------------------------------
#
user_postsperday = $user_postsperday,
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
"L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"L_BOARD_POSTS_PER_DAY_LIMIT" => $lang['Board_Posts_Per_Day_Limit'],
"L_BOARD_POSTS_PER_DAY_LIMIT_EXPLAIN" => $lang['Board_Posts_Per_Day_Limit_explain'],
#
#-----[ FIND ]------------------------------------------
#
"FLOOD_INTERVAL" => $new['flood_interval'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"BOARD_POSTS_PER_DAY_LIMIT" => $new['posts_per_day_limit'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Flood_Error'] = 'You cannot make another post so soon after your last; please try again in a short while.';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Posts_Per_Day_Limit'] = 'Sorry, but you have reached your posts per day limit. Please try again tomorrow.';
$lang['Board_Posts_Per_Day_Limit'] = 'Sorry, but you have reached the board posts per day limit. Please try again tomorrow.';
#
#-----[ OPEN ]------------------------------------------
#
include/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
if ($row = $db->sql_fetchrow($result))
{
if (intval($row['last_post_time']) > 0 && ($current_time - intval($row['last_post_time'])) < intval($board_config['flood_interval']))
{
message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
}
}
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
if (($mode == 'newtopic' || $mode == 'reply') && ($userdata['user_postsperday'] > 0 || $board_config['posts_per_day_limit'] > 0))
{
$today = date('mdY');
$lo = mktime ( 0, 0, 0 , (int)substr($today, 0, 2), (int)substr($today, 2, 2), (int)substr($today, 4, 4));
$hi = mktime ( 23, 59, 59 , (int)substr($today, 0, 2), (int)substr($today, 2, 2), (int)substr($today, 4, 4));
$where_sql = "post_time BETWEEN $lo AND $hi AND poster_id = " . $userdata['user_id'];
$sql = "SELECT COUNT(*) AS posts_today
FROM " . POSTS_TABLE . "
WHERE $where_sql";
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
if (intval($row['posts_today']) >= intval($userdata['user_postsperday']) && intval($userdata['user_postsperday']) > 0)
{
message_die(GENERAL_MESSAGE, $lang['Posts_Per_Day_Limit']);
}
if (intval($row['posts_today']) >= intval($board_config['posts_per_day_limit']) && intval($board_config['posts_per_day_limit']) > 0)
{
message_die(GENERAL_MESSAGE, $lang['Board_Posts_Per_Day_Limit']);
}
}
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
|
MOD WORKING GOOD BUT ONE MISSING HERE
PLZ FIX THIS MISSING BOSS
THANKS |
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/20/2006 6:06 AM |
|
|
|
|
Owl |
Posts |
153 |
Word Cnt. |
5,208 |
BDay |
Feb 2 |
Sign |
Aquarius |
Sex |
|
|
|
|
Joined: Oct 13, 2005
Local time: 6:55 PM
Location: Rajan Pur
|
|
|
|
|
|
Nightrider Boss
are you there now a days ? |
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/20/2006 12:30 PM |
|
|
|
|
Citation |
Posts |
3160 |
Word Cnt. |
157,169 |
BDay |
Mar 11 |
Sign |
Pisces |
Sex |
|
|
|
|
Joined: Oct 12, 2005
Local time: 8:55 AM
|
|
|
|
|
|
javaidvip Nightrider has been having computer problems, I am sure when he is back he will help you. |
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/20/2006 6:02 PM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 9:55 AM
Location: St Pete, FL
|
|
|
|
|
|
I'm sorry everyone for not being around nearly as much. I am still swamped with work and requests and my repairs on PC isn't even complete yet. I am getting there though...
Javaidvip, did you add this part of the MOD to your lang_admin.php file???
Code:
|
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['User_allowavatar'] = 'Can display avatar';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['User_postsperday'] = 'Posts Per Day';
#
#-----[ FIND ]------------------------------------------
#
$lang['Flood_Interval_explain'] = 'Number of seconds a user must wait between posts';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Board_Posts_Per_Day_Limit'] = 'Posts Per Day Limit';
$lang['Board_Posts_Per_Day_Limit_explain'] = 'Number of posts all users are allotted each day (0 is unlimited)';
#
|
|
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/21/2006 7:16 AM |
|
|
|
|
Owl |
Posts |
153 |
Word Cnt. |
5,208 |
BDay |
Feb 2 |
Sign |
Aquarius |
Sex |
|
|
|
|
Joined: Oct 13, 2005
Local time: 6:55 PM
Location: Rajan Pur
|
|
|
|
|
|
YES BOSS I ADD THIS BUT STILL SAME |
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/23/2006 7:58 AM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 9:55 AM
Location: St Pete, FL
|
|
|
|
|
|
I'm sorry that my response is so tardy. I've had my hands full the last few days...
I would have to look at your code to see what is going on. If you added your language code and this is displaying incorrectly, then I couldn't begin to guess what is missing without taking a closer look...
|
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/24/2006 3:45 PM |
|
|
|
|
Owl |
Posts |
153 |
Word Cnt. |
5,208 |
BDay |
Feb 2 |
Sign |
Aquarius |
Sex |
|
|
|
|
Joined: Oct 13, 2005
Local time: 6:55 PM
Location: Rajan Pur
|
|
|
|
|
|
HI SIR
H R U SIR I SEND U FILES OLD AND NEW (see PM)
PLZ SEE THIS IMAGE MAKE ALL THIS SAME
U MAKE OLD FILE 2.0.17 THIS ALL OK BUT NOW I M USING 2.0.19
SO I SEND U 2.0.19 FILES WITH 2.0.17 FILES
U SEE 2.0.17 FILES AND SAME ACTION IN 2.0.19
NOW I FOURM I USING OLD FILES WHEN U SEND ME 2.0.19 FILES
I UPLOAD IN 2.0.19
THX |
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/26/2006 9:52 PM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 9:55 AM
Location: St Pete, FL
|
|
|
|
|
|
If I understand you correctly, you want me to make the 2.0.19 files look like your 2.0.17 files. Why not just update the 2.0.17 files to 2.0.19???
|
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/27/2006 5:47 AM |
|
|
|
|
Owl |
Posts |
153 |
Word Cnt. |
5,208 |
BDay |
Feb 2 |
Sign |
Aquarius |
Sex |
|
|
|
|
Joined: Oct 13, 2005
Local time: 6:55 PM
Location: Rajan Pur
|
|
|
|
|
|
SIR I UPDATE 2.0.17 TO 2.0.19
ALL MODS REMOVE NOW AGAIN I INSTAIL ALL MOD STEP BY STEP
BUT MY TOP POST SEE PIC I NEED THIS ACTION IN MY 2.0.19 FILES
SO I SEND U PM WITH 2.0.17 (OLD FILES) AND 2.0.19 (NEW FILES)
PLZ U INSTAIL THIS IN 2.0.19 FILES AND SEND ME I UPLAOD IN FTP
NOW MY FORUM RUNING 2.0.19 BUT TWO FILES VIEWTOPIC.PHP
AND VIEWTOPIC_BADAY.TPL OLD RUNNING PLZ EDIT 2.0.19FILES
THX |
|
|
|
|
Back to Top |
|
|
| how i fix this errror>?? | |
Posted: 01/27/2006 8:45 AM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 9:55 AM
Location: St Pete, FL
|
|
|
|
|
|
Make sure you create good backups of your files before overwriting them with these modified files. They are completely untested so there is no guarantee that they will work. You forgot to include your lang_main.php file, which needs to be modified as well...
2019.zip
|
|
|
|
|
Back to Top |
|
|
| Information | |
|