41
41
forum_base = "php/phpBB3"
42
#forum_base = "/phpBB3"
44
43
# Set request attributes
46
# These files don't really exist - just a test of our linking
48
#req.styles = ["media/dummy/dummy.css"]
49
#req.scripts = ["media/dummy/dummy.js", "media/dummy/hello.js"]
45
req.styles = ["media/forum/forum.css"]
51
47
# Process URL for special directives
52
48
url = urlparse.urlparse(req.path)
65
61
framequery += 't=' + topic.group(1)
66
62
forum_page = "viewtopic.php"
69
#req.write(framequery + '\n')
71
64
# If the tail of the forum url is empty or a known special request
72
65
# then wrap the page in the headers and footer and load the default or
73
66
# special page in the ivlebody frame
78
71
frameurl = util.make_path(path.join(forum_base,location))
79
72
req.content_type = "text/html"
80
73
req.write_html_head_foot = True
83
' style="top:0;width:100%;height:100%;position:absolute"' +
85
' data="' + frameurl + framequery + '"' +
88
# Otherwise serve the page without the wrapper
91
# req.throw_error(req.HTTP_BAD_REQUEST)
95
# Let the Server determine the MIME type
96
# req.content_type = ""
98
# Don't write header or footer - we can't tell if it's HTML or
99
# something else like an image
100
# req.write_html_head_foot = False
102
# Do some basic dispatch, if it ends in .php interpret with php-cgi
103
# if re.search('\.php$',hierarchical_part,re.IGNORECASE):
104
# interpret.execute_cgi(
105
# ['/usr/bin/php5-cgi'],
109
# Otherwise just ship the file directly
111
#req.content_type = "application/x-httpd-php"
112
# file_path = os.path.join(forum_base, req.path)
113
# if os.access(file_path,os.R_OK):
114
# req.sendfile(path.join(forum_base, req.path))
115
# If we can't read the file, throw HTTP Error
117
# req.throw_error(req.HTTP_BAD_REQUEST)
74
req.write('<object class="fullscreen" type="text/html" data="%s">'%
75
(frameurl + framequery))