Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


VBS and HTTP

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

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

posts: 215

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

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?

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

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