From 52a0237bf21b49c081045424377834a7dfd7548e Mon Sep 17 00:00:00 2001 From: allo 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 @@ YaCy '#[clientname]#': Blacklist Manager -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Blacklist

This function provides an URL filter to the proxy; any blacklisted URL is blocked @@ -116,6 +116,6 @@ File: #(/status)# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Local Cache Management -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Local Cache


@@ -21,6 +21,6 @@ The current cache size is #[cachesize]# KB. The maximum cache size is #[cachemax -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Advanced Config -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Advanced Config

@@ -32,6 +32,6 @@ For explanation please look into yacy.init -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Connection Tracking -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Connection Tracking

Incoming Connections

Showing #[numActiveRunning]# active connections, #[numActivePending]# pending connections from a max. of #[numMax]# allowed incoming connections.
@@ -32,7 +32,7 @@

-#[footer]# +#%env/templates/footer.template%# \ 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 @@ YaCy '#[clientname]#': Incoming Cookies Monitor -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuCookie]# +#%env/templates/header.template%# +#%env/templates/submenuCookie.template%#

Cookie Monitor: Incoming Cookies

@@ -30,6 +30,6 @@ Showing #[num]# entries from a total of #[total]# Cookies.

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Outgoing Cookies Monitor -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuCookie]# +#%env/templates/header.template%# +#%env/templates/submenuCookie.template%#

Cookie Monitor: Outgoing Cookies

@@ -30,6 +30,6 @@ Showing #[num]# entries from a total of #[total]# Cookies.

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Your Personal Profile -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Your Personal Profile

@@ -70,7 +70,7 @@ You do not need to provide any personal data here, but if you want to distribute -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy: Help -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Help

@@ -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
An URL which would not match is: http://www.heise.de/tp/r4/artikel/20/20701/1.html
There is ".html" at the end, which is not included with the Regular Expression. -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Control -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Index Administration

@@ -97,6 +97,6 @@ The DHT-rules do not work without this function. #[result]# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Creation/Indexing Queue -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%#

Index Creation: Indexing Queue

@@ -77,6 +77,6 @@ There are #[num]# entries in the rejected-queue:
#(/rejected)#

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Creation / Loader Queue -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%#

Index Creation: Loader Queue

@@ -32,6 +32,6 @@ There are #[num]# entries in the loader set:
#(/loader-set)#

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Creation / WWW Global Crawl Queue -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%#

Index Creation: WWW Global Crawl Queue

@@ -45,6 +45,6 @@ There are #[num]# entries in the global crawler queue. Showing #[show-num]# most #(/crawler-queue)#

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Creation / WWW Local Crawl Queue -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%#

Index Creation: WWW Local Crawl Queue

@@ -47,6 +47,6 @@ There are #[num]# entries in the local crawler queue. Showing #[show-num]# most #(/crawler-queue)#

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Creation -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuIndexCreate]# +#%env/templates/header.template%# +#%env/templates/submenuIndexCreate.template%#

Index Creation

@@ -312,6 +312,6 @@ No remote crawl peers availible.
#(/remoteCrawlPeers)#

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Import -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Index DB Import

@@ -100,6 +100,6 @@

Last Refresh: #[date]#

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Monitor -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%# @@ -123,6 +123,6 @@ Showing latest #[count]# lines from a stack of #[all]# entries.

:: #(/table)# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Sharing -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Index Sharing

@@ -38,6 +38,6 @@ The local index currently consists of (at least) #[wcount]# reverse word indexes

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Index Transfer -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

Index Transfer

@@ -74,6 +74,6 @@

Last Refresh: #[date]#

-#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Lab -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

The YACY Lab

@@ -19,6 +19,6 @@ You may try out these things but please do not care about bugs.

  • Advanced Configuration
  • -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Language selection -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Language selection

    @@ -43,6 +43,6 @@ Unable to get URL: #[url]# Error saving the language file. #(status)# -#[footer]# +#%env/templates/footer.template%# 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 @@ -#[metas]# +#%env/templates/metas.template%#

    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 @@
     
     
     YaCy '#[clientname]#': Send message
    -#[metas]#
    +#%env/templates/metas.template%#
     
     
    -#[header]#
    +#%env/templates/header.template%#
     

    Send message


    #[body]# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Messages -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Messages


    @@ -13,6 +13,6 @@ #[messages]#

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Network Overview -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%# @@ -243,7 +243,7 @@ To do this, press this button: #(/table)# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': News -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%# @@ -92,6 +92,6 @@ you can stop the broadcast if you want.

    #(/table)# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Performance Settings for Memory -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuPerformance]# +#%env/templates/header.template%# +#%env/templates/submenuPerformance.template%#

    Performance Settings for Memory

    @@ -312,6 +312,6 @@ Increasing this cache may speed up crawling, but not much space is needed, so th

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Performance Settings of Queues and Processes -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuPerformance]# +#%env/templates/header.template%# +#%env/templates/submenuPerformance.template%#

    Performance Settings of Queues and Processes

    @@ -178,6 +178,6 @@ Changes take effect immediately

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Performance Settings of Search Sequence -#[metas]# +#%env/templates/metas.template%# -#[header]# -#[submenuPerformance]# +#%env/templates/header.template%# +#%env/templates/submenuPerformance.template%#

    Timing Settings of Search Sequence

    @@ -113,6 +113,6 @@ The network picture below shows how the latest search query was solved by asking corresponding peers in the DHT:

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Proxy Index Monitor -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Index Monitor for Proxy Indexing

    @@ -86,6 +86,6 @@ Please delete that file and restart.
    on the Proxy Index Monitor Page.

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Quick Crawl Link - #[metas]# + #%env/templates/metas.template%# 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 @@ YaCy '#[clientname]#': Settings Acknowledge -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Settings Receipt:

    @@ -157,6 +157,6 @@ This values seems not to be a valid port configuration. #(/info)#

    You can now go back to the Settings page if you want to make more changes.

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Settings -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Settings

    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

    #%[settingsTables]%# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Skins -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Skin selection

    @@ -39,6 +39,6 @@ Unable to get URL: #[url]# Error saving the skin. #(status)# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Statistics -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%# @@ -44,6 +44,6 @@ and someone must have clicked on that link; then the referrer pages appears here ::

    Zeitgeist

    #(/page)# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Status -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    System-, Index- and Peer-Status

    @@ -110,6 +110,6 @@ To switch online-mode, press one of the following buttons: #%[privateStatusTable]%#

    Last Refresh: #[date]#

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Steering -#[metas]# +#%env/templates/metas.template%# 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 @@ YaCy '#[clientname]#': User Page -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    User Page


    #(logged-in)# @@ -53,6 +53,6 @@ new Password is empty. #(/status)# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': View URL Content -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    View URL Content

    @@ -84,6 +84,6 @@ Unable to parse resource content. #(/viewMode)#

    -#[footer]# +#%env/templates/footer.template%# \ 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 @@ YaCy '#[clientname]#': Log -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Log


    @@ -20,6 +20,6 @@ -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Remote Peer Profile -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Remote Peer Profile:

    @@ -72,6 +72,6 @@ The peer #[peername]# is not online. #{/other}# #(/success)# -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Watch Crawler -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Watch Crawler

    @@ -24,6 +24,6 @@ Indexing Queue:
    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Wiki -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    #[pagecontent]#

    #[pageedit]# Changes will be published as announcement on YaCyNews

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Search Page -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    YaCy logo Kaskelix
    P2P WEB SEARCH


    #[promoteSearchPageGreeting]#

    @@ -132,6 +132,6 @@ with the target of implementing a P2P-based global search engine.
    Architecture (C) by Michael Peter Christen, -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Shared Blacklist -#[metas]# +#%env/templates/metas.template%# -#[header]# +#%env/templates/header.template%#

    Add Items to Blacklist

    @@ -60,6 +60,6 @@ Wrong Invocation! Please invoke with sharedBlacklist.html?name=PeerName

    -#[footer]# +#%env/templates/footer.template%# 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 @@ YaCy '#[clientname]#': Search Page -#[metas]# +#%env/templates/metas.template%# 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();