From 4934c5f4d356f52e85a88bd1cb28ee9d6bf83b35 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 6 Jun 2007 12:57:13 +0000 Subject: [PATCH] - corrected News menu (wrong headline) - changed order, appearance, naming of menues in main menu - implemented no-main-menu mode for blog and wiki (similar to simple search page) The YaCy wiki can now be embedded in iframes inside on web pages using the display option: i.e. http://localhost:8080/Wiki.html?display=2 http://localhost:8080/Blog.html?display=2 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3803 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Blog.html | 8 +++++++- htroot/Blog.java | 6 +++++- htroot/News.html | 2 +- htroot/Wiki.html | 8 +++++++- htroot/Wiki.java | 4 ++++ htroot/env/templates/header.template | 13 ++++++------- 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/htroot/Blog.html b/htroot/Blog.html index 4a5b4fe50..59c40370e 100644 --- a/htroot/Blog.html +++ b/htroot/Blog.html @@ -6,7 +6,13 @@ - #%env/templates/header.template%# + #(display)# + #%env/templates/simpleheader.template%# + :: + #%env/templates/header.template%# + :: + #%env/templates/embeddedheader.template%# + #(/display)# #(mode)# #{entries}# diff --git a/htroot/Blog.java b/htroot/Blog.java index f62c3b078..74474b5e0 100644 --- a/htroot/Blog.java +++ b/htroot/Blog.java @@ -82,7 +82,11 @@ public class Blog { final serverObjects prop = new serverObjects(); blogBoard.entry page = null; - boolean hasRights = switchboard.verifyAuthentication(header, true); + final boolean authenticated = switchboard.adminAuthenticated(header) >= 2; + final int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0); + prop.put("display", display); + + boolean hasRights = switchboard.verifyAuthentication(header, true); final boolean xml = ((String)header.get(httpHeader.CONNECTION_PROP_PATH)).endsWith(".xml"); final String address = yacyCore.seedDB.mySeed.getPublicAddress(); diff --git a/htroot/News.html b/htroot/News.html index 170b4d114..58d94a024 100644 --- a/htroot/News.html +++ b/htroot/News.html @@ -15,7 +15,7 @@ #%env/templates/header.template%#