annotate src/global/web/Index.jtp @ 21:aba8ed4c8a06

semiprivate
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 13 Jun 2020 22:30:48 -0600
parents a04508136174
children e0c501fb5229
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 <%
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 package global.web;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 import fschmidt.util.servlet.JtpContext;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 import fschmidt.util.servlet.ServletUtils;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 import global.HtmlGlobalUtils;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 import global.Site;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 import nabble.view.web.more.ForumStart;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 import nabble.view.web.more.MailingListRequest;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 import org.apache.lucene.index.Term;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 import org.apache.lucene.search.IndexSearcher;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 import org.apache.lucene.search.TermQuery;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 import org.apache.lucene.search.Query;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 import org.apache.lucene.search.ScoreDoc;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 import org.apache.lucene.search.TopDocs;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 import org.slf4j.Logger;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 import org.slf4j.LoggerFactory;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 import javax.servlet.ServletException;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 import javax.servlet.http.HttpServlet;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 import javax.servlet.http.HttpServletRequest;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 import javax.servlet.http.HttpServletResponse;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 import java.io.IOException;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 import java.io.PrintWriter;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 public final class Index extends HttpServlet {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 private static final Logger logger = LoggerFactory.getLogger(Index.class);
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31 // private static boolean hasJobsAtNabble = Init.get("hasJobsAtNabble",false);
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
33 public static String path() {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34 return "/";
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
35 }
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
36
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
37 protected void service(HttpServletRequest request,HttpServletResponse response)
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
38 throws ServletException, IOException
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
39 {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40 JtpContext jtpContext = (JtpContext)getServletContext().getAttribute(JtpContext.attrName);
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
41 jtpContext.setEtag(request,response,"x");
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
42 PrintWriter out = response.getWriter();
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
43 %>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
44 <!DOCTYPE html>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
45 <html lang="en">
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
46 <head>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
47 <% HtmlGlobalUtils.head(request, response, "Free Forum &bull; Embeddable Web Apps"); %>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
48 <link rel="canonical" href="https://www.nabble.com/">
21
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
49 <!--script src="/assets/jquery/jquery-1.9.1.min.js"></script-->
0
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
50 <script src="/trk5.js" async="true"></script>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
51 <meta name="description" content="Create a free forum online in less than one minute. All forums are embeddable and fully customizable with scripting language. Choose a unique style and build a discussion board for your community." />
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
52 <meta name="keywords" content="free forum, free mailing list, mailing list archive, free photo gallery, free newspaper, free blog, best forum, free message board, message board hosting, bulletin board, customizable, private forum, phpBB, vBulletin, hosted, communities">
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
53 <meta name="google-site-verification" content="SUurO4gVJ46SZyzANkH4pJBGH8q-6Bv5P-ZgRBH8Cck" />
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
54 <style>
21
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
55 div[actions] i.fa.fa-chevron-right {
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
56 color: #DDD;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
57 float: right;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
58 }
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
59 a[fixed] {
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
60 margin-top: -3em;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
61 position: absolute;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
62 right: 1em;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
63 text-decoration: none;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
64 background-color: #555;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
65 border-radius: .5em;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
66 padding: .5em;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
67 color: #D0D0D0;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
68 text-shadow: 0px 1px 1px black;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
69 border-bottom: 1px dotted #757474;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
70 }
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
71 @media (max-width: 950px) {
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
72 div[footer] {
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
73 padding-bottom: 5em;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
74 }
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
75 }
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
76 div[note] {
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
77 margin-top: 1em;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
78 text-align: right;
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
79 }
0
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
80 </style>
7
a04508136174 add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents: 0
diff changeset
81 <script async="true" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
a04508136174 add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents: 0
diff changeset
82 <script>
a04508136174 add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents: 0
diff changeset
83 (adsbygoogle = window.adsbygoogle || []).push({
a04508136174 add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents: 0
diff changeset
84 google_ad_client: "ca-pub-6750305871516672",
a04508136174 add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents: 0
diff changeset
85 enable_page_level_ads: true
a04508136174 add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents: 0
diff changeset
86 });
a04508136174 add ads to homepage for verification
Raymond <mazdarulez@hotmail.com>
parents: 0
diff changeset
87 </script>
0
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
88 <script>
21
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
89 /*
0
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
90 $(document).ready(function() {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
91 var $c1 = $('div[col1]');
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
92 var $c2 = $('div[col2]');
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
93 function centerAlign() {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
94 var width = $c1.width() + $c2.width();
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
95 var margin = ($c1.parent().width() - width)/2;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
96 margin = margin > 0? margin : 0;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
97 $c1.css('margin-left',margin+'px');
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
98 };
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
99 centerAlign();
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
100 $(window).resize(centerAlign);
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
101 });
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
102
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
103 if (document.cookie.indexOf('st=1') >= 0)
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
104 $(window).focus(function(){try{window.close()}catch(err){}top.location='about:blank';});
21
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
105 */
0
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
106 </script>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
107 </head>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
108 <body lato>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
109 <% HtmlGlobalUtils.header(request,response); %>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
110 <div full>
21
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
111 <div content center>
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
112 <span style="display:inline-block">
0
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
113 <div col1 center>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
114 <h1 oswald>Free Forum Hosting &amp; Online Web Apps!</h1>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
115 <h2 lato gray>Clean Look <span light>&bull;</span> Embeddable <span light>&bull;</span> Customizable</h2>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
116 <img src="/assets/images/home.png" alt="Free forum hosting and online embeddable apps"/>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
117 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
118 <div col2 actions>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
119 <ul>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
120 <li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=ForumStart.path("forum")%>" title="Click to create a free forum">Create Free Forum</a> <i class="fa fa-chevron-right"></i></li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
121 <li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=MailingListRequest.path()%>" title="Click to archive a mailing list">Archive Mailing List</a> <i class="fa fa-chevron-right"></i></li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
122 <li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=ForumStart.path("gallery")%>" title="Click to create a free photo gallery">Create Photo Gallery</a> <i class="fa fa-chevron-right"></i></li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
123 <li><a href="<%=HtmlGlobalUtils.nabbleContextUrl%><%=ForumStart.path("newspaper")%>" title="Click to create a free newspaper">Create News Site</a> <i class="fa fa-chevron-right"></i></li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
124 <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>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
125 </ul>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
126 </div>
21
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
127 <div note>
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
128 To prevent spam, new forums and other apps will only be visible to registered users.
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
129 </div>
aba8ed4c8a06 semiprivate
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
130 </span>
0
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
131 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
132 <div content paddingTop>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
133 <div col33 center>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
134 <h2 oswald>Multi Language</h2>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
135 <ul floating>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
136 <li>English</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
137 <li>Čeština (Czech Republic)</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
138 <li>Español</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
139 <li>Français</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
140 <li>Polski</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
141 <li>Português (Brasil)</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
142 <li>Svenska</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
143 <li>Türkçe</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
144 <li>Русский</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
145 <li>Ελληνικά</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
146 <li>中文 (简体)</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
147 <li><a href="http://support.nabble.com/Nabble-Translations-f6669344.html">Translate to other languages</a> &raquo;</li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
148 </ul>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
149 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
150 <div col33 center>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
151 <h2 oswald>Embed into any Website</h2>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
152 <p lineHeight marginHorizontal>All Nabble apps are naturally embeddable, which means that they can be easily displayed inside any web page.
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
153 </p>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
154 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
155 <div col33 center>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
156 <h2 oswald>Fully Customizable</h2>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
157 <p lineHeight marginHorizontal>All Nabble apps are built with NAML, a scripting language that gives you full control over the app pages.</p>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
158 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
159 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
160 <div content center paddingTop>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
161 <h2 oswald>Browse Active Nabble Apps</h2>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
162 <% topSites(out); %>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
163 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
164 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
165 <% HtmlGlobalUtils.footer(request,response); %>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
166 <%/*%>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
167 <a fixed href="http://www.blasma.com">Help design a new forum <i class="fa fa-chevron-right"></i></a>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
168 <%*/%>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
169 </body>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
170 </html>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
171 <%
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
172 }
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
173
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
174 static Query query = new TermQuery(new Term(Site.EMBARRASSING_FLD,"false"));
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
175
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
176 private static void topSites(PrintWriter out)
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
177 throws ServletException, IOException
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
178 {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
179 IndexSearcher searcher;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
180 TopDocs hits;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
181 try {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
182 searcher = new IndexSearcher(Site.dir());
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
183 hits = searcher.search( query, 60, Site.SORT_BY_VALUE );
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
184 } catch(IOException e) {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
185 logger.error("Index error", e);
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
186 %>[Rebuilding Index]<%
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
187 return;
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
188 }
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
189 try {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
190 %>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
191 <ul floating center>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
192 <%
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
193 for( ScoreDoc sd : hits.scoreDocs ) {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
194 Site site = new Site( searcher.doc(sd.doc) );
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
195 %>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
196 <li><%=site.link()%></li>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
197 <%
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
198 }
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
199 %>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
200 </ul>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
201 <div style="padding-top:.5em;clear:both">
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
202 <a bold href="<%=RootForums.path()%>" title="View more active forums and apps">View More</a></b> <i class="fa fa-chevron-right"></i>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
203 </div>
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
204 <%
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
205 } finally {
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
206 searcher.close();
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
207 }
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
208 }
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
209
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
210 }
7ecd1a4ef557 add content
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
211 %>