Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First of all just make a web2py view that contains {{=BEAUTIFY(response.env)}} you will be able to see all environment systems variables defined in web2py. </p> <p>Look into slide 24 (www.web2py.com) to see the default mapping of urls into web2py variables.</p> <p>To solve your problem, the easier way would be to change the paths in the flash code, but I will assume you do not want to do that. I will assume instead your urls all look like</p> <pre><code>http://127.0.0.1:8000/[..script..].php[..anything..] </code></pre> <p>and your web2py app is called "app".</p> <p>Here is what you do:</p> <p>Create routes.py in the main web2py folder that contains</p> <pre><code>routes_in=(('/(?P&lt;script&gt;\w+)\.php(?P&lt;anything&gt;.*)', '/app/default/\g&lt;script&gt;\g&lt;anything&gt;'), (('/flash.swf','/app/static/slash.swf')) routes_out(('/app/default/(?P&lt;script&gt;\w+)\.php(?P&lt;anything&gt;.*)', '/\g&lt;script&gt;\.php\g&lt;anything&gt;'),) </code></pre> <p>this maps</p> <pre><code>http://127.0.0.1:8000/index.php into http://127.0.0.1:8000/app/default/index http://127.0.0.1:8000/index.php/junk into http://127.0.0.1:8000/app/default/index/junk http://127.0.0.1:8000/flash.swf into http://127.0.0.1:8000/app/static/flash.swf </code></pre> <p>create a controller default.py that contains</p> <pre><code>def index(): return dict() </code></pre> <p>Put the file "flash.swf" in the "app/static" folder.</p> <p>Create a view default/index.html that contains</p> <pre><code>&lt;object classid="clsid:XXXXXXXXX-YYYY-ZZZZ-AAAA-BBBBBBBBBB" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="main" align="middle"&gt; &lt;param name="allowScriptAccess" value="all" /&gt; &lt;param name="flashvars" value= /&gt; &lt;param name="movie" value="flash.swf?{{=request.env.web2py_original_uri[len(request.function)+5:]}}" /&gt; &lt;param name="loop" value="false" /&gt; &lt;param name="quality" value="high" /&gt; &lt;param name="bgcolor" value="#eeeeee" /&gt; &lt;embed src="flash.swf?{{=request.env.web2py_original_uri[len(request.function)+5:]}}" /&gt; " loop="false" quality="high" bgcolor="#eeeeee" width="100%" height="100%" name="main" align="middle" allowScriptAccess="all" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /&gt; &lt;/object&gt; </code></pre> <p>I am not sure on whether it is "+5" or "+4"above. Give it a try.</p> <p>I suggest moving this discussion on the web2py mailing list since there is a much simpler way by changing the paths.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload