Skip to content

Commit

Permalink
WIP: Community, Forum
Browse files Browse the repository at this point in the history
git-svn-id: svn://cherokee-project.com/web/branches/beta-ctk@6578 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed May 4, 2011
1 parent 417199c commit 9ec812c
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHEROKEE_WEB-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@
import PageDistro
import PageDoc
import PageCommunity
import PageForum


CTK.run (port=8090)
20 changes: 20 additions & 0 deletions PageCommunity.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

URL_BASE = "/community"

MAILING_P1 = 'The primary discussion forum for Cherokee community members is the <a href="http://lists.octality.com/">Cherokee Project\'s mailing lists</a>.'
MAILING_P2 = 'If you prefer a forums interface, you can interact with other Cherokee users and developers through the <a href="/forums.html">Forums interface</a> to our mailing lists.'
IRC_P1 = 'The Cherokee developers, as well as many members of the Cherokee user community, can be found online in the <a href="irc://irc.freenode.net/cherokee">#cherokee</a> IRC channel on the FreeNode IRC Network (servers: irc.freenode.net).'
SOCIAL_P1 = 'The Cherokee project has also presence in the following social networks. Please, do not hesitate to join us!'

class PageCommunity:
def __call__ (self):
Expand All @@ -43,6 +47,22 @@ def __call__ (self):
# Proud Cherokee Users List
page.sidebar += ProudList.DomainList()

# Content
page += CTK.RawHTML ('<h2>Mailing Lists / Forums</h2>')
page += CTK.RawHTML ('<p>%s</p>' %(MAILING_P1))
page += CTK.RawHTML ('<p>%s</p>' %(MAILING_P2))

page += CTK.RawHTML ('<h2>IRC / Chat</h2>')
page += CTK.RawHTML ('<p>%s</p>' %(IRC_P1))

page += CTK.RawHTML ('<h2>Social Networks</h2>')
l = CTK.List()
l += CTK.LinkWindow ("http://www.twitter.com/webserver", CTK.RawHTML("Twitter"))
l += CTK.LinkWindow ("http://www.linkedin.com/groups/Cherokee-Web-Server-1819726", CTK.RawHTML("LinkedIn"))
l += CTK.LinkWindow ("http://www.facebook.com/cherokee.project", CTK.RawHTML("Facebook"))
page += CTK.RawHTML ('<p>%s</p>' %(SOCIAL_P1))
page += l

return CTK.HTTP_Cacheable (60, body=page.Render())


Expand Down
51 changes: 51 additions & 0 deletions PageForum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# -*- Mode: python; coding: utf-8 -*-

#
# Cherokee Web Site
#
# Authors:
# Alvaro Lopez Ortega <alvaro@alobbs.com>
#
# Copyright (C) 2001-2011 Alvaro Lopez Ortega
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#

import os
import re
import CTK
import Page
import config

URL_BASE = "/forums"

FORUM_EMBEDDABLE_HTML = """
<a id="nabblelink" href="http://cherokee-web-server-general.1049476.n5.nabble.com/">Cherokee Web Server - General</a>
<script src="http://cherokee-web-server-general.1049476.n5.nabble.com/embed/f4369600"></script>
"""

class PageForum:
def __call__ (self):
title = "Forums"

page = Page.Page_Menu_Side (title=title)
page += CTK.RawHTML ("<h1>%s</h1>"%(title))
page += CTK.RawHTML (FORUM_EMBEDDABLE_HTML)

return CTK.HTTP_Cacheable (60, body=page.Render())


CTK.publish (URL_BASE, PageForum)

0 comments on commit 9ec812c

Please sign in to comment.