|
Page 1 of 1
|
Inactive User
|
 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!
Edited by Guest, Fri 11 Sep, 2009 23:19: Removed a couple of loose carriage returns and spaces. |
#1 Fri 11 Sep, 2009 13:24 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
spydie 
Joined: December 2008
Posts: 1796
Location:  In the Boxes
|
 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
____________ Out of Order
|
#2 Fri 11 Sep, 2009 14:48 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 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.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#3 Fri 11 Sep, 2009 23:19 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 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 includes/mods_settings 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)
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#4 Fri 11 Sep, 2009 23:23 |
|
Inactive User
|
 Re: BETA - Limit Users Post Edit TIme
A small tip... use the extended config instead of adding fields to admin_boards or similar...
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.
You can also create a brand new section for your own mods... just create a new file into includes/mods_settings 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'm still the "New Kid" on the block too. And suggestions are one thing - Creating an example would be more than useful!
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.
And I may even play with it today.
I'll think about adding it to Icy Phoenix. If I'll do that, I'll do on a per forum basis.
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 are going to add it to IP.
|
#5 Sat 12 Sep, 2009 01:29 |
|
Inactive User
|
 Re: BETA - Limit Users Post Edit TIme
Hehehe!
Danke for the tutorial.
I been playing with this today, and I don't know whether to run with it or not?
They all work too!
Sorry the pics a bit big - - I'm using wide-screen.
|
#7 Sat 12 Sep, 2009 10:13 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 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.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#8 Sat 12 Sep, 2009 10:27 |
|
Inactive User
|
 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!
<?php
/**
*
* @package Icy Phoenix
* @version $Id: admin_modifications.php 2009-09-12 19:54:45Z Lopalong $
* @copyright (c) 2009 Icy Phoenix
* @license h**p://opensource.org/licenses/GPL-license.php GNU Public License
*
*/
/**
*
* @Extra credits for this file
*
*
*/
define('IN_ICYPHOENIX', true);
// Admin Panel
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Modifications']['Grouped Configurations'] = $filename;
return;
}
// Load default header
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './../');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
require('./pagestart.' . PHP_EXT);
include_once(IP_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
$db->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'] . '<br /><br />' . sprintf($lang['Click_return_url_posting'], '<a href="' . append_sid('admin_modifications.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');
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);
?>
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.
|
#9 Sat 12 Sep, 2009 11:37 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: BETA - Limit Users Post Edit TIme
Which GLOBAL entries are you referring to?
Board config?
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#10 Sat 12 Sep, 2009 11:44 |
|
Inactive User
|
 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.
|
#11 Sat 12 Sep, 2009 12:20 |
|
Inactive User
|
 Re: BETA - Limit Users Post Edit TIme
There are / were errors in the "Message Click-Return / Sprint Code"
The first post has been updated, and Beta-Testers only need to replace THIS block of code.
#
#-----[ AFTER, ADD ]-------- NOTE! Beta Testers This has been updated on the 13th Sept 2009 -----------
#
Etc, etc, etc.
|
#12 Sun 13 Sep, 2009 12:56 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|