[MTOS-dev] A complementary implementation of MT::App::Viewer [r1127]

Hirotaka Ogawa hirotaka.ogawa at gmail.com
Sun Dec 30 23:08:35 PST 2007


Hello,

This patch report is intended to provide a complete implementation of
MT::App::Viewer to MTOS.

BRIEF SUMMARY:
The attached file is a patch to MTOS [r1127], which allows you to use
mt-view.cgi and MT::App::Viewer.

RATIONALE:

Users cannot use mt-view.cgi properly in MT 4.0/4.1, because
MT::App::Viewer is not completely implemented.  %view_handlers is
defined to use _view_archive() function, but _view_archive() function
itself is not defined.  And, _view_date_archive(), _view_entry(), and
_view_category() have been obsoleted.

TECHNICAL OVERVIEW:

This patch only provides modifications to MT::App::Viewer, which adds
the definition of _view_archive(), and modifies view() and
_view_index() in order to properly handle any indexes and archives.

After applying this patch, you'll be able to use mt-view.cgi and show
any indexes and archives by URLs as like:

   http://your.domain.name/mtdir/mt-view.cgi?blog_id=1&uri=/blog/

blog_id indicates a blog ID, and uri indicates the URI of the target
index or archive.

Also, you will be able to invoke mt-view.cgi based on "REQUEST_URI"
environment variable, by facilitating Apache mod_rewrite.

   Options -Indexes +SymLinksIfOwnerMatch
   <IfModule mod_rewrite.c>
     <IfModule mod_dir.c>
       DirectoryIndex index.php index.html index.htm default.htm
default.html default.asp /MTDIR/mt-view.cgi?blog_id=1
     </IfModule>
     RewriteEngine on
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^(.*)$ /MTDIR/mt-view.cgi?blog_id=1 [L,QSA]
   </IfModule>
   <IfModule !mod_rewrite.c>
     ErrorDocument 404 /MTDIR/mt-view.cgi?blog_id=1
     ErrorDocument 403 /MTDIR/mt-view.cgi?blog_id=1
   </IfModule>

-- 
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtos-r1127-mt-app-viewer.patch
Type: text/x-patch
Size: 5590 bytes
Desc: not available
Url : http://www.sixapart.com/pipermail/mtos-dev/attachments/20071231/fbc665b8/attachment.bin 


More information about the MTOS-dev mailing list