Loading...
 
Features / Usability

Features / Usability


VBS and HTTP

US

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:

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

Thanks

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

Tom

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?

using
 Plugin disabled
Plugin smarty cannot be executed.
US
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_Functions

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

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


Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.