From 52a0237bf21b49c081045424377834a7dfd7548e Mon Sep 17 00:00:00 2001 From: allo <allo@6c8d7289-2bf4-0310-a012-ef5d649a1542> Date: Mon, 21 Nov 2005 08:33:54 +0000 Subject: [PATCH] using Filetemplates for #[metas]# and other static includes git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1116 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Blacklist_p.html | 6 +++--- htroot/CacheAdmin_p.html | 6 +++--- htroot/Config_p.html | 6 +++--- htroot/Connections_p.html | 6 +++--- htroot/CookieMonitorIncoming_p.html | 8 +++---- htroot/CookieMonitorOutgoing_p.html | 8 +++---- htroot/EditProfile_p.html | 6 +++--- htroot/Help.html | 6 +++--- htroot/IndexControl_p.html | 6 +++--- htroot/IndexCreateIndexingQueue_p.html | 8 +++---- htroot/IndexCreateLoaderQueue_p.html | 8 +++---- htroot/IndexCreateWWWGlobalQueue_p.html | 8 +++---- htroot/IndexCreateWWWLocalQueue_p.html | 8 +++---- htroot/IndexCreate_p.html | 8 +++---- htroot/IndexImport_p.html | 6 +++--- htroot/IndexMonitor.html | 6 +++--- htroot/IndexShare_p.html | 6 +++--- htroot/IndexTransfer_p.html | 6 +++--- htroot/Lab.html | 6 +++--- htroot/Language_p.html | 6 +++--- htroot/Log_p.html | 2 +- htroot/MessageSend_p.html | 6 +++--- htroot/Messages_p.html | 6 +++--- htroot/Network.html | 6 +++--- htroot/News.html | 6 +++--- htroot/PerformanceMemory_p.html | 8 +++---- htroot/PerformanceQueues_p.html | 8 +++---- htroot/PerformanceSearch_p.html | 8 +++---- htroot/ProxyIndexingMonitor_p.html | 6 +++--- htroot/QuickCrawlLink_p.html | 2 +- htroot/SettingsAck_p.html | 6 +++--- htroot/Settings_p.html | 6 +++--- htroot/Skins_p.html | 6 +++--- htroot/Statistics.html | 6 +++--- htroot/Status.html | 6 +++--- htroot/Steering.html | 2 +- htroot/User.html | 6 +++--- htroot/ViewFile.html | 6 +++--- htroot/ViewLog_p.html | 6 +++--- htroot/ViewProfile.html | 6 +++--- htroot/WatchCrawler.html | 6 +++--- htroot/Wiki.html | 6 +++--- htroot/index.html | 6 +++--- htroot/sharedBlacklist_p.html | 6 +++--- htroot/simple_search.html | 2 +- source/de/anomic/http/httpTemplate.java | 24 +++++++++++++++++++++ source/de/anomic/http/httpdFileHandler.java | 23 ++------------------ 47 files changed, 163 insertions(+), 158 deletions(-) diff --git a/htroot/Blacklist_p.html b/htroot/Blacklist_p.html index 5533e6513..3a78a2689 100644 --- a/htroot/Blacklist_p.html +++ b/htroot/Blacklist_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Blacklist Manager</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Blacklist</h2> <p>This function provides an URL filter to the proxy; any blacklisted URL is blocked @@ -116,6 +116,6 @@ File: <input type="text" name="file"> #(/status)# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/CacheAdmin_p.html b/htroot/CacheAdmin_p.html index 010c619a7..a0489d5d0 100644 --- a/htroot/CacheAdmin_p.html +++ b/htroot/CacheAdmin_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Local Cache Management</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Local Cache</h2><br> @@ -21,6 +21,6 @@ The current cache size is #[cachesize]# KB. The maximum cache size is #[cachemax </td> </tr></table> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Config_p.html b/htroot/Config_p.html index b9ef6bff1..9538437b3 100644 --- a/htroot/Config_p.html +++ b/htroot/Config_p.html @@ -2,7 +2,7 @@ <html> <head> <title>YaCy '#[clientname]#': Advanced Config</title> -#[metas]# +#%env/templates/metas.template%# <script> <!-- function element_clicked(element){ @@ -13,7 +13,7 @@ document.getElementById("value").value=element.value; </script> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Advanced Config</h2> <p> @@ -32,6 +32,6 @@ For explanation please look into yacy.init -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Connections_p.html b/htroot/Connections_p.html index f13af8523..739d55e4d 100644 --- a/htroot/Connections_p.html +++ b/htroot/Connections_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Connection Tracking</title> -#[metas]# +#%env/templates/metas.template%# <meta http-equiv="REFRESH" content="30"> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <p><h2>Connection Tracking</h2></p> <p><h3>Incoming Connections</h3></p> <p>Showing #[numActiveRunning]# active connections, #[numActivePending]# pending connections from a max. of #[numMax]# allowed incoming connections.<br> @@ -32,7 +32,7 @@ </table> </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> \ No newline at end of file diff --git a/htroot/CookieMonitorIncoming_p.html b/htroot/CookieMonitorIncoming_p.html index 2f2007f3e..a94525d67 100644 --- a/htroot/CookieMonitorIncoming_p.html +++ b/htroot/CookieMonitorIncoming_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Incoming Cookies Monitor</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuCookie]# +#%env/templates/header.template%# +#%env/templates/submenuCookie.template%# <br> <h2>Cookie Monitor: Incoming Cookies</h2> <font size="1"> @@ -30,6 +30,6 @@ Showing #[num]# entries from a total of #[total]# Cookies.<br> </table> </p> </font> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/CookieMonitorOutgoing_p.html b/htroot/CookieMonitorOutgoing_p.html index df673096c..ae6371592 100644 --- a/htroot/CookieMonitorOutgoing_p.html +++ b/htroot/CookieMonitorOutgoing_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Outgoing Cookies Monitor</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuCookie]# +#%env/templates/header.template%# +#%env/templates/submenuCookie.template%# <br> <h2>Cookie Monitor: Outgoing Cookies</h2> <font size="1"> @@ -30,6 +30,6 @@ Showing #[num]# entries from a total of #[total]# Cookies.<br> </table> </p> </font> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/EditProfile_p.html b/htroot/EditProfile_p.html index 3432d7394..ded879c5d 100644 --- a/htroot/EditProfile_p.html +++ b/htroot/EditProfile_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Your Personal Profile</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Your Personal Profile</h2> <p> @@ -70,7 +70,7 @@ You do not need to provide any personal data here, but if you want to distribute </table> </form> -#[footer]# +#%env/templates/footer.template%# </body> </html> </td></tr> diff --git a/htroot/Help.html b/htroot/Help.html index 4bc0e5470..71306d3ee 100644 --- a/htroot/Help.html +++ b/htroot/Help.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy: Help</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Help</h2> @@ -105,6 +105,6 @@ This matches heise.de/ with a string in front of it, for example "http://www.", A possible URL which would match this regexp is: http://www.heise.de/newsticker/meldung/59421<br> An URL which would not match is: http://www.heise.de/tp/r4/artikel/20/20701/1.html<br> There is ".html" at the end, which is not included with the Regular Expression. -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexControl_p.html b/htroot/IndexControl_p.html index 14822f817..77cf1b3ae 100644 --- a/htroot/IndexControl_p.html +++ b/htroot/IndexControl_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Index Control</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Index Administration</h2> @@ -97,6 +97,6 @@ The DHT-rules do not work without this function.</td> #[result]# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexCreateIndexingQueue_p.html b/htroot/IndexCreateIndexingQueue_p.html index 30e7253db..b43c518a2 100644 --- a/htroot/IndexCreateIndexingQueue_p.html +++ b/htroot/IndexCreateIndexingQueue_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Index Creation/Indexing Queue</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%# <br> <h2>Index Creation: Indexing Queue</h2> @@ -77,6 +77,6 @@ There are #[num]# entries in the rejected-queue:<br> #(/rejected)# </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexCreateLoaderQueue_p.html b/htroot/IndexCreateLoaderQueue_p.html index 3f4d71a2d..300efdee9 100644 --- a/htroot/IndexCreateLoaderQueue_p.html +++ b/htroot/IndexCreateLoaderQueue_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Index Creation / Loader Queue</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%# <br> <h2>Index Creation: Loader Queue</h2> @@ -32,6 +32,6 @@ There are #[num]# entries in the loader set:<br> #(/loader-set)# </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexCreateWWWGlobalQueue_p.html b/htroot/IndexCreateWWWGlobalQueue_p.html index 83dbb214e..fcd6824b7 100644 --- a/htroot/IndexCreateWWWGlobalQueue_p.html +++ b/htroot/IndexCreateWWWGlobalQueue_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Index Creation / WWW Global Crawl Queue</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%# <br> <h2>Index Creation: WWW Global Crawl Queue</h2> <p> @@ -45,6 +45,6 @@ There are #[num]# entries in the global crawler queue. Showing #[show-num]# most #(/crawler-queue)# </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexCreateWWWLocalQueue_p.html b/htroot/IndexCreateWWWLocalQueue_p.html index f46d34f1d..fe83d7c4a 100644 --- a/htroot/IndexCreateWWWLocalQueue_p.html +++ b/htroot/IndexCreateWWWLocalQueue_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Index Creation / WWW Local Crawl Queue</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%# <br> <h2>Index Creation: WWW Local Crawl Queue</h2> <p> @@ -47,6 +47,6 @@ There are #[num]# entries in the local crawler queue. Showing #[show-num]# most #(/crawler-queue)# </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexCreate_p.html b/htroot/IndexCreate_p.html index a6b7acc20..32a5f64d1 100644 --- a/htroot/IndexCreate_p.html +++ b/htroot/IndexCreate_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Index Creation</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%# <br> <h2>Index Creation</h2> @@ -312,6 +312,6 @@ No remote crawl peers availible.<br> #(/remoteCrawlPeers)# </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexImport_p.html b/htroot/IndexImport_p.html index de91a5038..acf5435c0 100644 --- a/htroot/IndexImport_p.html +++ b/htroot/IndexImport_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Index Import</title> -#[metas]# +#%env/templates/metas.template%# <meta http-equiv="REFRESH" content="30"> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Index DB Import</h2> @@ -100,6 +100,6 @@ </form> <p><font size="-3"><i>Last Refresh:</i> #[date]#</font></p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexMonitor.html b/htroot/IndexMonitor.html index bbcc4dfc9..012a785ac 100644 --- a/htroot/IndexMonitor.html +++ b/htroot/IndexMonitor.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Index Monitor</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <table width="100%" border="0" cellpadding="0" cellspacing="0" class="SubMenu"> <tr height="10"><td colspan="13" class="MenuHeader"> Index Monitor Menu</td></tr> <tr height="2"><td colspan="13"></td></tr> @@ -123,6 +123,6 @@ Showing latest #[count]# lines from a stack of #[all]# entries. </p> :: #(/table)# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexShare_p.html b/htroot/IndexShare_p.html index a86bc00da..a3032825d 100644 --- a/htroot/IndexShare_p.html +++ b/htroot/IndexShare_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Index Sharing</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Index Sharing</h2> @@ -38,6 +38,6 @@ The local index currently consists of (at least) #[wcount]# reverse word indexes </tr> </table> </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/IndexTransfer_p.html b/htroot/IndexTransfer_p.html index a8fd10a6e..66665f652 100644 --- a/htroot/IndexTransfer_p.html +++ b/htroot/IndexTransfer_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Index Transfer</title> -#[metas]# +#%env/templates/metas.template%# <meta http-equiv="REFRESH" content="30"> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Index Transfer</h2> @@ -74,6 +74,6 @@ </form> <p><font size="-3"><i>Last Refresh:</i> #[date]#</font></p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Lab.html b/htroot/Lab.html index d2a481b20..1e50d4906 100644 --- a/htroot/Lab.html +++ b/htroot/Lab.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Lab</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>The YACY Lab</h2> @@ -19,6 +19,6 @@ You may try out these things but please do not care about bugs.</p> <li>Advanced <a href="/Config_p.html">Configuration</a></li> </ul> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Language_p.html b/htroot/Language_p.html index 6184b748d..7dfb29a01 100644 --- a/htroot/Language_p.html +++ b/htroot/Language_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Language selection</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Language selection</h2> <p> @@ -43,6 +43,6 @@ Unable to get URL: #[url]# Error saving the language file. #(status)#</b> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Log_p.html b/htroot/Log_p.html index 9165243e7..9219047f7 100644 --- a/htroot/Log_p.html +++ b/htroot/Log_p.html @@ -1,6 +1,6 @@ <html> <head> -#[metas]# +#%env/templates/metas.template%# </head> <body> <pre> diff --git a/htroot/MessageSend_p.html b/htroot/MessageSend_p.html index 278f0362a..9dfddf038 100644 --- a/htroot/MessageSend_p.html +++ b/htroot/MessageSend_p.html @@ -2,15 +2,15 @@ <html> <head> <title>YaCy '#[clientname]#': Send message</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Send message</h2><br> #[body]# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Messages_p.html b/htroot/Messages_p.html index 2ff8495f4..ffedb2fe7 100644 --- a/htroot/Messages_p.html +++ b/htroot/Messages_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Messages</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Messages</h2><br> @@ -13,6 +13,6 @@ #[messages]# </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Network.html b/htroot/Network.html index 449627534..fc9daf264 100644 --- a/htroot/Network.html +++ b/htroot/Network.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Network Overview</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <table width="100%" border="0" cellpadding="0" cellspacing="0" class="SubMenu"> <tr height="10"><td colspan="7" class="MenuHeader"> Network Menu</td></tr> <tr height="2"><td colspan="7"></td></tr> @@ -243,7 +243,7 @@ To do this, press this button: </table> </form> #(/table)# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/News.html b/htroot/News.html index f1e23d22c..73ff3df9e 100644 --- a/htroot/News.html +++ b/htroot/News.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': News</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <table width="100%" border="0" cellpadding="0" cellspacing="0" class="SubMenu"> <tr height="10"><td colspan="9" class="MenuHeader"> Network Menu</td></tr> <tr height="2"><td colspan="9"></td></tr> @@ -92,6 +92,6 @@ you can stop the broadcast if you want.</li> </form> </p> #(/table)# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/PerformanceMemory_p.html b/htroot/PerformanceMemory_p.html index 608440541..654c6d715 100644 --- a/htroot/PerformanceMemory_p.html +++ b/htroot/PerformanceMemory_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Performance Settings for Memory</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuPerformance]# +#%env/templates/header.template%# +#%env/templates/submenuPerformance.template%# <br> <h2>Performance Settings for Memory</h2> @@ -312,6 +312,6 @@ Increasing this cache may speed up crawling, but not much space is needed, so th </table> </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/PerformanceQueues_p.html b/htroot/PerformanceQueues_p.html index 0878438d3..1c96db534 100644 --- a/htroot/PerformanceQueues_p.html +++ b/htroot/PerformanceQueues_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Performance Settings of Queues and Processes</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuPerformance]# +#%env/templates/header.template%# +#%env/templates/submenuPerformance.template%# <br> <h2>Performance Settings of Queues and Processes</h2> @@ -178,6 +178,6 @@ Changes take effect immediately</td> </form> </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/PerformanceSearch_p.html b/htroot/PerformanceSearch_p.html index df832a190..e3a848130 100644 --- a/htroot/PerformanceSearch_p.html +++ b/htroot/PerformanceSearch_p.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Performance Settings of Search Sequence</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# -#[submenuPerformance]# +#%env/templates/header.template%# +#%env/templates/submenuPerformance.template%# <br> <h2>Timing Settings of Search Sequence</h2> @@ -113,6 +113,6 @@ The network picture below shows how the latest search query was solved by asking corresponding peers in the DHT: <img src="SearchEventPicture.png"> </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/ProxyIndexingMonitor_p.html b/htroot/ProxyIndexingMonitor_p.html index d88be97b8..bbdaa9d08 100644 --- a/htroot/ProxyIndexingMonitor_p.html +++ b/htroot/ProxyIndexingMonitor_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Proxy Index Monitor</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Index Monitor for Proxy Indexing</h2> <p> @@ -86,6 +86,6 @@ Please delete that file and restart.</b><br> on the <a href="/IndexMonitor.html?process=4">Proxy Index Monitor</a> Page. </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/QuickCrawlLink_p.html b/htroot/QuickCrawlLink_p.html index 5a6f6a108..1dc541f2d 100644 --- a/htroot/QuickCrawlLink_p.html +++ b/htroot/QuickCrawlLink_p.html @@ -1,7 +1,7 @@ <html> <head> <title>YaCy '#[clientname]#': Quick Crawl Link</title> - #[metas]# + #%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> diff --git a/htroot/SettingsAck_p.html b/htroot/SettingsAck_p.html index 271ebfde6..cf4a1b55b 100644 --- a/htroot/SettingsAck_p.html +++ b/htroot/SettingsAck_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Settings Acknowledge</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Settings Receipt:</h2> @@ -157,6 +157,6 @@ This values seems not to be a valid port configuration. #(/info)# </p> <p>You can now go back to the <a href="Settings_p.html">Settings</a> page if you want to make more changes.</p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Settings_p.html b/htroot/Settings_p.html index 369c1eb8b..788f02b27 100644 --- a/htroot/Settings_p.html +++ b/htroot/Settings_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Settings</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Settings</h2> <p>This is the configuration page for YaCy. Access to this page should be limited to an administration person only. @@ -45,6 +45,6 @@ delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root fold </p> #%[settingsTables]%# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Skins_p.html b/htroot/Skins_p.html index 61db89078..a4c5cc45f 100644 --- a/htroot/Skins_p.html +++ b/htroot/Skins_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Skins</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Skin selection</h2> <p> @@ -39,6 +39,6 @@ Unable to get URL: #[url]# Error saving the skin. #(status)#</b> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Statistics.html b/htroot/Statistics.html index d5f072635..8da379b19 100644 --- a/htroot/Statistics.html +++ b/htroot/Statistics.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Statistics</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <table width="100%" border="0" cellpadding="0" cellspacing="0" class="SubMenu"> <tr height="10"><td colspan="7" class="MenuHeader"> Statistics Menu</td></tr> <tr height="2"><td colspan="7"></td></tr> @@ -44,6 +44,6 @@ and someone must have clicked on that link; then the referrer pages appears here :: <h2>Zeitgeist</h2> #(/page)# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Status.html b/htroot/Status.html index 07c6fc404..cbe2b1b13 100644 --- a/htroot/Status.html +++ b/htroot/Status.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Status</title> -#[metas]# +#%env/templates/metas.template%# <meta http-equiv="REFRESH" content="30"> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>System-, Index- and Peer-Status</h2> @@ -110,6 +110,6 @@ To switch online-mode, press one of the following buttons: #%[privateStatusTable]%# <p><font size="-3"><i>Last Refresh:</i> #[date]#</font></p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Steering.html b/htroot/Steering.html index af1faf18c..4b4125842 100644 --- a/htroot/Steering.html +++ b/htroot/Steering.html @@ -2,7 +2,7 @@ <html> <head> <title>YaCy '#[clientname]#': Steering</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="40" leftmargin="40" topmargin="0"> diff --git a/htroot/User.html b/htroot/User.html index cc6ccaf25..8b73f6030 100644 --- a/htroot/User.html +++ b/htroot/User.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': User Page</title> -#[metas]# +#%env/templates/metas.template%# </head> <body> -#[header]# +#%env/templates/header.template%# <br><br> <h2>User Page</h2><br> #(logged-in)# @@ -53,6 +53,6 @@ new Password is empty. #(/status)# </b> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html index e6db2b36f..648192f1b 100644 --- a/htroot/ViewFile.html +++ b/htroot/ViewFile.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': View URL Content</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>View URL Content</h2> @@ -84,6 +84,6 @@ Unable to parse resource content. #(/viewMode)# </p> -#[footer]# +#%env/templates/footer.template%# </body> </html> \ No newline at end of file diff --git a/htroot/ViewLog_p.html b/htroot/ViewLog_p.html index 6e564e445..48dafc925 100644 --- a/htroot/ViewLog_p.html +++ b/htroot/ViewLog_p.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Log</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Log</h2><br> @@ -20,6 +20,6 @@ </tr></table> </form> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/ViewProfile.html b/htroot/ViewProfile.html index 7280755d5..ac06f550f 100644 --- a/htroot/ViewProfile.html +++ b/htroot/ViewProfile.html @@ -2,10 +2,10 @@ <html> <head> <title>YaCy '#[clientname]#': Remote Peer Profile</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Remote Peer Profile:</h2> <p> @@ -72,6 +72,6 @@ The peer #[peername]# is not online. #{/other}# </table> #(/success)# -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/WatchCrawler.html b/htroot/WatchCrawler.html index 5ffbdedc8..caa112ab5 100644 --- a/htroot/WatchCrawler.html +++ b/htroot/WatchCrawler.html @@ -2,12 +2,12 @@ <html> <head> <title>YaCy '#[clientname]#': Watch Crawler</title> -#[metas]# +#%env/templates/metas.template%# <script src="/js/ajax.js"></script> <script src="/js/WatchCrawler.js"></script> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br> <h2>Watch Crawler</h2> <p /> @@ -24,6 +24,6 @@ Indexing Queue:<br /> </tr> </table> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/Wiki.html b/htroot/Wiki.html index 262150f63..a55b1b14c 100644 --- a/htroot/Wiki.html +++ b/htroot/Wiki.html @@ -2,12 +2,12 @@ <html> <head> <title>YaCy '#[clientname]#': Wiki</title> -#[metas]# +#%env/templates/metas.template%# </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <p>#[pagecontent]#</p> <p>#[pageedit]# Changes will be published as announcement on YaCyNews</p> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/index.html b/htroot/index.html index 316a14aae..25fb63f3f 100644 --- a/htroot/index.html +++ b/htroot/index.html @@ -2,11 +2,11 @@ <html> <head> <title>YaCy '#[clientname]#': Search Page</title> -#[metas]# +#%env/templates/metas.template%# <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="index.rss?search=#[former]#"> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br> <center><h2><font size="2" face="Helvetica, Arial" color="#212942"><img src="/env/grafics/kaskelix.png" align="middle" alt="YaCy logo Kaskelix"><br>P2P WEB SEARCH</font></h2></center><br> <center>#[promoteSearchPageGreeting]#</center><br> @@ -132,6 +132,6 @@ with the target of implementing a P2P-based global search engine.<br> Architecture (C) by Michael Peter Christen, <img src="/env/grafics/mcemailh.gif"></i></center> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/sharedBlacklist_p.html b/htroot/sharedBlacklist_p.html index 555c0a5dc..5990291b9 100644 --- a/htroot/sharedBlacklist_p.html +++ b/htroot/sharedBlacklist_p.html @@ -2,7 +2,7 @@ <html> <head> <title>YaCy '#[clientname]#': Shared Blacklist</title> -#[metas]# +#%env/templates/metas.template%# <script> <!-- function selectall(){ @@ -14,7 +14,7 @@ function selectall(){ </script> </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> -#[header]# +#%env/templates/header.template%# <br><br> <h2>Add Items to Blacklist</h2> @@ -60,6 +60,6 @@ Wrong Invocation! Please invoke with sharedBlacklist.html?name=PeerName </p> </form> -#[footer]# +#%env/templates/footer.template%# </body> </html> diff --git a/htroot/simple_search.html b/htroot/simple_search.html index 0226ebdbf..e5c22bc45 100644 --- a/htroot/simple_search.html +++ b/htroot/simple_search.html @@ -2,7 +2,7 @@ <html> <head> <title>YaCy '#[clientname]#': Search Page</title> -#[metas]# +#%env/templates/metas.template%# <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="index.rss?search=#[former]#"> </head> <body> diff --git a/source/de/anomic/http/httpTemplate.java b/source/de/anomic/http/httpTemplate.java index d35c65a3e..b827a82dd 100644 --- a/source/de/anomic/http/httpTemplate.java +++ b/source/de/anomic/http/httpTemplate.java @@ -45,12 +45,14 @@ package de.anomic.http; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PushbackInputStream; +import java.util.HashMap; import java.util.Hashtable; import de.anomic.server.serverFileUtils; @@ -423,5 +425,27 @@ public final class httpTemplate { e.printStackTrace(); } } + /* + * loads all Files from path into a filename->content HashMap + */ + public static HashMap loadTemplates(File path) { + // reads all templates from a path + // we use only the folder from the given file path + HashMap result = new HashMap(); + if (path == null) return result; + if (!(path.isDirectory())) path = path.getParentFile(); + if ((path == null) || (!(path.isDirectory()))) return result; + String[] templates = path.list(); + int c; + for (int i = 0; i < templates.length; i++) { + if (templates[i].endsWith(".template")) + try { + //System.out.println("TEMPLATE " + templates[i].substring(0, templates[i].length() - 9) + ": " + new String(buf, 0, c)); + result.put(templates[i].substring(0, templates[i].length() - 9), + new String(serverFileUtils.read(new File(path, templates[i])))); + } catch (Exception e) {} + } + return result; + } } diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java index d27394de0..5860a3da1 100644 --- a/source/de/anomic/http/httpdFileHandler.java +++ b/source/de/anomic/http/httpdFileHandler.java @@ -195,7 +195,8 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http htTemplatePath = new File(switchboard.getRootPath(), switchboard.getConfig("htTemplatePath","htroot/env/templates")); if (!(htTemplatePath.exists())) htTemplatePath.mkdir(); } - if (templates.size() == 0) templates.putAll(loadTemplates(htTemplatePath)); + //This is now handles by #%env/templates/foo%# + //if (templates.size() == 0) templates.putAll(httpTemplate.loadTemplates(htTemplatePath)); // create htLocaleDefault, htLocalePath if (htDefaultPath == null) htDefaultPath = new File(switchboard.getRootPath(), switchboard.getConfig("htDefaultPath","htroot")); @@ -728,26 +729,6 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http } } - private static HashMap loadTemplates(File path) { - // reads all templates from a path - // we use only the folder from the given file path - HashMap result = new HashMap(); - if (path == null) return result; - if (!(path.isDirectory())) path = path.getParentFile(); - if ((path == null) || (!(path.isDirectory()))) return result; - String[] templates = path.list(); - int c; - for (int i = 0; i < templates.length; i++) { - if (templates[i].endsWith(".template")) - try { - //System.out.println("TEMPLATE " + templates[i].substring(0, templates[i].length() - 9) + ": " + new String(buf, 0, c)); - result.put(templates[i].substring(0, templates[i].length() - 9), - new String(serverFileUtils.read(new File(path, templates[i])))); - } catch (Exception e) {} - } - return result; - } - private File rewriteClassFile(File template) { try { String f = template.getCanonicalPath();