Changeset 1561220
- Timestamp:
- 12/24/2016 07:24:29 AM (9 years ago)
- Location:
- flexistatic
- Files:
-
- 2 edited
- 6 copied
-
tags/2.0.1 (copied) (copied from flexistatic/trunk)
-
tags/2.0.1/flexistatic-de_DE.mo (copied) (copied from flexistatic/trunk/flexistatic-de_DE.mo)
-
tags/2.0.1/flexistatic-de_DE.po (copied) (copied from flexistatic/trunk/flexistatic-de_DE.po)
-
tags/2.0.1/flexistatic.php (copied) (copied from flexistatic/trunk/flexistatic.php) (8 diffs)
-
tags/2.0.1/license.txt (copied) (copied from flexistatic/trunk/license.txt)
-
tags/2.0.1/readme.txt (copied) (copied from flexistatic/trunk/readme.txt) (3 diffs)
-
trunk/flexistatic.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
flexistatic/tags/2.0.1/flexistatic.php
r1546144 r1561220 5 5 * Description: Make real static posts flexible. 6 6 * Author: 3UU 7 * Version: 1.0.47 * Version: 2.0.1 8 8 * Author URI: http://datenverwurstungszentrale.com 9 9 * License: MIT … … 53 53 <h2>flexible static content</h2> 54 54 <p><? _e('For best results you should set a permalink that is ending in <code>.htm</code> or <code>.html</code>. Example: <code>/%postname%-%post_id%.htm</code>','flexistatic') ?><br> 55 <? printf( __("You current definition for permalinks is <code>%s</code> and can be changed <a href='options-permalink.php'>here</a>.", 'flexistatic'),get_option('permalink_structure')) ?> 56 < /p><p><? _e('IMPORTANT: Please DELETE ALL static posts/pages here BEFORE CHANGING the definition of permalinks!!!','flexistatic') ?></p>55 <? printf( __("You current definition for permalinks is <code>%s</code> and can be changed <a href='options-permalink.php'>here</a>.", 'flexistatic'),get_option('permalink_structure')) ?></p> 56 <p><? _e('IMPORTANT: Please DELETE ALL static posts/pages here BEFORE CHANGING the definition of permalinks!!!','flexistatic') ?></p> 57 57 <hr> 58 58 <? … … 76 76 foreach($posts as $post) { 77 77 $permalink=wp_make_link_relative(get_permalink($post->ID)); 78 if(!is_file($_SERVER['DOCUMENT_ROOT'].$permalink)){ 78 // if it is a dir, append index.html 79 $fsfile=is_dir($_SERVER['DOCUMENT_ROOT'].$permalink) ? $_SERVER['DOCUMENT_ROOT'].$permalink.'/index.html' : $_SERVER['DOCUMENT_ROOT'].$permalink; 80 if(!is_file($fsfile)){ 79 81 echo "<form style='display:inline!important;' action='".$_SERVER['PHP_SELF']."?page=flexistatic/flexistatic.php' method='POST'>"; 80 82 echo "<input type='hidden' name='static3uu_post_ID' value='".$post->ID."'> … … 99 101 // start page static 100 102 echo "<h2>".__('Make the start page static.','flexistatic')."</h2>"; 101 if( !is_file($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/index.html') ){ 103 104 # $blog_list = get_blog_list( 0, 'all' ); 105 # foreach ($blog_list AS $blog) { 106 # echo 'Blog '.$blog['blog_id'].': '.$blog['domain'].$blog['path'].'<br />'; 107 # echo $_SERVER['HTTP_HOST']; 108 # } 109 110 if( !is_file($_SERVER["DOCUMENT_ROOT"].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html') ){ 102 111 echo "<p><form style='display:inline!important;' action='".$_SERVER['PHP_SELF']."?page=flexistatic/flexistatic.php' method='POST'>"; 103 112 echo "<input type='hidden' name='static3uu_post_ID' value='0'><input type='hidden' name='static3uu_startID' value='$static3uu_startID'> 104 113 <input type='hidden' name='static3uu_act' value='static3UU_proc_make_static'><input type='submit' value='".__('make static','flexistatic')."'></form>"; 105 echo "Homepage (this will write the file <code><a target='_blank' href='".get_site_url()."'>".get_site_url()."</a>/<b> index.html</b></code>)</p>";114 echo "Homepage (this will write the file <code><a target='_blank' href='".get_site_url()."'>".get_site_url()."</a>/<b>".$_SERVER["HTTP_HOST"].".html</b></code>. Check your <code>.htaccess</code> to enable!)</p>"; 106 115 }else{ 107 116 echo "<p><form style='display:inline!important;' action='".$_SERVER['PHP_SELF']."?page=flexistatic/flexistatic.php' method='POST'>"; 108 117 echo "<input type='hidden' name='static3uu_post_ID' value='0'><input type='hidden' name='static3uu_startID' value='$static3uu_startID'> 109 118 <input type='hidden' name='static3uu_act' value='static3UU_proc_remove_static'><input type='submit' style='background-color: #ff0000;' value='".__('remove static','flexistatic')."'></form> "; 110 echo date("Y-m-d H:i:s", filemtime($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html'));111 echo " ". __('Homepage (this will remove the file','flexistatic'). "<code><a target='_blank' href='".get_site_url()."'>".get_site_url()."</a>/<b> index.html</b></code> )</p>";119 echo date("Y-m-d H:i:s", filemtime($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html')); 120 echo " ". __('Homepage (this will remove the file','flexistatic'). "<code><a target='_blank' href='".get_site_url()."'>".get_site_url()."</a>/<b>".$_SERVER["HTTP_HOST"].".html</b></code> )</p>"; 112 121 // some plugins with dirty hooks to the /index.php of WP instead of the plugin files will not work 113 122 // if index.html get preference. E.g. the very usefull "Simple Custom CSS". 114 123 echo "<p>".__('Attention: Some more ore less usefull plugins do need direct requests to the <code>index.php</code> in the blog root folder. Therefor you should add','flexistatic')," "; 115 echo "<pre> RewriteEngine On 116 RewriteCond %{REQUEST_URI} ^/index\.html 124 echo "<pre> # FlexiStatic 125 RewriteEngine On 126 RewriteCond %{REQUEST_URI} ^/(index|%{HTTP_HOST})\.html 117 127 RewriteCond %{QUERY_STRING} !^$ 118 128 RewriteRule . /index.php [L]</pre>"; 129 echo "<pre> ### only needed for WPMU ### 130 RewriteCond %{REQUEST_FILENAME} /$ 131 RewriteCond %{DOCUMENT_ROOT}/%{HTTP_HOST}.html -f 132 RewriteRule .* %{HTTP_HOST}.html [L] 133 # END FlexiStatic 134 </pre>"; 119 135 printf ( __("to your <code>%s/.htaccess</code> file.",'flexistatic'), $_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()) ); 120 136 echo "</p>"; … … 190 206 191 207 // the blog startpage 192 if($static3uu_post_ID == '0') $fsfile = $_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html';208 if($static3uu_post_ID == '0') $fsfile = $_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html'; 193 209 // pages 194 210 elseif(get_post_type($static3uu_post_ID)=='page') $fsfile=$_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_permalink($static3uu_post_ID).'/index.html'); … … 246 262 // if we have updated a post/page perhaps we must update the blog startpage too 247 263 // rtzTodo: this is workarround until we do a implementition at the editor pages and make a hook on save action 248 if(($static3uu_post_ID != '0') && file_exists($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html')) static3UU_proc_update_static('0');264 if(($static3uu_post_ID != '0') && file_exists($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html')) static3UU_proc_update_static('0'); 249 265 } 250 266 … … 260 276 // rtzTodo: make an admin option to define the name of the index.html 261 277 // blog page 262 if($static3uu_post_ID == '0') $fsfile=$_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html';278 if($static3uu_post_ID == '0') $fsfile=$_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html'; 263 279 // page 264 280 elseif(get_post_type($static3uu_post_ID)=='page') $fsfile=$_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_permalink($static3uu_post_ID).'/index.html'); … … 278 294 // if we have updated a post/page perhaps we must update the blog startpage too 279 295 // rtzTodo: this is workarround until we do a implementition at the editor pages and make a hook on save action 280 if(($static3uu_post_ID != '0') && file_exists($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html')) static3UU_proc_update_static('0');296 if(($static3uu_post_ID != '0') && file_exists($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html')) static3UU_proc_update_static('0'); 281 297 } 282 298 -
flexistatic/tags/2.0.1/readme.txt
r1552917 r1561220 4 4 Requires at least: 4.4 5 5 Tested up to: 4.7 6 Stable tag: 1.0.46 Stable tag: 2.0.1 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/mit … … 69 69 connections to URI of your blog. 70 70 71 = Q: Can I make the whole blog static publish it on an other server? = 71 = Q: Can I make a static version of my whole WP blog to transfer it on an 72 punblishing server? = 72 73 A: No. There are other plugins to do this job. But this plugin was developed 73 74 with the aim to keep as most dynamic features of Wordpress and plugins as … … 99 100 == Changelog == 100 101 101 = 1.0.5 = 102 - cleanup README 102 = 2.0.1 = 103 - Bugfix: append index.html if the rel path is a directory 104 105 = 2.0.0 = 106 - Startpage now full compatible with WPMU 103 107 104 108 = 1.0.4 = -
flexistatic/trunk/flexistatic.php
r1546144 r1561220 5 5 * Description: Make real static posts flexible. 6 6 * Author: 3UU 7 * Version: 1.0.47 * Version: 2.0.1 8 8 * Author URI: http://datenverwurstungszentrale.com 9 9 * License: MIT … … 53 53 <h2>flexible static content</h2> 54 54 <p><? _e('For best results you should set a permalink that is ending in <code>.htm</code> or <code>.html</code>. Example: <code>/%postname%-%post_id%.htm</code>','flexistatic') ?><br> 55 <? printf( __("You current definition for permalinks is <code>%s</code> and can be changed <a href='options-permalink.php'>here</a>.", 'flexistatic'),get_option('permalink_structure')) ?> 56 < /p><p><? _e('IMPORTANT: Please DELETE ALL static posts/pages here BEFORE CHANGING the definition of permalinks!!!','flexistatic') ?></p>55 <? printf( __("You current definition for permalinks is <code>%s</code> and can be changed <a href='options-permalink.php'>here</a>.", 'flexistatic'),get_option('permalink_structure')) ?></p> 56 <p><? _e('IMPORTANT: Please DELETE ALL static posts/pages here BEFORE CHANGING the definition of permalinks!!!','flexistatic') ?></p> 57 57 <hr> 58 58 <? … … 76 76 foreach($posts as $post) { 77 77 $permalink=wp_make_link_relative(get_permalink($post->ID)); 78 if(!is_file($_SERVER['DOCUMENT_ROOT'].$permalink)){ 78 // if it is a dir, append index.html 79 $fsfile=is_dir($_SERVER['DOCUMENT_ROOT'].$permalink) ? $_SERVER['DOCUMENT_ROOT'].$permalink.'/index.html' : $_SERVER['DOCUMENT_ROOT'].$permalink; 80 if(!is_file($fsfile)){ 79 81 echo "<form style='display:inline!important;' action='".$_SERVER['PHP_SELF']."?page=flexistatic/flexistatic.php' method='POST'>"; 80 82 echo "<input type='hidden' name='static3uu_post_ID' value='".$post->ID."'> … … 99 101 // start page static 100 102 echo "<h2>".__('Make the start page static.','flexistatic')."</h2>"; 101 if( !is_file($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/index.html') ){ 103 104 # $blog_list = get_blog_list( 0, 'all' ); 105 # foreach ($blog_list AS $blog) { 106 # echo 'Blog '.$blog['blog_id'].': '.$blog['domain'].$blog['path'].'<br />'; 107 # echo $_SERVER['HTTP_HOST']; 108 # } 109 110 if( !is_file($_SERVER["DOCUMENT_ROOT"].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html') ){ 102 111 echo "<p><form style='display:inline!important;' action='".$_SERVER['PHP_SELF']."?page=flexistatic/flexistatic.php' method='POST'>"; 103 112 echo "<input type='hidden' name='static3uu_post_ID' value='0'><input type='hidden' name='static3uu_startID' value='$static3uu_startID'> 104 113 <input type='hidden' name='static3uu_act' value='static3UU_proc_make_static'><input type='submit' value='".__('make static','flexistatic')."'></form>"; 105 echo "Homepage (this will write the file <code><a target='_blank' href='".get_site_url()."'>".get_site_url()."</a>/<b> index.html</b></code>)</p>";114 echo "Homepage (this will write the file <code><a target='_blank' href='".get_site_url()."'>".get_site_url()."</a>/<b>".$_SERVER["HTTP_HOST"].".html</b></code>. Check your <code>.htaccess</code> to enable!)</p>"; 106 115 }else{ 107 116 echo "<p><form style='display:inline!important;' action='".$_SERVER['PHP_SELF']."?page=flexistatic/flexistatic.php' method='POST'>"; 108 117 echo "<input type='hidden' name='static3uu_post_ID' value='0'><input type='hidden' name='static3uu_startID' value='$static3uu_startID'> 109 118 <input type='hidden' name='static3uu_act' value='static3UU_proc_remove_static'><input type='submit' style='background-color: #ff0000;' value='".__('remove static','flexistatic')."'></form> "; 110 echo date("Y-m-d H:i:s", filemtime($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html'));111 echo " ". __('Homepage (this will remove the file','flexistatic'). "<code><a target='_blank' href='".get_site_url()."'>".get_site_url()."</a>/<b> index.html</b></code> )</p>";119 echo date("Y-m-d H:i:s", filemtime($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html')); 120 echo " ". __('Homepage (this will remove the file','flexistatic'). "<code><a target='_blank' href='".get_site_url()."'>".get_site_url()."</a>/<b>".$_SERVER["HTTP_HOST"].".html</b></code> )</p>"; 112 121 // some plugins with dirty hooks to the /index.php of WP instead of the plugin files will not work 113 122 // if index.html get preference. E.g. the very usefull "Simple Custom CSS". 114 123 echo "<p>".__('Attention: Some more ore less usefull plugins do need direct requests to the <code>index.php</code> in the blog root folder. Therefor you should add','flexistatic')," "; 115 echo "<pre> RewriteEngine On 116 RewriteCond %{REQUEST_URI} ^/index\.html 124 echo "<pre> # FlexiStatic 125 RewriteEngine On 126 RewriteCond %{REQUEST_URI} ^/(index|%{HTTP_HOST})\.html 117 127 RewriteCond %{QUERY_STRING} !^$ 118 128 RewriteRule . /index.php [L]</pre>"; 129 echo "<pre> ### only needed for WPMU ### 130 RewriteCond %{REQUEST_FILENAME} /$ 131 RewriteCond %{DOCUMENT_ROOT}/%{HTTP_HOST}.html -f 132 RewriteRule .* %{HTTP_HOST}.html [L] 133 # END FlexiStatic 134 </pre>"; 119 135 printf ( __("to your <code>%s/.htaccess</code> file.",'flexistatic'), $_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()) ); 120 136 echo "</p>"; … … 190 206 191 207 // the blog startpage 192 if($static3uu_post_ID == '0') $fsfile = $_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html';208 if($static3uu_post_ID == '0') $fsfile = $_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html'; 193 209 // pages 194 210 elseif(get_post_type($static3uu_post_ID)=='page') $fsfile=$_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_permalink($static3uu_post_ID).'/index.html'); … … 246 262 // if we have updated a post/page perhaps we must update the blog startpage too 247 263 // rtzTodo: this is workarround until we do a implementition at the editor pages and make a hook on save action 248 if(($static3uu_post_ID != '0') && file_exists($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html')) static3UU_proc_update_static('0');264 if(($static3uu_post_ID != '0') && file_exists($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html')) static3UU_proc_update_static('0'); 249 265 } 250 266 … … 260 276 // rtzTodo: make an admin option to define the name of the index.html 261 277 // blog page 262 if($static3uu_post_ID == '0') $fsfile=$_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html';278 if($static3uu_post_ID == '0') $fsfile=$_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html'; 263 279 // page 264 280 elseif(get_post_type($static3uu_post_ID)=='page') $fsfile=$_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_permalink($static3uu_post_ID).'/index.html'); … … 278 294 // if we have updated a post/page perhaps we must update the blog startpage too 279 295 // rtzTodo: this is workarround until we do a implementition at the editor pages and make a hook on save action 280 if(($static3uu_post_ID != '0') && file_exists($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/ index.html')) static3UU_proc_update_static('0');296 if(($static3uu_post_ID != '0') && file_exists($_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()).'/'.$_SERVER["HTTP_HOST"].'.html')) static3UU_proc_update_static('0'); 281 297 } 282 298 -
flexistatic/trunk/readme.txt
r1552917 r1561220 4 4 Requires at least: 4.4 5 5 Tested up to: 4.7 6 Stable tag: 1.0.46 Stable tag: 2.0.1 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/mit … … 69 69 connections to URI of your blog. 70 70 71 = Q: Can I make the whole blog static publish it on an other server? = 71 = Q: Can I make a static version of my whole WP blog to transfer it on an 72 punblishing server? = 72 73 A: No. There are other plugins to do this job. But this plugin was developed 73 74 with the aim to keep as most dynamic features of Wordpress and plugins as … … 99 100 == Changelog == 100 101 101 = 1.0.5 = 102 - cleanup README 102 = 2.0.1 = 103 - Bugfix: append index.html if the rel path is a directory 104 105 = 2.0.0 = 106 - Startpage now full compatible with WPMU 103 107 104 108 = 1.0.4 =
Note: See TracChangeset
for help on using the changeset viewer.