HTTP Anti-Virus Proxy http://havp.hege.li/forum/ |
|
variables into HAVP templates http://havp.hege.li/forum/viewtopic.php?f=3&t=412 |
Page 1 of 1 |
Author: | daniele_dll [ 23 Feb 2009 14:30 ] |
Post subject: | variables into HAVP templates |
Hi to all, this is my first post here I've looked around but i haven't founded nothing about :\ There is a way to put variables into templates? I need to make templates with the same apparence for some packages (squidguard, havp, captive portal and so on). On HAVP i can't put variables but i need them because i have styles and images into the template and them reside on the webserver of the machine ... so i need to put the IP of the machine into variables because ip of machine change :\ |
Author: | hege [ 23 Feb 2009 16:45 ] |
Post subject: | Re: variables into HAVP templates |
Sorry not possible currently.. patches are welcome. |
Author: | daniele_dll [ 23 Feb 2009 19:41 ] |
Post subject: | Re: variables into HAVP templates |
there is an SVN repository for the havp source code? is a problem implementing it using preg library? |
Author: | hege [ 23 Feb 2009 20:27 ] |
Post subject: | Re: variables into HAVP templates |
http://havp.cvs.sourceforge.net/havp/ I'm not sure what "variables" you exactly mean, but proxyhandler.cpp already has some simple substitutions.. SearchReplace( Response, "<!--message-->", message ); SearchReplace( Response, "<!--clientip-->", ToBrowser.GetIP() ); SearchReplace( Response, "<!--url-->", ToBrowser.GetCompleteRequest() ); |
Author: | daniele_dll [ 23 Feb 2009 20:32 ] |
Post subject: | Re: variables into HAVP templates |
hege wrote: http://havp.cvs.sourceforge.net/havp/ I'm not sure what "variables" you exactly mean, but proxyhandler.cpp already has some simple substitutions.. SearchReplace( Response, "<!--message-->", message ); SearchReplace( Response, "<!--clientip-->", ToBrowser.GetIP() ); SearchReplace( Response, "<!--url-->", ToBrowser.GetCompleteRequest() ); Ah, ok, i was looking exactly for these kinda of variable Would be great let the "template" to be executed on request if #! is founded as first characters (after BOM eventually if file is in UTF-8). If i found sometime this weekend i'll look on how implement this (on non embedded systems this can be useful for generate content on the fly) |
Page 1 of 1 | All times are UTC + 2 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |