https://www.icyphoenix.com/viewtopic.php?f=26&t=1360 ----------------------------------- Joje Sun 18 Mar, 2007 13:45 Tryng To Install A Phpbb Mod In Icy Phoenix. ----------------------------------- Hi! im new about this but i want to say i installed Icy Phoenix and really love it. Ok im going to explain my problem, sorry about my bad english :p. Few days ago i installed a Icy Phoenix to make a website about Some games. Now im tryng to install a mod called [url=http://itemstats.free.fr/e107_plugins/content/content.php?content.5]Itemstats. This have compatibility for forums phpbb. But im tryng to get it work in the Icy Phoenix. Basically when i use [ item]Object[ /item ] search in some databases in some pages, and link the item in a tooltip. Really i dont know how to do it, but im tryng to insert. [code] include($phpbb_root_path . '/phpbb_config_itemstats.php'); include($phpbb_root_path . path_itemstats . '/phpbb_itemstats.php'); [/code] from the modifed bbcode.php in [url=http://itemstats.free.fr/download.php?view.14]Itemstats_phpbb didnt get problem with that, bah, no error in the page :p. After that i insert [code] include_once($phpbb_root_path . "phpbb_config_itemstats.php"); include_once($phpbb_root_path . path_itemstats . "/phpbb_itemstats.php"); $itemstats_ref = ' '; $template->assign_vars(array( 'ITEMSTATS_REFS' => $itemstats_ref, [/code] from the modified page_header.php in the Icyphoenix /includes/page_header.php Fatal error: Cannot redeclare itemstats_parse() (previously declared in /www/xxxxl/mydomain.com/html/itemstats/phpbb_itemstats.php:18) in /www/xxx/mydomain.com/html/itemstats/phpbb_itemstats.php on line 18 so i go to the phpbb_itemstats.php [code] function itemstats_parse($message) [/code] Im disoriented. Dont know if the problem is that file, or what im doing wrong. I need to change the overall_header.tpl and posting_body.tpl but that arent the problem for the moment i think. Any chance i can adapt that mod to Icy Phoenix? Again sorry about my terrible english and thanks so much for your time. Dont know if this is posted in the right section. ----------------------------------- Mighty Gorgon Thu 22 Mar, 2007 01:34 Re: Tryng To Install A Phpbb Mod In Icy Phoenix. ----------------------------------- Try to replace all the inserted INCLUDE with INCLUDE_ONCE and then let me know. If it isn't working then we will try in another way... :wink: ----------------------------------- omarska Tue 03 Apr, 2007 19:42 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: [code linenumbers=false]INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '10')[/code] 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: [code linenumbers=false]"L_ENABLE_PRUNE" => $lang['Enable_prune'],[/code] 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 :wink: . 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) [code linenumbers=false]## EasyMod 0.2.1a compliant ################################################################# ## MOD Title: Limited Post Edit time ## MOD Author: Shannado (Sven) http://www.shannado.nl/forumorg ## MOD Author: kulinar (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 %d 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']) . '

' . sprintf($lang['Click_view_message'], '', '') . '

' . sprintf($lang['Click_return_forum'], '', ''); 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[/code] ----------------------------------- difus Tue 03 Apr, 2007 22:40 Re: Tryng To Install A Phpbb Mod In Icy Phoenix. ----------------------------------- "L_ENABLE_PRUNE" => $lang['Enable_prune'], it is presents in admin_board.php "PRUNE_NO" => $prune_no, this one too ----------------------------------- difus Tue 03 Apr, 2007 22:48 Re: Tryng To Install A Phpbb Mod In Icy Phoenix. ----------------------------------- [quote user="Joje" post="10306"] Fatal error: Cannot redeclare itemstats_parse() (previously declared in /www/xxxxl/mydomain.com/html/itemstats/phpbb_itemstats.php:18) in /www/xxx/mydomain.com/html/itemstats/phpbb_itemstats.php on line 18 [/quote] it means to do same work twice same script presents in two positions [files] :roll: ----------------------------------- omarska Wed 04 Apr, 2007 00:32 Re: Tryng To Install A Phpbb Mod In Icy Phoenix. ----------------------------------- Thanx, difus. But now that i added in admin_board.php [code linenumbers=false] 'L_ENABLE_PRUNE' => $lang['Enable_prune'], 'L_EDIT_TIME' => $lang['edit_time'], 'L_EDIT_TIME_EXPLAIN' => $lang['edit_time_explain'], [/code] and [code linenumbers=false]'PRUNE_NO' => $prune_no, 'EDIT_TIME' => $new['edit_time'],[/code], it still doesnt work. File is domain.com/adm/admin_board.php, right? No errors, user just go in and delete/edit his posts. I forgot to mention it earlier, when user edit his post, there is no time of last edit (last edited by....), below post text, that space is empty. Can this mod work at all in Icy? What am I doing wrong? ----------------------------------- difus Wed 04 Apr, 2007 00:46 Re: Tryng To Install A Phpbb Mod In Icy Phoenix. ----------------------------------- I don't know this mod but maybe you have to enable or config it in ACP => users did you make changes for all languages ? ----------------------------------- omarska Wed 04 Apr, 2007 06:59 Re: Tryng To Install A Phpbb Mod In Icy Phoenix. ----------------------------------- Yes, i have changed English and Serbian which are only 2 languages that i have installed on my Icy. However, in mod source there are one more file mentioned, templates/subSilver/admin/board_config_body.tpl, which is default template of phpbb2. I haven't found traces of editing this file in mod source. This is only visual, right? Shouldn't make a difference if sql part is done righ (which i think it is). Anyway, if you know some other way to block user from deleting or changing his post after some time, share it, it will help me too. Thanx again. ----------------------------------- tonyf12 Wed 04 Apr, 2007 22:26 Re: Tryng To Install A Phpbb Mod In Icy Phoenix. ----------------------------------- [quote user="omarska" post="11263"]Yes, i have changed English and Serbian which are only 2 languages that i have installed on my Icy. However, in mod source there are one more file mentioned, templates/subSilver/admin/board_config_body.tpl, which is default template of phpbb2. I haven't found traces of editing this file in mod source. This is only visual, right? Shouldn't make a difference if sql part is done righ (which i think it is). Anyway, if you know some other way to block user from deleting or changing his post after some time, share it, it will help me too. Thanx again.[/quote] It might, templates can crash your forum (I had to upload XS twice because of a corrupt template) Try doing the change to the IP default template.