changeset 35:5ea557eece1f

remove site.isNew()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 07 Jul 2020 09:57:53 -0600
parents 61800d34be0d
children 157eac0dee34
files src/global/web/Index.java src/global/web/Index.jtp src/nabble/model/DbSiteCreator.java src/nabble/model/Site.java src/nabble/model/SiteImpl.java src/nabble/view/naml/permissions.naml src/nabble/view/web/app/Addons.java src/nabble/view/web/app/Addons.jtp src/nabble/view/web/template/NabbleNamespace.java
diffstat 9 files changed, 4 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/global/web/Index.java	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/global/web/Index.java	Tue Jul 07 09:57:53 2020 -0600
@@ -60,7 +60,7 @@
 		out.print( "\" title=\"Click to create a free newspaper\">Create News Site</a> <i class=\"fa fa-chevron-right\"></i></li>\r\n						<li><a href=\"" );
 		out.print( (HtmlGlobalUtils.nabbleContextUrl) );
 		out.print( (ForumStart.path("blog")) );
-		out.print( "\" title=\"Click to create a free blog\">Create Blog</a> <i class=\"fa fa-chevron-right\"></i></li>\r\n					</ul>\r\n				</div>\r\n				<div note>\r\n					To prevent spam, new forums and other apps will only be visible to registered users.\r\n				</div>\r\n			</span>\r\n			</div>\r\n			<div content paddingTop>\r\n				<div col33 center>\r\n					<h2 oswald>Multi Language</h2>\r\n					<ul floating>\r\n						<li>English</li>\r\n						<li>Čeština (Czech Republic)</li>\r\n						<li>Español</li>\r\n						<li>Français</li>\r\n						<li>Polski</li>\r\n						<li>Português (Brasil)</li>\r\n						<li>Svenska</li>\r\n						<li>Türkçe</li>\r\n						<li>Русский</li>\r\n						<li>Ελληνικά</li>\r\n						<li>中文 (简体)</li>\r\n						<li><a href=\"http://support.nabble.com/Nabble-Translations-f6669344.html\">Translate to other languages</a> &raquo;</li>\r\n					</ul>\r\n				</div>\r\n				<div col33 center>\r\n					<h2 oswald>Embed into any Website</h2>\r\n					<p lineHeight marginHorizontal>All Nabble apps are naturally embeddable, which means that they can be easily displayed inside any web page.\r\n					</p>\r\n				</div>\r\n				<div col33 center>\r\n					<h2 oswald>Fully Customizable</h2>\r\n					<p lineHeight marginHorizontal>All Nabble apps are built with NAML, a scripting language that gives you full control over the app pages.</p>\r\n				</div>\r\n			</div>\r\n			<div content center paddingTop>\r\n				<h2 oswald>Browse Active Nabble Apps</h2>\r\n				" );
+		out.print( "\" title=\"Click to create a free blog\">Create Blog</a> <i class=\"fa fa-chevron-right\"></i></li>\r\n					</ul>\r\n				</div>\r\n			</span>\r\n			</div>\r\n			<div content paddingTop>\r\n				<div col33 center>\r\n					<h2 oswald>Multi Language</h2>\r\n					<ul floating>\r\n						<li>English</li>\r\n						<li>Čeština (Czech Republic)</li>\r\n						<li>Español</li>\r\n						<li>Français</li>\r\n						<li>Polski</li>\r\n						<li>Português (Brasil)</li>\r\n						<li>Svenska</li>\r\n						<li>Türkçe</li>\r\n						<li>Русский</li>\r\n						<li>Ελληνικά</li>\r\n						<li>中文 (简体)</li>\r\n						<li><a href=\"http://support.nabble.com/Nabble-Translations-f6669344.html\">Translate to other languages</a> &raquo;</li>\r\n					</ul>\r\n				</div>\r\n				<div col33 center>\r\n					<h2 oswald>Embed into any Website</h2>\r\n					<p lineHeight marginHorizontal>All Nabble apps are naturally embeddable, which means that they can be easily displayed inside any web page.\r\n					</p>\r\n				</div>\r\n				<div col33 center>\r\n					<h2 oswald>Fully Customizable</h2>\r\n					<p lineHeight marginHorizontal>All Nabble apps are built with NAML, a scripting language that gives you full control over the app pages.</p>\r\n				</div>\r\n			</div>\r\n			<div content center paddingTop>\r\n				<h2 oswald>Browse Active Nabble Apps</h2>\r\n				" );
  topSites(out); 
 		out.print( "\r\n			</div>\r\n		</div>\r\n		" );
  HtmlGlobalUtils.footer(request,response); 
--- a/src/global/web/Index.jtp	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/global/web/Index.jtp	Tue Jul 07 09:57:53 2020 -0600
@@ -103,9 +103,6 @@
 						<li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=ForumStart.path("blog")%>" title="Click to create a free blog">Create Blog</a> <i class="fa fa-chevron-right"></i></li>
 					</ul>
 				</div>
