zForum: friendly urls patch.
Sorry. Не знал куда его положить, но хотелось, чтобы заинтересованные уже начали тестировать и сказали свое фе.
$pwd
/home/user/zope-products/zForum-1.16
$patch -p1 -R -b < zForum_friendly_urls.patch
...
Apache: vhosts.d
<VirtualHost XXX.XXX.XXX.XXX:80>
...
...
RewriteEngine On
# Friendly URLs
RewriteRule ^/view_forum/(.*)/(.*) /zforum/view_forum?forum_id=$1&start=$2 [L,P]
RewriteRule ^/view_topic/(.*)/(.*) /zforum/view_topic?topic_id=$1&start=$2 [L,P]
RewriteRule ^/message_new/(.*) /message_new?mto=$1 [L,P]
RewriteRule ^/add_topic_form/forum_id/(.*) /add_topic_form?forum_id=$1 [L,P]
RewriteRule ^/edit_topic_form/topic_id/(.*) /edit_topic_form?topic_id=$1 [L,P]
RewriteRule ^/view_topic/(.*)/zfReportInappropriate/(.*)/(.* ) /view_topic/topic_id=$1/zfReportInappropriate/topic_id=$2&referer_id=$3
RewriteRule ^/message_html/(.*) /message_html?cat_id=$1 [L,P]
RewriteRule ^/message_html/(.*)/(.*) /message_html?forum_id=$1&cat_id=$2 [L,P]
RewriteRule ^/message_reply/(.*)/(.*)/(.*) /message_reply?pm_id=$1&cat_id=$2&forum_id=$3 [L,P]
RewriteRule ^/message_new/(.*)/(.*) /message_new?forum_id=$1&cat_id=$2 [L,P]
RewriteRule ^/message_view/(.*)/(.*)/(.*)/(.*) /message_view?pm_id=$1&read=$2&forum_id=$3&cat_id=$2 [L,P]
RewriteRule ^/zfUnSubscribeForum/forum_id/(.*) /zfUnSubscribeForum?forum_id=$1 [L,P]
RewriteRule ^/zfSubscribeForum/forum_id/(.*) /zfSubscribeForum?forum_id=$1 [L,P]
RewriteRule ^/feed_rss/(.*) /zforum/feed_rss?section=$1 [L,P]
RewriteRule ^/(.*)$ http://127.0.0.1:[XXXX]/VirtualHostBase/http/hostname.org:80/path/zforum/VirtualHostRoot/$1 [L,P]
</VirtualHost>
|