Features / Usability

Features / Usability


posts: 41 US


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:

<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:

<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?


posts: 214

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

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

And PluginSmarty 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}"}


posts: 41 US

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?

 Plugin disabled
Plugin smarty cannot be executed.
posts: 41 US
Also no function.eval in lib\smarty\libs\plugins, where can I get this?

posts: 214

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:

I found a closed problem about the smarty plugin and eval:

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.