Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
fe8c4d11
Commit
fe8c4d11
authored
Jan 09, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cssification
parent
ec335004
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
301 additions
and
145 deletions
+301
-145
lib/python/Products/SiteAccess/www/AccessRuleAdd.dtml
lib/python/Products/SiteAccess/www/AccessRuleAdd.dtml
+46
-23
lib/python/Products/SiteAccess/www/SiteRootAdd.dtml
lib/python/Products/SiteAccess/www/SiteRootAdd.dtml
+81
-26
lib/python/Products/SiteAccess/www/SiteRootEdit.dtml
lib/python/Products/SiteAccess/www/SiteRootEdit.dtml
+79
-42
lib/python/Products/SiteAccess/www/VirtualHostMonster.dtml
lib/python/Products/SiteAccess/www/VirtualHostMonster.dtml
+42
-35
lib/python/Products/SiteAccess/www/VirtualHostMonsterAdd.dtml
...python/Products/SiteAccess/www/VirtualHostMonsterAdd.dtml
+53
-19
No files found.
lib/python/Products/SiteAccess/www/AccessRuleAdd.dtml
View file @
fe8c4d11
<html><head><title>
Set the Access Rule
</title>
</head>
<body
bgcolor=
"#FFFFFF"
link=
"#000099"
vlink=
"#555555"
>
<h2>
Set the Access Rule
</h2>
<dtml-var manage_page_header>
<h4>
WARNING: Access Rules are powerful, and can temporarily disable
<dtml-var "manage_form_title(this(), _,
form_title='Set Access Rule',
)">
<p class="form-help">
<strong>
WARNING: Access Rules are powerful, and can temporarily disable
Zope access! Don't use them unless you have read all about them and
know how to recover from mistakes!
</h4>
know how to recover from mistakes!
</strong>
</p>
<p>
In the form below
<em>
Rule Id
</em>
is the Id of an object in this
Zope Folder which will be called whenever the Folder is published. It
can implement rewrite rules, preload request variables, etc.
<p class="form-help">
In the form below <em>rule id</em> is the id of an object in this
Zope Folder which will be called whenever the Folder is published.
It can implement rewrite rules, preload request variables, etc.
</p>
<dtml-if "manage_getAccessRule(this())">
<p>
The current Access Rule is
<p class="form-text">
The current Access Rule is
<a href="<dtml-var "'%s/%s/manage_workspace' % (this().absolute_url(), manage_getAccessRule(this()))">">
"
<dtml-var
"
manage_getAccessRule
(
this
())"
>
"
</a>
.
</p>
"<dtml-var "manage_getAccessRule(this())">"</a>.
</p>
<dtml-else>
<p>
No Access Rule is currently set.
</p>
<p class="form-text">
No Access Rule is currently set.
</p>
</dtml-if>
<form action="manage_addAccessRule" method="post">
<table>
<tr>
<th
align=
'LEFT'
><em>
Rule Id
<em></th>
<td
align=
'LEFT'
><input
name=
"method_id"
size=
"80"
>
</td></tr>
<tr><td
colspan=
2
>
<input
type=
"SUBMIT"
name=
"submit"
value=
" Set Rule "
>
<input
type=
"SUBMIT"
name=
"none"
value=
" No Access Rule "
>
</td></tr>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Rule Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="method_id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="SUBMIT" name="submit" value=" Set Rule ">
<input class="form-element" type="SUBMIT" name="none" value=" No Access Rule ">
</div>
</td>
</tr>
</table>
</form>
</body></html>
<dtml-var manage_page_footer>
lib/python/Products/SiteAccess/www/SiteRootAdd.dtml
View file @
fe8c4d11
<HTML><HEAD><TITLE>Add a SiteRoot</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Add a SiteRoot</H2>
<p>This will change URLs generated by all objects within the same container
as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be
found) then it will replace the host:port/script portion of generated URLs.
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Add SiteRoot',
)">
<p class="form-help">
This will change URLs generated by all objects within the same container
as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be
found) then it will replace the host:port/script portion of generated URLs.
If a Path is specified (or a SiteRootPATH value can be found) then it will
replace the remainder of each URL.</p>
<p>Values affected include DTML variables starting with URL or BASE, and
the absolute_url() methods of objects.</p>
<p>If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE
and then search the REQUEST for it. The same holds for Path and SiteRootPATH.</p>
<p>Base (if specified) should <strong>always</strong> start with "http://"</p>
replace the remainder of each URL.
</p>
<p class="form-help">
Values affected include DTML variables starting with URL or BASE, and
the absolute_url() methods of objects.
</p>
<p class="form-help">
If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE
and then search the REQUEST for it. The same holds for Path and
SiteRootPATH.
</p>
<p class="form-help">
Base (if specified) should <strong>always</strong> start with
"http://"
</p>
<form action="manage_addSiteRoot" method="post">
<table>
<tr> <th align='LEFT'>Id</th>
<td align='LEFT'>SiteRoot</td></tr>
<tr> <th align='LEFT'><em>Title<em></th>
<td align='LEFT'><input name="title" size="40"></td></tr>
<tr> <th align='LEFT'><em>Base<em></th>
<td align='LEFT'><input name="base" size="40"></td></tr>
<tr> <th align='LEFT'><em>Path<em></th>
<td align='LEFT'><input name="path" size="40" value="/"></td></tr>
<tr><td colspan=2>
<input type="SUBMIT" name="submit" value=" Add ">
</td></tr>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Base
</div>
</td>
<td align="left" valign="top">
<input type="text" name="base" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Path
</div>
</td>
<td align="left" valign="top">
<input type="text" name="path" size="40" value="/" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
</div>
</td>
</tr>
</table>
</form>
</body></html>
<dtml-var manage_page_footer>
lib/python/Products/SiteAccess/www/SiteRootEdit.dtml
View file @
fe8c4d11
<html>
<head>
<title>
Edit
<dtml-var
title_or_id
></title>
</head>
<body
bgcolor=
"#ffffff"
link=
"#000099"
vlink=
"#555555"
alink=
"#77003b"
>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<h2>
Edit
<dtml-var
id
></h2>
<p>
This will change URLs generated by all objects within the same container
as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be
found) then it will replace the host:port/script portion of generated URLs.
If a Path is specified (or a SiteRootPATH value can be found) then it will
replace the remainder of each URL.
</p>
<p>
Values affected include DTML variables starting with URL or BASE, and
the absolute_url() methods of objects.
</p>
<p>
If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE
and then search the REQUEST for it. The same holds for Path and SiteRootPATH.
</p>
<p>
Base (if specified) should
<strong>
always
</strong>
start with "http://"
</p>
<p class="form-help">
This will change URLs generated by all objects within the same container
as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be
found) then it will replace the host:port/script portion of generated URLs.
If a Path is specified (or a SiteRootPATH value can be found) then it will
replace the remainder of each URL.
</p>
<p class="form-help">
Values affected include DTML variables starting with URL or BASE, and
the absolute_url() methods of objects.
</p>
<p class="form-help">
If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE
and then search the REQUEST for it. The same holds for Path and SiteRootPATH.
</p>
<p class="form-help">
Base (if specified) should <strong>always</strong> start with "http://"
</p>
<form action="manage_edit" method="POST">
<table
cellspacing=
"2"
>
<tr>
<th
align=
"left"
valign=
"top"
><em>
Title
</em></th>
<td
align=
"left"
valign=
"top"
>
<input
type=
"text"
name=
"title"
size=
"40"
value=
"&dtml-title;"
>
</td>
</tr>
<tr>
<th
align=
"left"
valign=
"top"
><em>
Base
</em></th>
<td
align=
"left"
valign=
"top"
>
<input
type=
"text"
name=
"base"
size=
"40"
value=
"<dtml-if base>&dtml-base;</dtml-if>"
>
</td>
</tr>
<tr>
<th
align=
"left"
valign=
"top"
><em>
Path
</em></th>
<td
align=
"left"
valign=
"top"
>
<input
type=
"text"
name=
"path"
size=
"40"
value=
"<dtml-if path>&dtml-path;</dtml-if>"
>
</td>
</tr>
<tr><td></td>
<td
align=
"left"
valign=
"top"
>
<input
type=
"submit"
name=
"submit"
value=
" Change "
>
</td>
</tr>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40"
value="<dtml-if title>&dtml-title;</dtml-if>" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Base
</div>
</td>
<td align="left" valign="top">
<input type="text" name="base" size="40"
value="<dtml-if base>&dtml-base;</dtml-if>" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Path
</div>
</td>
<td align="left" valign="top">
<input type="text" name="path" size="40" value="/"
value="<dtml-if path>&dtml-path;</dtml-if>" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value="Save Changes" />
</div>
</td>
</tr>
</table>
</form>
</body>
<
/html
>
<
dtml-var manage_page_footer
>
lib/python/Products/SiteAccess/www/VirtualHostMonster.dtml
View file @
fe8c4d11
<html>
<head>
<title><dtml-var
title_or_id
></title>
</head>
<body
bgcolor=
"#ffffff"
link=
"#000099"
vlink=
"#555555"
alink=
"#77003b"
>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<p>
This Virtual Host Monster changes the URLs generated inside of the
Folder in which it is placed, using information passed to it in special URL
path elements. Its purpose is to support virtual hosting, by
allowing you to centrally control the protocol, host, and path of the
URLs that Zope generates.
</p>
<p>
&dtml-id;
doesn't do anything unless you insert one or both of the
following special path elements into a URL:
<i>
VirtualHostBase
</i>
sets the protocol and host, while
<i>
VirtualHostRoot
</i>
sets the path root. You would insert
these path elements using an Apache RewriteRule or ProxyPass
directive, or with a Zope Access Rule.
</p>
<p>
If the URL path of a request begins with
"
/VirtualHostBase/http/www.foo.com
"
, for instance, then
URLs generated by Zope will start with
<b>
http://www.foo.com
</b>
.
</p><p>
If the URL contains
<i>
VirtualHostRoot
</i>
, then
all path elements up to that point are removed from generated URLs.
For instance, a request with path
"
/a/b/c/VirtualHostRoot/d
"
will generate a URL with path
<b>
/d
</b>
.
<p class="form-help">
This Virtual Host Monster changes the URLs generated inside of the
Folder in which it is placed, using information passed to it in special URL
path elements. Its purpose is to support virtual hosting, by
allowing you to centrally control the protocol, host, and path of the
URLs that Zope generates.
</p>
<p>
Combining both allows you to cause a subfolder to act as the root of a
site. For example, to publish Folder
"
/foo
"
as
<b>
http://www.foo.com/
</b>
, put a Virtual Host Monster in the root
folder and rewrite requests for that URL to
<b>
/VirtualHostBase/http/www.foo.com/foo/VirtualHostRoot/
</b>
<p class="form-help">
This object doesn't do anything unless you insert one
or both of the following special path elements into a URL:
<em>VirtualHostBase</em> sets the protocol and host, while
<em>VirtualHostRoot</em> sets the path root. You would insert
these path elements using an Apache RewriteRule or ProxyPass
directive, or with a Zope Access Rule.
</p>
<p class="form-help">
If the URL path of a request begins with
"/VirtualHostBase/http/www.foo.com", for instance, then
URLs generated by Zope will start with <strong>http://www.foo.com</strong>.
</p>
<p class="form-help">
If the URL contains <em>VirtualHostRoot</em>, then
all path elements up to that point are removed from generated URLs.
For instance, a request with path "/a/b/c/VirtualHostRoot/d"
will generate a URL with path <strong>/d</strong>.
</p>
<p>
Values affected include DTML variables starting with URL or BASE
(such as URL1, BASE2, URLPATH0), and
the absolute_url() methods of objects.
</p>
</body>
</html>
<p class="form-help">
Combining both allows you to cause a subfolder to act as the root of a
site. For example, to publish Folder "/foo" as
<strong>http://www.foo.com/</strong>, put a Virtual Host Monster in the root
folder and rewrite requests for that URL to
<strong>/VirtualHostBase/http/www.foo.com/foo/VirtualHostRoot/</strong>
</p>
<p class="form-help">
Values affected include DTML variables starting with URL or BASE
(such as URL1, BASE2, URLPATH0), and
the absolute_url() methods of objects.
</p>
<dtml-var manage_page_footer>
lib/python/Products/SiteAccess/www/VirtualHostMonsterAdd.dtml
View file @
fe8c4d11
<
HTML><HEAD><TITLE>Add a Virtual Host Monster</TITLE
>
</HEAD>
<
BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Add a Virtual Host Monster</H2>
<form action="manage_addVirtualHostMonster" method="post
">
<b>Id:</b> <input name="id" size="40">
<
input type="SUBMIT" name="submit" value=" Add
">
</form>
<p>
<i>This is only useful if you are using some rewriting tool
(Apache or an Access Rule, for example) to insert these special
elements into your URL.
</i><br><br>
A Virtual Host Monster changes the URLs generated by all objects
within the same Folder, using information passed to it in special URL
path elements.<br><br
>
<
dtml-var manage_page_header
>
<
dtml-var "manage_form_title(this(), _,
form_title='Add Virtual Host Monster',
)
">
<
p class="form-help
">
A Virtual Host Monster changes the URLs generated by all objects
within the same Folder, using information passed to it in special URL
path elements. This is useful if you are using some rewriting tool
(Apache or an Access Rule, for example) to insert these special
elements into your URL.
</p>
<p class="form-help"
>
To set the protocol ('http', 'https') and host ('www.foo.com') portion
of generated URLs, insert "VirtualHostBase", the protocol,
and the host into the path.<br><br>
and the host into the path.
</p>
<p class="form-help">
Insert "VirtualHostRoot" directly after the name of the
Folder that is supposed to be the root of the virtual host.<br><br>
For example, to publish Folder "/foo" as <b>http://www.foo.com/</b>,
put a Virtual Host Monster in the root folder and rewrite requests for that
URL to <b>/VirtualHostBase/http/www.foo.com/foo/VirtualHostRoot/</b>
</p>
<p>Values affected include DTML variables starting with URL or BASE, and
the absolute_url() methods of objects.</p>
</body></html>
<p class="form-help">
Values affected include DTML variables starting with URL or BASE, and
the absolute_url() methods of objects.
</p>
<form action="manage_addVirtualHostMonster" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment