Re: Tryng To Install A Phpbb Mod In Icy Phoenix.
Hi.
I have problem similar (or not?) to the one above.
I'm, trying to install one relativelly simple mod that worked perfectly in phpbb2. It is called "post edit time", and it forbid user to delete or modify his post after certain amount of time post is written (code posted below). Until now, I added sql changes and it went ok:
INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '10')
After that, I modified lang_admin.php, lang_main.php and posting.php files (my modded files attached). What i can't do (because i'm not php expert

), is to modify admin_board.php file, because in Icy's admin_board.php I can't find:
"L_ENABLE_PRUNE" => $lang['Enable_prune'],
or anything similar. Maybe i was looking in wrong file? Do Icy still uses admin_board.php the way phpbb uses it? Anyway, I think mod should work even without that last part (modifying sql manually should do the trick, correct me if I'm wrong), but it isn't. I don't get any errors, it simply doesn't work. User can edit or delete his post anytime.
Is there any chance someone of you guys check this out and give me at least a hint

. Or point me to right direction. Maybe Icy Phoenix already have this ability? I didn't manage to find it in ACP.
Thanks (post edit time mod code below)
## EasyMod 0.2.1a compliant
#################################################################
## MOD Title: Limited Post Edit time
## MOD Author: Shannado <sven@shannado.nl> (Sven) http://www.shannado.nl/forumorg
## MOD Author: kulinar <ptomoff@gmail.com> (Plamen) http://addurl.start.bg
## MOD Description: With this MOD the admin is able to set through the board configuaration, the time (in minutes) a user has
## to edit his/her post. When the value is set to '0', the time is unlimited.
## The check occurs only when the user hits the 'edit'button in the post.
## NOT when the user hits the submit button.
## Moderators & Admins can always edit the post
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 10 - 20 Minutes
## Files To Edit: posting.php,
## language/lang_english/lang_main.php,
## language/lang_english/lang_admin.php,
## admin/admin_board.php,
## templates/subSilver/admin/board_config_body.tpl
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
## ------------
## 01-01-2002 - 0.9.0 beta
## - Beta
##
## 01-01-2002 - 1.0.0 FINAL
## - Final
##
## 01-01-2002 - 1.0.1 FINAL
## - Made phpBB v2.0.2 compliant and EasyMod 0.0.7 compliant
##
## 05-12-2003 - 1.0.2 FINAL
## - Made phpBB v2.0.6 compliant and EasyMod 0.0.10a compliant
## - Adjusted to the new Template
##
## 19-09-2005 - 1.0.3 Final
## - Made phpBB v2.0.17 complaint and EasyMod 0.2.1a complaint
## - Added License Statement
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ SQL ]-------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '10')
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//limited post edit time MOD
$lang['edit_time'] = 'Post Edit time';
$lang['edit_time_explain'] = 'The time (in minutes) the user has to edit his/her post. Setting this value to 0, the time is unlimited.';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//limited post edit time MOD
$lang['edit_time_past'] = 'You are not allowed to edit your post. You have to edit your post within <b>%d</b> minutes, after you posted your message.';
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, p.post_time, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
#
#-----[ FIND ]------------------------------------------
#
else if ( $mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
message_die(GENERAL_MESSAGE, $lang['Topic_locked']);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// BEGIN - Limited post edit time MOD
//
if ( $mode == 'editpost' && !$is_auth['auth_mod'] && $board_config['edit_time'] != '10' && !$submit)
{
$current_time = time();
$difference_sec = $current_time - $post_info['post_time'] ;
$difference_min = ($current_time - $post_info['post_time']) / 60;
if ($difference_min > $board_config['edit_time'] )
{
$message = sprintf($lang['edit_time_past'],$board_config['edit_time']) . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
}
//
// END - Limited post edit time MOD
//
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
"L_ENABLE_PRUNE" => $lang['Enable_prune'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"L_EDIT_TIME" => $lang['edit_time'],
"L_EDIT_TIME_EXPLAIN" => $lang['edit_time_explain'],
#
#-----[ FIND ]------------------------------------------
#
"PRUNE_NO" => $prune_no,
#
#-----[ AFTER, ADD ]------------------------------------------
#
"EDIT_TIME" => $new['edit_time'],
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM