https://www.icyphoenix.com/viewtopic.php?f=28&t=6453 ----------------------------------- Lopalong Fri 11 Sep, 2009 13:24 Deprecated -BETA - Limit Users Post Edit TIme ----------------------------------- Thanks to the Beta Testers, but this Beta has been removed so that it can be written up as a proper MOD. Danke, to one and all! :mryellow: ----------------------------------- spydie Fri 11 Sep, 2009 14:48 Re: BETA - Limit Users Post Edit TIme ----------------------------------- Very useful Lopa. I´m testing it localy, but i´m thinking of trying it on my livesite. Since there´s no visual problems turning up at the moment. I´ll give you more feedback in a few Day´s of testing ----------------------------------- Mighty Gorgon Fri 11 Sep, 2009 23:19 Re: BETA - Limit Users Post Edit TIme ----------------------------------- I confirm that this feature could be useful under certain conditions. I'll think about adding it to Icy Phoenix. If I'll do that, I'll do on a per forum basis. ----------------------------------- Mighty Gorgon Fri 11 Sep, 2009 23:23 Re: BETA - Limit Users Post Edit TIme ----------------------------------- A small tip... use the extended config instead of adding fields to admin_boards or similar... You can also create a brand new section for your own mods... just create a new file into [b]includes/mods_settings[/b] and see how it is easy to add custom vars to ACP! (You can duplicate one of the existing file just to have a starting point) ----------------------------------- Lopalong Sat 12 Sep, 2009 01:29 Re: BETA - Limit Users Post Edit TIme ----------------------------------- [i]A small tip... use the extended config instead of adding fields to admin_boards or similar...[/i] I don't like where it is in the Admin panel at the moment, but I was going to move it somewhere more suitable before releasing it officially. ;) [i]You can also create a brand new section for your own mods... just create a new file into [b]includes/mods_settings[/b] and see how it is easy to add custom vars to ACP! (You can duplicate one of the existing file just to have a starting point)[/i] I'm still the "New Kid" on the block too. And suggestions are one thing - Creating an example would be more than useful! :twisted: I also thought something like in the pic would be fun to play with and keep all this stuff OUT of the core admin so to speak. :mryellow: And I may even play with it today. :P [img]http://www.icyphoenix.com/files/images/3531/untitled_2_1252711718_390474.png[/img] [i]I'll think about adding it to Icy Phoenix. If I'll do that, I'll do on a per forum basis.[/i] I think that this needs either a yes or no, because it's pointless for me to go ahead with doing any more to it if you [b][i]are[/i][/b] going to add it to IP. ;) ----------------------------------- Mighty Gorgon Sat 12 Sep, 2009 09:43 Re: BETA - Limit Users Post Edit TIme ----------------------------------- This is a tutorial for you: [url=http://www.icyphoenix.com/viewtopic.php?f=4&t=6459]How To Add Custom Config Vars To Icy Phoenix Without Editing Any Icy Phoenix File. Regarding the second question I have to think about that... and in case the answer is yes, I guess it will be available for any further Icy Phoenix release if any... so this could be used as a mod until... who knows! :mri: ----------------------------------- Lopalong Sat 12 Sep, 2009 10:13 Re: BETA - Limit Users Post Edit TIme ----------------------------------- Hehehe! Danke for the tutorial. :mryellow: I been playing with this today, and I don't know whether to run with it or not? :( They all work too! :shock: Sorry the pics a bit big - - I'm using wide-screen. :P [img]http://www.icyphoenix.com/files/images/3531/untitled_2_1252743196_768254.png[/img] ----------------------------------- Mighty Gorgon Sat 12 Sep, 2009 10:27 Re: BETA - Limit Users Post Edit TIme ----------------------------------- I don't know how you coded that... but my way doesn't require editing core files, so everyone could just add his own file for his own mods. But we are just talking about "board_config" entries... complex mods requires something else. ----------------------------------- Lopalong Sat 12 Sep, 2009 11:37 Re: BETA - Limit Users Post Edit TIme ----------------------------------- Here's what I did by creating admin_modifications.php, but I know it can be done another way too; where each mod has its own subcategory in "Modifications" and not just a page for all the "minor" MODS. ;) But! I'm still learning and playing! :P [spoiler][code linenumbers=false]clear_cache('config_'); // Pull all config data $sql = "SELECT * FROM " . CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { message_die(CRITICAL_ERROR, "Could not query config information in admin_board", "", __LINE__, __FILE__, $sql); } else { while($row = $db->sql_fetchrow($result)) { $config_name = $row['config_name']; $config_value = $row['config_value']; //$default_config[$config_name] = isset($_POST['submit']) ? addslashes($config_value) : $config_value; $default_config[$config_name] = $config_value; $new[$config_name] = (isset($_POST[$config_name])) ? $_POST[$config_name] : $default_config[$config_name]; fix_config_values($config_name, $config_value); if(isset($_POST['submit'])) { set_config($config_name, $new[$config_name]); } } if(isset($_POST['submit'])) { set_config('board_disable_message', $_POST['message_board_disable_text']); $message = $lang['Config_updated'] . '

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

' . sprintf($lang['Click_return_admin_index'], '', ''); message_die(GENERAL_MESSAGE, $message); } } // START Advanced mouse hover preview $display_first_msg = ($new['display_first'] == MSG_DISPLAY_FIRST) ? "checked=\"checked\"" : ""; $display_last_msg = ($new['display_first'] == MSG_DISPLAY_LAST) ? "checked=\"checked\"" : ""; $display_none = ($new['display_first'] == MSG_DISPLAY_NONE) ? "checked=\"checked\"" : ""; // END Advanced mouse hover preview $template->set_filenames(array('body' => ADM_TPL . 'admin_modifications_body.tpl')); $template->assign_vars(array( 'S_CONFIG_ACTION' => append_sid('admin_modifications.' . PHP_EXT), 'L_MODIFICATION_TITLE' => $lang['modifications_title'], 'L_MODIFICATION_EXPLAIN' => $lang['modification_explain'], // START Url Posting Restrictions 'L_URL_POST_SETTINGS' => $lang['url_post_settings'], 'L_URL_POST_DAYS' => $lang['url_post_days'], 'L_URL_POST_DAYS_EXPLAIN' => $lang['url_post_days_explain'], 'URL_POST_DAYS' => $new['url_post_days'], 'L_URL_POST_POSTS' => $lang['url_post_posts'], 'L_URL_POST_POSTS_EXPLAIN' => $lang['url_post_posts_explain'], 'URL_POST_POSTS' => $new['url_post_posts'], // END Url Posting Restrictions // START Security Question 'L_SECURITYQUESTION' => $lang['security_question'], 'L_SECURITYQUESTION_EXPLAIN' => $lang['security_question_explain'], 'L_SECURITYANSWER' => $lang['security_answer'], 'L_SECURITYANSWER_EXPLAIN' => $lang['security_answer_explain'], 'L_SECURITY_QUESTION_SETTINGS' => $lang['security_question_settings'], 'SECURITY_QUESTION' => $new['securityquestion'], 'SECURITY_ANSWER' => $new['securityanswer'], // END Security Question // START Edit Time for Posts 'L_EDIT_TIME' => $lang['edit_time'], 'L_EDIT_TIME_EXPLAIN' => $lang['edit_time_explain'], 'L_EDIT_POST_TIME_SETTINGS' => $lang['edit_post_time_settings'], 'EDIT_TIME' => $new['edit_time'], // END Edit Time for Posts // START Advanced mouse hover preview 'L_CHAR_LIMIT' => $lang['Char_limit'], 'L_MSG_DISPLAY' => $lang['Msg_display'], 'L_MSG_DISPLAY_EXPLAIN' => $lang['Msg_display_exp'], 'L_MSG_FIRST' => $lang['Msg_first'], 'L_MSG_LAST' => $lang['Msg_last'], 'CHAR_LIMIT' => $new['char_limit'], 'DISPLAY_NONE_MSG' => MSG_DISPLAY_NONE, 'DISPLAY_NONE_CHECKED' => $display_none, 'DISPLAY_FIRST_MSG' => MSG_DISPLAY_FIRST, 'DISPLAY_FIRST_CHECKED' => $display_first_msg, 'DISPLAY_LAST_MSG' => MSG_DISPLAY_LAST, 'DISPLAY_LAST_CHECKED' => $display_last_msg, // END Advanced mouse hover preview ) ); $template->pparse('body'); // Page Footer include('page_footer_admin.' . PHP_EXT); ?>[/code][/spoiler] Which brings me to another question. Is it possible to have preg replace "Global" entries so that it can be used to replace core entries by using preg-replace $data_strings in a MOD? I know I've probably said that badly, and I'll throw up a sample of what I mean if you need it - But I'll have to find it and dig it out. ;) ----------------------------------- Mighty Gorgon Sat 12 Sep, 2009 11:44 Re: BETA - Limit Users Post Edit TIme ----------------------------------- Which GLOBAL entries are you referring to? Board config? ----------------------------------- Lopalong Sat 12 Sep, 2009 12:20 Re: BETA - Limit Users Post Edit TIme ----------------------------------- When I dig out the preg functions I'm trying to explain here rather vaguely, I'll post another topic on the subject with a lot more detail. ;) ----------------------------------- Lopalong Sun 13 Sep, 2009 12:56 Re: BETA - Limit Users Post Edit TIme ----------------------------------- [b][i]There are / were errors in the "Message Click-Return / Sprint Code"[/i][/b] :oops: The first post has been updated, and Beta-Testers only need to replace [b][u]THIS[/u][/b] block of code. :mryellow: # #-----[ AFTER, ADD ]-------- NOTE! Beta Testers This has been updated on the 13th Sept 2009 ----------- # Etc, etc, etc. :lol: