underConstruction - Version 1.0

Version Description

  • First version

=

Download this release

Release Info

Developer jkmassel
Plugin Icon 128x128 underConstruction
Version 1.0
Comparing to
See all releases

Version 1.0

defaultMessage.php ADDED
@@ -0,0 +1,58 @@
1
+ <?php
2
+ /*
3
+ This file is part of underConstruction.
4
+
5
+ underConstruction is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ underConstruction is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with underConstruction. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ ?>
19
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
20
+ <html xmlns="http://www.w3.org/1999/xhtml">
21
+ <head>
22
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
23
+ <title>Coming Soon</title>
24
+ <style type="text/css">
25
+ .comingSoon {
26
+ height: 92px;
27
+ width: 177px;
28
+ margin-top: 25%;
29
+ margin-right: auto;
30
+ margin-left: auto;
31
+ background-repeat: no-repeat;
32
+ color: #FFF;
33
+ font-size: 28px;
34
+ display:block;
35
+ text-align:center;
36
+ }
37
+ body,td,th {
38
+ font-family: Helvetica, arial, sans-serif;
39
+ font-size: 14px;
40
+ }
41
+ body {
42
+ margin-left: 0px;
43
+ margin-top: 0px;
44
+ margin-right: 0px;
45
+ margin-bottom: 0px;
46
+ background-color:#222222;
47
+ }
48
+ </style>
49
+ </head>
50
+
51
+ <body>
52
+ <div class="comingSoon">Coming Soon
53
+ </div>
54
+ </body>
55
+ </html>
56
+ <?php
57
+ /* EOF */
58
+ ?>
readme.txt ADDED
@@ -0,0 +1,44 @@
1
+ === underConstruction ===
2
+ Contributors: Jeremy Massel
3
+ Donate link: http://truthmedia.com/engage/giving
4
+ Tags: construction, under construction, private, preview
5
+ Requires at least: 2.7
6
+ Tested up to: 2.8
7
+ Stable tag: 1.0
8
+
9
+ Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
10
+
11
+ == Description ==
12
+
13
+ Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
14
+
15
+
16
+ == Installation ==
17
+
18
+ This section describes how to install the plugin and get it working.
19
+
20
+ e.g.
21
+
22
+ 1. Upload the folder to the `/wp-content/plugins/` directory
23
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
24
+ 3. If you want to change the look of the page that is displayed, click Settings->Under Construction and enter the HTML for the page you want to show up.
25
+
26
+ == Frequently Asked Questions ==
27
+
28
+ = What kind of HTML can I put in? =
29
+
30
+ You enter the contents of the entire HTML file. You can include inline styles, or links to external style sheets and external images.
31
+
32
+
33
+
34
+ == Screenshots ==
35
+
36
+
37
+ == Changelog ==
38
+
39
+ = 1.0 =
40
+ * First version
41
+
42
+ == Screenshots ==
43
+ 1. The default page that is displayed
44
+ 2. The editing screen
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
underConstruction.php ADDED
@@ -0,0 +1,93 @@
1
+ <?php
2
+ /*
3
+ Plugin Name: Under Construction
4
+ Plugin URI: http://www.masseltech.com/
5
+ Description: Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
6
+ Version: 1.0
7
+ Author: Jeremy Massel
8
+ Author URI: http://www.masseltech.com/
9
+ */
10
+
11
+ /*
12
+ This file is part of underConstruction.
13
+
14
+ underConstruction is free software: you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License as published by
16
+ the Free Software Foundation, either version 3 of the License, or
17
+ (at your option) any later version.
18
+
19
+ underConstruction is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with underConstruction. If not, see <http://www.gnu.org/licenses/>.
26
+ */
27
+
28
+ ?>
29
+ <?php
30
+
31
+ add_action('get_header', 'uc_overrideWP');
32
+ add_action('admin_menu', 'uc_adminMenu');
33
+ register_deactivation_hook(__FILE__, 'uc_remove');
34
+
35
+ function uc_overrideWP()
36
+ {
37
+ if (!is_user_logged_in())
38
+ {
39
+ if (get_option('underConstructionHTML'))
40
+ {
41
+ echo ucGetHTML();
42
+ die();
43
+ }
44
+ else
45
+ {
46
+ require_once ('defaultMessage.php');
47
+ die();
48
+ }
49
+ }
50
+ }
51
+
52
+ function uc_adminMenu()
53
+ {
54
+ add_options_page('Under Construction Message', 'Under Construction', 8, basename(__FILE__) , 'uc_changeMessage');
55
+ }
56
+
57
+ function uc_changeMessage()
58
+ {
59
+
60
+ if(isset($_POST['ucHTML'])){
61
+ if(trim($_POST['ucHTML'])){
62
+ update_option('underConstructionHTML', attribute_escape($_POST['ucHTML']));
63
+ }
64
+ }
65
+
66
+ ?>
67
+ <div class="wrap">
68
+ <div id="icon-options-general" class="icon32">
69
+ <br/>
70
+ </div>
71
+ <h2>Under Construction</h2>
72
+ <form method="post" action="<?php echo $GLOBALS['PHP_SELF'] . '?page=underConstruction.php'; ?>">
73
+ <h3>Under Construction Page HTML</h3>
74
+ <p>Put in this area the HTML you want to show up on your front page</p>
75
+ <textarea name="ucHTML" rows="15" cols="75"><?php if(get_option('underConstructionHTML')){echo ucGetHTML();}?></textarea>
76
+
77
+ <p class="submit">
78
+ <input type="submit" name="Submit" class="button-primary" value="Save Changes" id="submitCalendarAdd"/>
79
+ </p>
80
+ </form>
81
+ </div>
82
+ <?php
83
+ }
84
+
85
+ function ucGetHTML()
86
+ {
87
+ return stripslashes(html_entity_decode(get_option('underConstructionHTML')));
88
+ }
89
+
90
+ function uc_remove(){
91
+ delete_option('underConstructionHTML');
92
+ }
93
+ ?>