Loading...
 
Skip to main content

Features / Usability


VBS and HTTP

Hello,

I am trying to capture HTTP header info with VBS and was woundering if tiki allows VBS. It seems like this code should work but it does not; using HTML that is:

Copy to clipboard
<head> </head> <body> <script type="text/vbscript"> <!-- document.write("Hello World") //--> </script> <p>This is web page body </p> </body>


It also looks like this implementation does not work either:

Copy to clipboard
<b>You are browsing this site with:</b> <%Response.Write(Request.ServerVariables("http_user_agent"))%>


Is there a better way to grab HTTP info in tiki, or am I just not implementing the VBS correctly?

Thanks

There are some plugins that might give you what you are after.

PluginAgentinfoQuestion can give you the IP address, Browser, and server software.

And PluginSmartyQuestion can be used to give you other server and execution environment variables.

This should give you the "http_user_agent":
{smarty name="eval" var="{$smarty.server.HTTP_USER_AGENT}"}

Tom

Hi Tom,

Thanks for the reply.

I have smarty plugin activated in my admin plugins, but I am getting errors like:
Incorrect parameter

Any idea why?

using
Also no function.eval in lib\smarty\libs\plugins, where can I get this?

I tested and Smarty eval works in my Tiki 12, 13, 14, and 15 test installs. I don't remember having to do anything to smarty to get them to work.

Maybe eval is disabled on your system? I found this:
https://doc.tiki.org/Requirements#Required_PHP_FunctionsQuestion

I found a closed problem about the smarty plugin and eval:
https://dev.tiki.org/item4527Question

I find /smarty/libs/plugins/function.eval.php in my test Tiki 2 through Tiki 7, but not in any of the others. Maybe that isn't the file smarty uses for eval anymore?

Sorry it isn't working for you.

Tom