From jondaley at devel.lifetype.net Thu Dec 15 11:28:28 2011 From: jondaley at devel.lifetype.net (jondaley at devel.lifetype.net) Date: Thu, 15 Dec 2011 11:28:28 -0500 Subject: [pLog-svn] r7163 - plog/branches/lifetype-1.2/js/editor plog/branches/lifetype-1.2/templates/admin plugins/branches/lifetype-1.2/contact/templates plugins/branches/lifetype-1.2/submissions/templates Message-ID: <20111215162828.89A776DD63@tangerine.limedaley.com> Author: jondaley Date: 2011-12-15 11:28:28 -0500 (Thu, 15 Dec 2011) New Revision: 7163 Modified: plog/branches/lifetype-1.2/js/editor/lifetypeeditor.js plog/branches/lifetype-1.2/templates/admin/editpost.template plog/branches/lifetype-1.2/templates/admin/newpost.template plugins/branches/lifetype-1.2/contact/templates/form.template plugins/branches/lifetype-1.2/submissions/templates/submitform.template Log: javascript doesn't allow subchildren to be defined if the parent object is't defined. Presumably javascript used to allow that. See bug #1673. Also removed the text links for the visual editor, there are already icons that have that behavior, so they are redundant Modified: plog/branches/lifetype-1.2/js/editor/lifetypeeditor.js =================================================================== --- plog/branches/lifetype-1.2/js/editor/lifetypeeditor.js 2011-10-29 22:46:18 UTC (rev 7162) +++ plog/branches/lifetype-1.2/js/editor/lifetypeeditor.js 2011-12-15 16:28:28 UTC (rev 7163) @@ -22,10 +22,10 @@ *

Lifetype Javascript Sample

*
* text1:
- * + * * *
text2:
- * + * * *
* @@ -42,7 +42,7 @@ * main class * */ -Lifetype.UI.Editor = function(txtId, objName) +LifetypeUIEditor = function(txtId, objName) { // class attributes @@ -68,23 +68,23 @@ options['18'] = '18 pt'; options['24'] = '24 pt'; options['36'] = '36 pt'; - this.toolBar['list_font_size'] = new Lifetype.UI.Editor.List.FontSize( 'list_font_size', options ); - this.toolBar['1_but_b'] = new Lifetype.UI.Editor.Button( '1_but_b', 'bold', '', '', 'ed_format_bold.gif', 1 ); - this.toolBar['2_but_i'] = new Lifetype.UI.Editor.Button( '2_but_i', 'italics', '', '', 'ed_format_italic.gif', 1 ); - this.toolBar['3_but_u'] = new Lifetype.UI.Editor.Button( '3_but_u', 'underline', '', '', 'ed_format_underline.gif', 1 ); - this.toolBar['4_but_strikethrough'] = new Lifetype.UI.Editor.Button( '4_but_strikethrough', 'strikethrough', '', '', 'ed_format_strike.gif', 1 ); - this.toolBar['but_sep1'] = new Lifetype.UI.Editor.Button.Separator(); - this.toolBar['but_align_left'] = new Lifetype.UI.Editor.Button( 'but_align_left', 'align left', '
', '
', 'ed_align_left.gif' ); - this.toolBar['but_align_center'] = new Lifetype.UI.Editor.Button( 'but_align_center', 'align center', '
', '
', 'ed_align_center.gif' ); - this.toolBar['but_align_right'] = new Lifetype.UI.Editor.Button( 'but_align_right', 'align right', '
', '
', 'ed_align_right.gif' ); - this.toolBar['but_align_justify'] = new Lifetype.UI.Editor.Button( 'but_align_justify', 'align justify', '
', '
', 'ed_align_justify.gif' ); - this.toolBar['but_sep2'] = new Lifetype.UI.Editor.Button.Separator(); - this.toolBar['but_ordered_list'] = new Lifetype.UI.Editor.Button( 'but_ordered_list', 'ordered list', '
', '', 'ed_list_num.gif', -1 ); - this.toolBar['but_unordered_list'] = new Lifetype.UI.Editor.Button( 'but_unordered_list', 'unordered list', '', '', 'ed_list_bullet.gif', -1 ); - this.toolBar['5_but_a'] = new Lifetype.UI.Editor.Button.Link( '5_but_a', 'anchor', 'ed_link.gif' ); - this.toolBar['6_but_img']= new Lifetype.UI.Editor.Button.Image( '6_but_img', 'image', 'ed_image.gif' ); - this.toolBar['7_but_res']= new Lifetype.UI.Editor.Button.Resource ('7_but_res', 'resource', 'ed_resource.gif' ); - this.toolBar['8_but_more']= new Lifetype.UI.Editor.Button.More ('8_but_more', 'more', 'ed_more.gif' ); + this.toolBar['list_font_size'] = new LifetypeUIEditor.List.FontSize( 'list_font_size', options ); + this.toolBar['1_but_b'] = new LifetypeUIEditor.Button( '1_but_b', 'bold', '', '', 'ed_format_bold.gif', 1 ); + this.toolBar['2_but_i'] = new LifetypeUIEditor.Button( '2_but_i', 'italics', '', '', 'ed_format_italic.gif', 1 ); + this.toolBar['3_but_u'] = new LifetypeUIEditor.Button( '3_but_u', 'underline', '', '', 'ed_format_underline.gif', 1 ); + this.toolBar['4_but_strikethrough'] = new LifetypeUIEditor.Button( '4_but_strikethrough', 'strikethrough', '', '', 'ed_format_strike.gif', 1 ); + this.toolBar['but_sep1'] = new LifetypeUIEditor.Button.Separator(); + this.toolBar['but_align_left'] = new LifetypeUIEditor.Button( 'but_align_left', 'align left', '
', '
', 'ed_align_left.gif' ); + this.toolBar['but_align_center'] = new LifetypeUIEditor.Button( 'but_align_center', 'align center', '
', '
', 'ed_align_center.gif' ); + this.toolBar['but_align_right'] = new LifetypeUIEditor.Button( 'but_align_right', 'align right', '
', '
', 'ed_align_right.gif' ); + this.toolBar['but_align_justify'] = new LifetypeUIEditor.Button( 'but_align_justify', 'align justify', '
', '
', 'ed_align_justify.gif' ); + this.toolBar['but_sep2'] = new LifetypeUIEditor.Button.Separator(); + this.toolBar['but_ordered_list'] = new LifetypeUIEditor.Button( 'but_ordered_list', 'ordered list', '
', '', 'ed_list_num.gif', -1 ); + this.toolBar['but_unordered_list'] = new LifetypeUIEditor.Button( 'but_unordered_list', 'unordered list', '', '', 'ed_list_bullet.gif', -1 ); + this.toolBar['5_but_a'] = new LifetypeUIEditor.Button.Link( '5_but_a', 'anchor', 'ed_link.gif' ); + this.toolBar['6_but_img']= new LifetypeUIEditor.Button.Image( '6_but_img', 'image', 'ed_image.gif' ); + this.toolBar['7_but_res']= new LifetypeUIEditor.Button.Resource ('7_but_res', 'resource', 'ed_resource.gif' ); + this.toolBar['8_but_more']= new LifetypeUIEditor.Button.More ('8_but_more', 'more', 'ed_more.gif' ); } /** @@ -311,7 +311,7 @@ * @param icon * @param open */ -Lifetype.UI.Editor.Button = function(id, display, tagStart, tagEnd, icon, open) +LifetypeUIEditor.Button = function(id, display, tagStart, tagEnd, icon, open) { this.id = id; // used to name the toolbar button this.display = display; // label on button @@ -453,11 +453,11 @@ * visual separators for the toolbar are also implemented as buttons, but they do * do nothing and only show a vertical bar anyway with some margin on both sides... */ -Lifetype.UI.Editor.Button.Separator = function() +LifetypeUIEditor.Button.Separator = function() { - this.prototype = new Lifetype.UI.Editor.Button('separator', '', '', '', '', -1 ); - this.prototype.constructor = Lifetype.UI.Editor.Button; - this.superclass = Lifetype.UI.Editor.Button; + this.prototype = new LifetypeUIEditor.Button('separator', '', '', '', '', -1 ); + this.prototype.constructor = LifetypeUIEditor.Button; + this.superclass = LifetypeUIEditor.Button; this.superclass('separator', '', '', '', '', -1 ); @@ -479,14 +479,14 @@ * @param display * @param icon */ -Lifetype.UI.Editor.Button.Link = function(id, display, icon) +LifetypeUIEditor.Button.Link = function(id, display, icon) { // // strange javascript thingies used for object inheritance... // - this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 ); - this.prototype.constructor = Lifetype.UI.Editor.Button; - this.superclass = Lifetype.UI.Editor.Button; + this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 ); + this.prototype.constructor = LifetypeUIEditor.Button; + this.superclass = LifetypeUIEditor.Button; this.superclass(id, display, '', '', icon, -1 ); @@ -553,14 +553,14 @@ * @param display * @param icon */ -Lifetype.UI.Editor.Button.BR = function(id, display, icon) +LifetypeUIEditor.Button.BR = function(id, display, icon) { // // strange javascript thingies used for object inheritance... // - this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 ); - this.prototype.constructor = Lifetype.UI.Editor.Button; - this.superclass = Lifetype.UI.Editor.Button; + this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 ); + this.prototype.constructor = LifetypeUIEditor.Button; + this.superclass = LifetypeUIEditor.Button; this.superclass(id, display, '
', '', icon, -1 ); @@ -588,14 +588,14 @@ * @param display * @param icon */ -Lifetype.UI.Editor.Button.More = function(id, display, icon) +LifetypeUIEditor.Button.More = function(id, display, icon) { // // strange javascript thingies used for object inheritance... // - this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 ); - this.prototype.constructor = Lifetype.UI.Editor.Button; - this.superclass = Lifetype.UI.Editor.Button; + this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 ); + this.prototype.constructor = LifetypeUIEditor.Button; + this.superclass = LifetypeUIEditor.Button; this.superclass(id, display, '', '', icon, -1 ); @@ -645,14 +645,14 @@ * @param display * @param icon */ -Lifetype.UI.Editor.Button.Image = function(id, display, icon) +LifetypeUIEditor.Button.Image = function(id, display, icon) { // // strange javascript thingies used for object inheritance... // - this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 ); - this.prototype.constructor = Lifetype.UI.Editor.Button; - this.superclass = Lifetype.UI.Editor.Button; + this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 ); + this.prototype.constructor = LifetypeUIEditor.Button; + this.superclass = LifetypeUIEditor.Button; this.superclass(id, display, '', '', icon, -1 ); @@ -694,14 +694,14 @@ * @param display * @param icon */ -Lifetype.UI.Editor.Button.Resource = function(id, display, icon) +LifetypeUIEditor.Button.Resource = function(id, display, icon) { // // strange javascript thingies used for object inheritance... // - this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 ); - this.prototype.constructor = Lifetype.UI.Editor.Button; - this.superclass = Lifetype.UI.Editor.Button; + this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 ); + this.prototype.constructor = LifetypeUIEditor.Button; + this.superclass = LifetypeUIEditor.Button; this.superclass(id, display, '', '', icon, -1 ); @@ -721,14 +721,14 @@ /** * implements drop-down lists */ -Lifetype.UI.Editor.List = function( id, options ) +LifetypeUIEditor.List = function( id, options ) { // // strange javascript thingies used for object inheritance... // - this.prototype = new Lifetype.UI.Editor.Button(id, '', '', '', '', -1 ); - this.prototype.constructor = Lifetype.UI.Editor.Button; - this.superclass = Lifetype.UI.Editor.Button; + this.prototype = new LifetypeUIEditor.Button(id, '', '', '', '', -1 ); + this.prototype.constructor = LifetypeUIEditor.Button; + this.superclass = LifetypeUIEditor.Button; this.options = options; @@ -780,14 +780,14 @@ /** * button that shows a list with different font sizes */ -Lifetype.UI.Editor.List.FontSize = function( id, options ) +LifetypeUIEditor.List.FontSize = function( id, options ) { // // strange javascript thingies used for object inheritance... // - this.prototype = new Lifetype.UI.Editor.List(id, options ); - this.prototype.constructor = Lifetype.UI.Editor.List; - this.superclass = Lifetype.UI.Editor.List; + this.prototype = new LifetypeUIEditor.List(id, options ); + this.prototype.constructor = LifetypeUIEditor.List; + this.superclass = LifetypeUIEditor.List; this.superclass(id, options ); @@ -819,4 +819,4 @@ surroundInfo['end'] = ''; return( surroundInfo ); } -} \ No newline at end of file +} Modified: plog/branches/lifetype-1.2/templates/admin/editpost.template =================================================================== --- plog/branches/lifetype-1.2/templates/admin/editpost.template 2011-10-29 22:46:18 UTC (rev 7162) +++ plog/branches/lifetype-1.2/templates/admin/editpost.template 2011-12-15 16:28:28 UTC (rev 7163) @@ -53,7 +53,7 @@ *
{$locale->tr("text_help")}
- {if !$htmlarea}{/if} + {if !$htmlarea}{/if} {$locale->tr("insert_media")} | {$locale->tr("insert_more")} Modified: plog/branches/lifetype-1.2/templates/admin/newpost.template =================================================================== --- plog/branches/lifetype-1.2/templates/admin/newpost.template 2011-10-29 22:46:18 UTC (rev 7162) +++ plog/branches/lifetype-1.2/templates/admin/newpost.template 2011-12-15 16:28:28 UTC (rev 7163) @@ -66,10 +66,12 @@ *
{$locale->tr("text_help")}
- {if !$htmlarea}{/if} + {if !$htmlarea}{/if} - {$locale->tr("insert_media")} | - {$locale->tr("insert_more")} + {if !$htmlarea} + {$locale->tr("insert_media")} | + {$locale->tr("insert_more")} + {/if} {include file="$admintemplatepath/validate.template" field=postText message=$locale->tr("error_missing_post_text")} Modified: plugins/branches/lifetype-1.2/contact/templates/form.template =================================================================== --- plugins/branches/lifetype-1.2/contact/templates/form.template 2011-10-29 22:46:18 UTC (rev 7162) +++ plugins/branches/lifetype-1.2/contact/templates/form.template 2011-12-15 16:28:28 UTC (rev 7163) @@ -10,7 +10,7 @@
- +
Modified: plugins/branches/lifetype-1.2/submissions/templates/submitform.template =================================================================== --- plugins/branches/lifetype-1.2/submissions/templates/submitform.template 2011-10-29 22:46:18 UTC (rev 7162) +++ plugins/branches/lifetype-1.2/submissions/templates/submitform.template 2011-12-15 16:28:28 UTC (rev 7163) @@ -36,7 +36,7 @@
{$locale->tr("story_contents")}
- {if !$submissions->isHtmlareaEnabled()}{/if} + {if !$submissions->isHtmlareaEnabled()}{/if}
{if $errors.submissionText} !  {$message.submissionText}


{/if}
From jondaley at devel.lifetype.net Thu Dec 15 11:34:01 2011 From: jondaley at devel.lifetype.net (jondaley at devel.lifetype.net) Date: Thu, 15 Dec 2011 11:34:01 -0500 Subject: [pLog-svn] r7164 - in plog/branches/lifetype-1.2: . templates/admin Message-ID: <20111215163401.8492A6DD63@tangerine.limedaley.com> Author: jondaley Date: 2011-12-15 11:34:01 -0500 (Thu, 15 Dec 2011) New Revision: 7164 Modified: plog/branches/lifetype-1.2/.htaccess plog/branches/lifetype-1.2/runtests.php plog/branches/lifetype-1.2/templates/admin/editpost.template Log: I forgot to remove the text links in the edit post template Modified: plog/branches/lifetype-1.2/.htaccess =================================================================== --- plog/branches/lifetype-1.2/.htaccess 2011-12-15 16:28:28 UTC (rev 7163) +++ plog/branches/lifetype-1.2/.htaccess 2011-12-15 16:34:01 UTC (rev 7164) @@ -6,84 +6,47 @@ deny from all -Options -Indexes -Options +FollowSymLinks +RewriteEngine On +RewriteBase /plog - +RewriteRule ^subscribe$ index.php?op=subscribe [L] -RewriteEngine On -RewriteBase / +#RewriteCond %{REMOTE_HOST} !orange.limedaley.com +#RewriteRule .* /temporary_failure.html [L] + +Deny from 109.230.216.79 + + # Point to the sitemap file that is local to the blog. This is a Plugin # specific rewrite rule and can safely be commented out, if you are not using # the Sitemap plugin (http://wiki.lifetype.net/index.php/Plugin_sitemap). RewriteRule ^sitemap([0-9]+)\.gz$ tmp/sitemap/$1/sitemap.gz [L,NC] -# Permalink to the blog entry (i.e. /1_userfoo/archive/3_title-foo-bar.html) -RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html$ index.php?op=ViewArticle&blogId=$1&articleId=$2 [L,NC] -# -- same as above but with paging included -RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html\.page\.([0-9]+)$ index.php?op=ViewArticle&blogId=$1&articleId=$2&page=$3 [L,NC] +# old category name +RewriteRule ^category/internet(-|_)stuff(.*) /plog/category/internet$2 [R=permanent,L] -# Monthly archive (i.e. /1_userfoo/archive/200401.html) -RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html$ index.php?blogId=$1&Date=$2 [L,NC] -# -- same as above but with paging included -RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html\.page\.([0-9]+)$ index.php?blogId=$1&Date=$2&page=$3 [L,NC] +# old links +RewriteRule ^content(.*) /plog/static$1 [R=permanent,L] -# Daily archive (i.e. /1_blogfoo/archive/20040101.html) -RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php?blogId=$1&Date=$2 [L,NC] -# -- same as above but with paging included -RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html\.page\.([0-9]+)$ index.php?blogId=$1&Date=$2&page=$3 [L,NC] +RewriteCond %{REQUEST_URI} ^/plog/(category|archives)/[^_]+_ +RewriteRule ^([^_]+)_(.*)$ $1-$2 [R=permanent,L] -# Album (i.e. /88_userfoo/albums/34_title-foo-bar.html) -RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html$ index.php?op=ViewAlbum&blogId=$1&albumId=$2 [L,NC] -# -- same as above but with paging included -RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html\.page\.([0-9]+)$ index.php?op=ViewAlbum&blogId=$1&albumId=$2&page=$3 [L,NC] +RewriteRule ^category/programming(.*) http://limedaley.com/category/blog$2 [R=permanent,L] +RewriteRule ^jonathan/?$ /plog/category/jonathan [R,L] +RewriteRule ^isaac/?$ /plog/category/isaac [R,L] +RewriteRule ^(1|jondaley)/?$ /plog/ [R,L] -# Albums (i.e. /88_userfoo/albums/) -RewriteRule ^([0-9]+)_[^/]+/albums/$ index.php?op=ViewAlbum&blogId=$1&albumId=0 [L,NC] +############################### +## catch all to avoid errors in the error.log +#RewriteCond %{REQUEST_URI} !^/plog/error.php +#RewriteCond %{REQUEST_URI} !^/plog/admin.php +#RewriteCond %{REQUEST_URI} !^/plog/index.php +#RewriteCond %{REQUEST_URI} !^/plog/templates +#RewriteCond %{REQUEST_URI} !^/plog/files +#RewriteRule (.*) /plog/error.php [L] +############################### -# Category view (i.e. /88_userfoo/categories/4_cat-foobar.html) -RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html$ index.php?blogId=$1&postCategoryId=$2 [L,NC] -# -- same as above but with paging included -RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html\.page\.([0-9]+)$ index.php?blogId=$1&postCategoryId=$2&page=$3 [L,NC] - -# Category-Feeds (i.e. /3_userfoo/feeds/categories/2_category/atom) -RewriteRule ^([0-9]+)_[^/]+/feeds/categories/([0-9]+)_[^.]+/(.*)$ rss.php?blogId=$1&categoryId=$2&profile=$3 [L,NC] - -# Feeds (i.e. /3_userfoo/feeds/atom) -RewriteRule ^([0-9]+)_[^/]+/feeds/(.*)$ rss.php?blogId=$1&profile=$2 [L,NC] - -# Trackbacks (i.e. /3_userfoo/trackbacks/34_title-foo-bar.html) -RewriteRule ^([0-9]+)_[^/]+/trackbacks/([0-9]+)_[^.]+\.html$ index.php?op=Trackbacks&blogId=$1&articleId=$2 [L,NC] - -# Comment form (i.e. /88_userfoo/comment/34_title-foo-bar.html) -RewriteRule ^([0-9]+)_[^/]+/comment/([0-9]+)_[^.]+\.html$ index.php?op=Comment&blogId=$1&articleId=$2 [L,NC] - -# Resources (i.e. /88_userfoo/resources/this-is-a-resource-name.pdf.html) -RewriteRule ^([0-9]+)_[^/]+/resources/([^.]+)\.([^.]+)\.html$ index.php?op=ViewResource&blogId=$1&resource=$2.$3 [L,NC] - -# Download a resource (i.e. /88_userfoo/get/this-is-a-resource-name.pdf) -RewriteRule ^([0-9]+)_[^/]+/get/(.+)$ resserver.php?blogId=$1&resource=$2 [L,NC] - -# Static Pages (i.e /3_userfoo/demosites) -RewriteRule ^([0-9]+)_[^/]+/(.+)$ index.php?op=Template&blogId=$1&show=$2 [L,NC] - -# A non-default blog (i.e. /88_userfoo) -RewriteRule ^([0-9]+)_[^.]+$ index.php?blogId=$1 [L,NC] -# -- same as above but with paging included -RewriteRule ^([0-9]+)_[^.]+\.page\.([0-9]+)$ index.php?blogId=$1&page=$2 [L,NC] - -# If you would like to use custom urls but ForceType or SetType directives do -# not work on your server (e.g. PHP is running as CGI/FastCGI) you may uncomment -# the rewrite rule below to rewrite all requests to ./blog to ./blog.php. -# Please note that this works only as long as you don't change the default -# custom url patterns in your LifeType administration. -## RewriteRule ^blog/(.+) blog.php/$1 [L,NC] - - - - - ForceType application/x-httpd-php @@ -140,6 +103,6 @@ ForceType application/x-httpd-php -ErrorDocument 401 /error.php -ErrorDocument 403 /error.php -ErrorDocument 404 /error.php +ErrorDocument 401 /plog/error.php +ErrorDocument 403 /plog/error.php +ErrorDocument 404 /plog/error.php Modified: plog/branches/lifetype-1.2/runtests.php =================================================================== --- plog/branches/lifetype-1.2/runtests.php 2011-12-15 16:28:28 UTC (rev 7163) +++ plog/branches/lifetype-1.2/runtests.php 2011-12-15 16:34:01 UTC (rev 7164) @@ -1,6 +1,6 @@ {$locale->tr("text_help")}
{if !$htmlarea}{/if} - {$locale->tr("insert_media")} | - {$locale->tr("insert_more")} + {if !$htmlarea} + {$locale->tr("insert_media")} | + {$locale->tr("insert_more")} + {/if} {include file="$admintemplatepath/validate.template" field=postText message=$locale->tr("error_missing_post_text")}
From jondaley at devel.lifetype.net Thu Dec 15 11:34:32 2011 From: jondaley at devel.lifetype.net (jondaley at devel.lifetype.net) Date: Thu, 15 Dec 2011 11:34:32 -0500 Subject: [pLog-svn] r7165 - plog/branches/lifetype-1.2 Message-ID: <20111215163432.8C5666DD63@tangerine.limedaley.com> Author: jondaley Date: 2011-12-15 11:34:32 -0500 (Thu, 15 Dec 2011) New Revision: 7165 Modified: plog/branches/lifetype-1.2/.htaccess plog/branches/lifetype-1.2/runtests.php Log: urgh. At least I didn't check in my config file this time. :) Modified: plog/branches/lifetype-1.2/.htaccess =================================================================== --- plog/branches/lifetype-1.2/.htaccess 2011-12-15 16:34:01 UTC (rev 7164) +++ plog/branches/lifetype-1.2/.htaccess 2011-12-15 16:34:32 UTC (rev 7165) @@ -6,47 +6,84 @@ deny from all -RewriteEngine On -RewriteBase /plog +Options -Indexes +Options +FollowSymLinks -RewriteRule ^subscribe$ index.php?op=subscribe [L] + -#RewriteCond %{REMOTE_HOST} !orange.limedaley.com -#RewriteRule .* /temporary_failure.html [L] +RewriteEngine On +RewriteBase / - -Deny from 109.230.216.79 - - # Point to the sitemap file that is local to the blog. This is a Plugin # specific rewrite rule and can safely be commented out, if you are not using # the Sitemap plugin (http://wiki.lifetype.net/index.php/Plugin_sitemap). RewriteRule ^sitemap([0-9]+)\.gz$ tmp/sitemap/$1/sitemap.gz [L,NC] -# old category name -RewriteRule ^category/internet(-|_)stuff(.*) /plog/category/internet$2 [R=permanent,L] +# Permalink to the blog entry (i.e. /1_userfoo/archive/3_title-foo-bar.html) +RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html$ index.php?op=ViewArticle&blogId=$1&articleId=$2 [L,NC] +# -- same as above but with paging included +RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html\.page\.([0-9]+)$ index.php?op=ViewArticle&blogId=$1&articleId=$2&page=$3 [L,NC] -# old links -RewriteRule ^content(.*) /plog/static$1 [R=permanent,L] +# Monthly archive (i.e. /1_userfoo/archive/200401.html) +RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html$ index.php?blogId=$1&Date=$2 [L,NC] +# -- same as above but with paging included +RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html\.page\.([0-9]+)$ index.php?blogId=$1&Date=$2&page=$3 [L,NC] -RewriteCond %{REQUEST_URI} ^/plog/(category|archives)/[^_]+_ -RewriteRule ^([^_]+)_(.*)$ $1-$2 [R=permanent,L] +# Daily archive (i.e. /1_blogfoo/archive/20040101.html) +RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php?blogId=$1&Date=$2 [L,NC] +# -- same as above but with paging included +RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html\.page\.([0-9]+)$ index.php?blogId=$1&Date=$2&page=$3 [L,NC] -RewriteRule ^category/programming(.*) http://limedaley.com/category/blog$2 [R=permanent,L] -RewriteRule ^jonathan/?$ /plog/category/jonathan [R,L] -RewriteRule ^isaac/?$ /plog/category/isaac [R,L] -RewriteRule ^(1|jondaley)/?$ /plog/ [R,L] +# Album (i.e. /88_userfoo/albums/34_title-foo-bar.html) +RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html$ index.php?op=ViewAlbum&blogId=$1&albumId=$2 [L,NC] +# -- same as above but with paging included +RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html\.page\.([0-9]+)$ index.php?op=ViewAlbum&blogId=$1&albumId=$2&page=$3 [L,NC] -############################### -## catch all to avoid errors in the error.log -#RewriteCond %{REQUEST_URI} !^/plog/error.php -#RewriteCond %{REQUEST_URI} !^/plog/admin.php -#RewriteCond %{REQUEST_URI} !^/plog/index.php -#RewriteCond %{REQUEST_URI} !^/plog/templates -#RewriteCond %{REQUEST_URI} !^/plog/files -#RewriteRule (.*) /plog/error.php [L] -############################### +# Albums (i.e. /88_userfoo/albums/) +RewriteRule ^([0-9]+)_[^/]+/albums/$ index.php?op=ViewAlbum&blogId=$1&albumId=0 [L,NC] +# Category view (i.e. /88_userfoo/categories/4_cat-foobar.html) +RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html$ index.php?blogId=$1&postCategoryId=$2 [L,NC] +# -- same as above but with paging included +RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html\.page\.([0-9]+)$ index.php?blogId=$1&postCategoryId=$2&page=$3 [L,NC] + +# Category-Feeds (i.e. /3_userfoo/feeds/categories/2_category/atom) +RewriteRule ^([0-9]+)_[^/]+/feeds/categories/([0-9]+)_[^.]+/(.*)$ rss.php?blogId=$1&categoryId=$2&profile=$3 [L,NC] + +# Feeds (i.e. /3_userfoo/feeds/atom) +RewriteRule ^([0-9]+)_[^/]+/feeds/(.*)$ rss.php?blogId=$1&profile=$2 [L,NC] + +# Trackbacks (i.e. /3_userfoo/trackbacks/34_title-foo-bar.html) +RewriteRule ^([0-9]+)_[^/]+/trackbacks/([0-9]+)_[^.]+\.html$ index.php?op=Trackbacks&blogId=$1&articleId=$2 [L,NC] + +# Comment form (i.e. /88_userfoo/comment/34_title-foo-bar.html) +RewriteRule ^([0-9]+)_[^/]+/comment/([0-9]+)_[^.]+\.html$ index.php?op=Comment&blogId=$1&articleId=$2 [L,NC] + +# Resources (i.e. /88_userfoo/resources/this-is-a-resource-name.pdf.html) +RewriteRule ^([0-9]+)_[^/]+/resources/([^.]+)\.([^.]+)\.html$ index.php?op=ViewResource&blogId=$1&resource=$2.$3 [L,NC] + +# Download a resource (i.e. /88_userfoo/get/this-is-a-resource-name.pdf) +RewriteRule ^([0-9]+)_[^/]+/get/(.+)$ resserver.php?blogId=$1&resource=$2 [L,NC] + +# Static Pages (i.e /3_userfoo/demosites) +RewriteRule ^([0-9]+)_[^/]+/(.+)$ index.php?op=Template&blogId=$1&show=$2 [L,NC] + +# A non-default blog (i.e. /88_userfoo) +RewriteRule ^([0-9]+)_[^.]+$ index.php?blogId=$1 [L,NC] +# -- same as above but with paging included +RewriteRule ^([0-9]+)_[^.]+\.page\.([0-9]+)$ index.php?blogId=$1&page=$2 [L,NC] + +# If you would like to use custom urls but ForceType or SetType directives do +# not work on your server (e.g. PHP is running as CGI/FastCGI) you may uncomment +# the rewrite rule below to rewrite all requests to ./blog to ./blog.php. +# Please note that this works only as long as you don't change the default +# custom url patterns in your LifeType administration. +## RewriteRule ^blog/(.+) blog.php/$1 [L,NC] + + + + + ForceType application/x-httpd-php @@ -103,6 +140,6 @@ ForceType application/x-httpd-php -ErrorDocument 401 /plog/error.php -ErrorDocument 403 /plog/error.php -ErrorDocument 404 /plog/error.php +ErrorDocument 401 /error.php +ErrorDocument 403 /error.php +ErrorDocument 404 /error.php Modified: plog/branches/lifetype-1.2/runtests.php =================================================================== --- plog/branches/lifetype-1.2/runtests.php 2011-12-15 16:34:01 UTC (rev 7164) +++ plog/branches/lifetype-1.2/runtests.php 2011-12-15 16:34:32 UTC (rev 7165) @@ -1,6 +1,6 @@