POST EXPIRE 1.0.3 RC

1. FEATURES
When posting you can set expire time of the post. If this is the first post, expire refers to entire topic. 
You can set 4 kinds of expire actions:
- delete post/topic,
- lock/unlock the topic,
- move the topic to another forum,
- lock and move the topic to another forum.
Expire time is displayed on viewtopic page in case of posts, and on viewforum page in case of topics.

2. INSTALLATION
Please follow the instructions given in install.xml in main directory. Those who like old (phpbb2) style of mods, you can use file contrib/install.txt.

3. CONFIGURATION
A configuration panel is located at ACP -> POSTING -> Messages -> Post expire settings. Below are the sesttings you can change:
	a. Post expire enable
		When this option is set to 'Yes' Post Expire mod is enabled and those users who have permissions can set expire time to their posts/topics. Setting this option 'No' will disable this mod. However if there were some posts/topics with expire time set before disabling Post Expire mod, these posts/topics will expire normally as if mod was enabled. 
	b. Kind of expire set
		You can set expire time in two ways. First allows you to set expire time after defined amount of time. You can add different expire times in mods/pe.php language file. Second way is to set exact time. The third way is to use both solutions. When you use this third method have one thing in mind. When you set expire time after specified time, and the exact time will not be set, so the first one expire will be used. But whe you set the second one, it will have the priority to the first one.
	c. Default action
		You can choose what action will be selected automatically when posting new topic. If this option will be disabled by permissions, another "free" one will be selected. When all will be disabled, then 'delete' option is default even if not seen.
	d. Default forum
		You can choose the default forum where the expired topic will be moved, when the move or move&lock option was set. When you'll be setting move expire time in the forum which is default, then another 'free' forum will be used, cause you can't move topic to the same forum where the topic is. 
	e. Different colour for expire topics/posts
		Posts, and topics which have expire time set, will have different colours displayed. By default it is bg3 class in prosilver or row3 in subsilver2. You can change the colour in their themes in colour.css file.
	f. Expire colour time
		You can set the time when background colour will change before the topic/post would expire. Setting to 0 sets all expire topics/posts background colour change. Numbers mean hours.	
	g. Expire maximum time:
		You can set the maximum expire time users can set. Setting to 0 sets max time unlimited. Numbers mean days.	
		
4. PERMISSIONS
	a. Administrative permissions in POSTING tab 'Can alter post expire settings'. It gives you possibilty to allow other Administrators to change Post Expire settings.
	b. User permissions in POST EXPIRE tab
		- 'Can set delete expire time'
		- 'Can set lock expire time'
		- 'Can set lock and move expire time'
		- 'Can set move expire time'
		You can set one or more of these options. They allow selected users to do certain actions as stated in permission name. When you set all of these permissions to 'No', then default 'delete' option is set even if not visible.
		- 'Can set post expire time only' - this option will give your users ability to set expire time only for posts, and only 'delete' action. The topic won't be affected if the first post is set to expire. In this case after expiring the first post will be deleted, but the topic will stay, with another author followed by the first one deleted.
		- 'Can set topic expire time only' - this option will give your users ability to set expire time only for topics. They won't be able to set expire time for post written by post replay. Good option for moderators team.
		When setting these two options to yes, only the first will aply.
		- 'Can use only default move forum' - this permission allows you to block move forum to the one selected in ACP. Only this one (in ACP) will be available to choose when posting. 
		
5. DATEPICKER
Please remember important thing. Datepicker dir (located in root/styles/prosilver/template) with files included there must be present in every style you use in directory parallel like in prosilver.

Things you can change. 
		- You can also change the first day of the week form Monday to Sunday. In styles/prosilver/template/datepicker/datetimepicker_css.js file search for:

var MondayFirstDay=true;

and change to:

var MondayFirstDay=false; 

		- You can change the default time format from 24h to 12h AM/PM. To do so in styles/prosilver/template/datepicker/datetimepicker_css.js file search for:

var TimeMode=24;

and change to:

var TimeMode=12;

Next open the posting.php file in root directory of your forum and search for:

				$post_data['date_picker'] = gmdate("d-m-Y H:i", $post_data['post_expire_time'] + $user->timezone + $user->dst); //Use for 24h time
//				$post_data['date_picker'] = gmdate("d-m-Y h:i A", $post_data['post_expire_time'] + $user->timezone + $user->dst); //Use for 12h am/pm time

			and replace it with:

//				$post_data['date_picker'] = gmdate("d-m-Y H:i", $post_data['post_expire_time'] + $user->timezone + $user->dst); //Use for 24h time
				$post_data['date_picker'] = gmdate("d-m-Y h:i A", $post_data['post_expire_time'] + $user->timezone + $user->dst); //Use for 12h am/pm time
			
And the last edit in styles/prosilver/template/posting_editor.html search for:

NewCssCal('date_picker','ddmmyyyy', true, 24)

and change to:

NewCssCal('date_picker','ddmmyyyy', true, 12)
			
		- You can change the look of datepicker editing the styles/prosilver/template/datepicker/datetimepicker_css.js file. Just read the comments for variables. 
Please do not change other settings in datepicker files becaue it can casue the forum working BAD. :-)