-				<div note>
-					To prevent spam, new forums and other apps will only be visible to registered users.
-				</div>
 			</span>
 			</div>
 			<div content paddingTop>
--- a/src/nabble/model/DbSiteCreator.java	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/nabble/model/DbSiteCreator.java	Tue Jul 07 09:57:53 2020 -0600
@@ -94,7 +94,6 @@
 		rootNode.setType(type);
 		rootNode.insert(false);
 		site.setRoot(rootNode);
-		site.setNew(true);
 		return site;
 	}
 
--- a/src/nabble/model/Site.java	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/nabble/model/Site.java	Tue Jul 07 09:57:53 2020 -0600
@@ -62,9 +62,6 @@
 	public List<Node> findTagNodes(String sqlCondition);
 	public List<Long> findTagNodeIds(String sqlCondition);
 
-	public boolean isNew();
-	public void setNew(boolean isNew);
-
 	public boolean isModuleEnabled(String moduleName);
 	public void setModuleEnabled(String moduleName,boolean isEnabled);
 	public Map<String,String> getCustomTweaks();
--- a/src/nabble/model/SiteImpl.java	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/nabble/model/SiteImpl.java	Tue Jul 07 09:57:53 2020 -0600
@@ -558,19 +558,6 @@
 	}
 
 
-	public boolean isNew() {
-		return hasTags(null,null,"label='new'");
-	}
-
-	public void setNew(boolean isNew) {
-		if( isNew ) {
-			addTag(null,null,"new");
-		} else {
-			deleteTags(null,null,"label='new'");
-		}
-	}
-
-
 	private FutureValue<Map<String,Boolean>> modulesEnabled = new FutureValue<Map<String,Boolean>>() {
 		protected Map<String,Boolean> compute() {
 			Map<String,Boolean> map = new HashMap<String,Boolean>();
--- a/src/nabble/view/naml/permissions.naml	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/nabble/view/naml/permissions.naml	Tue Jul 07 09:57:53 2020 -0600
@@ -325,7 +325,7 @@
 
 
 <macro name="is_semiprivate">
-	<n.is_new />
+	<n.false />
 </macro>
 
 <macro name="get read authorization key" requires="http_request">
--- a/src/nabble/view/web/app/Addons.java	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/nabble/view/web/app/Addons.java	Tue Jul 07 09:57:53 2020 -0600
@@ -68,7 +68,7 @@
 			"The text between the tags is the snippet to be displayed on the news page and will NOT appear on the post page."
 		);
 		addModule("Content",  "forum_avatars", "Show avatars on forum page", "Shows the avatar for the first and last post of each topic on the forum page.");
-		addModule("Content",  "semiprivate", "Restrict to registered users", "Only allow registered users to view the forum.  This has no effect for new forums which are restricted by default.");
+		addModule("Content",  "semiprivate", "Restrict to registered users", "Only allow registered users to view the forum.");
 
 		addModule("Email & Notifications",  "email_registration_notification", "Notify me when someone registers", "When a user completes the registration process, an email is sent to all administrators with the details of the user (e.g., username, email, link to profile page).");
 
--- a/src/nabble/view/web/app/Addons.jtp	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/nabble/view/web/app/Addons.jtp	Tue Jul 07 09:57:53 2020 -0600
@@ -68,7 +68,7 @@
 			"The text between the tags is the snippet to be displayed on the news page and will NOT appear on the post page."
 		);
 		addModule("Content",  "forum_avatars", "Show avatars on forum page", "Shows the avatar for the first and last post of each topic on the forum page.");
-		addModule("Content",  "semiprivate", "Restrict to registered users", "Only allow registered users to view the forum.  This has no effect for new forums which are restricted by default.");
+		addModule("Content",  "semiprivate", "Restrict to registered users", "Only allow registered users to view the forum.");
 
 		addModule("Email & Notifications",  "email_registration_notification", "Notify me when someone registers", "When a user completes the registration process, an email is sent to all administrators with the details of the user (e.g., username, email, link to profile page).");
 
--- a/src/nabble/view/web/template/NabbleNamespace.java	Tue Jul 07 09:44:17 2020 -0600
+++ b/src/nabble/view/web/template/NabbleNamespace.java	Tue Jul 07 09:57:53 2020 -0600
@@ -113,10 +113,6 @@
 		out.print( site.getId() );
 	}
 
-	@Command public void is_new(IPrintWriter out,Interpreter interp) {
-		out.print( site.isNew() );
-	}
-
 	@Command public void base_url(IPrintWriter out,Interpreter interp) {
 		out.print( interp.encode( site.getBaseUrl() ) );
 	}