root/trunk/wifidog-auth/wifidog/content/PatternLanguage/index.php @ 1249

Revision 1249, 4.9 KB (checked in by benoitg, 6 years ago)

-This is a behemoth "the road to 1.0" commit. I've been working on this for 6 months,
and it's reached the point where others can help. Those are very far reaching changes, please
notify me if anything isn't working right (and im sure I can't have caught everything).

Mostly complete. Missing parts are Content stakeholders, system roles and "su" functionnality.
I need help replacing all the DEPRECATED* methods. Please read the wiki page above for instructions.

  • generic_object_admin.php: More work towards making it generic once again.
  • GenericDataObject?: New class. Eventually, most classes should extend this, instead of directly implementing GenericObject?
  • Menu.php: Finally a uniform Menuing system to replace the mismatch of links that made wifidog impossible to navigate. It's not very sophisticated yet, but it IS permission aware Loosely inspired from Drupal's menuing system. HTML is slightly modified "Son of suckerfish", so will be easy to style (althouh I haven't had time yet). Actual menus are added in the hook_menu methods of each class.
  • VirtualHost.php: Finally properly split off Virtual Hosts, and make Server a singleton.
  • install.php: Do the bare minimum changes so it's still possible to setup a wifidog auth server. However, install.php still needs 1- A good overhaull, 2- A way to install sample databases instead of the minimal one. -Other changes
  • Unbreak signup link for non-javascript enabled devices
  • AbstractDb?: Improve debuging features
  • *:getObject(): Hopefully improve performance of class caching by making sure that we do not manipulate different objects. Otherwise copies would be generated as soon as we change properties, wasting much memory.
    • Add dependency check for XSL module for hotspot_status.php.
    • Some work towards respecting the coding style: http://dev.wifidog.org/wiki/doc/developer/CodingStandard
    • wifidog/admin/index.php: Delete admin page. There is no longuer a concept of a separate admin section. Menu will depend on your access level.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2
3/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5// +-------------------------------------------------------------------+
6// | WiFiDog Authentication Server                                     |
7// | =============================                                     |
8// |                                                                   |
9// | The WiFiDog Authentication Server is part of the WiFiDog captive  |
10// | portal suite.                                                     |
11// +-------------------------------------------------------------------+
12// | PHP version 5 required.                                           |
13// +-------------------------------------------------------------------+
14// | Homepage:     http://www.wifidog.org/                             |
15// | Source Forge: http://sourceforge.net/projects/wifidog/            |
16// +-------------------------------------------------------------------+
17// | This program is free software; you can redistribute it and/or     |
18// | modify it under the terms of the GNU General Public License as    |
19// | published by the Free Software Foundation; either version 2 of    |
20// | the License, or (at your option) any later version.               |
21// |                                                                   |
22// | This program is distributed in the hope that it will be useful,   |
23// | but WITHOUT ANY WARRANTY; without even the implied warranty of    |
24// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     |
25// | GNU General Public License for more details.                      |
26// |                                                                   |
27// | You should have received a copy of the GNU General Public License |
28// | along with this program; if not, contact:                         |
29// |                                                                   |
30// | Free Software Foundation           Voice:  +1-617-542-5942        |
31// | 59 Temple Place - Suite 330        Fax:    +1-617-542-2652        |
32// | Boston, MA  02111-1307,  USA       gnu@gnu.org                    |
33// |                                                                   |
34// +-------------------------------------------------------------------+
35
36/**
37 * @package    WiFiDogAuthServer
38 * @author     Francois Proulx <francois.proulx@gmail.com>
39 * @copyright  2005-2006 Francois Proulx, Technologies Coeus inc.
40 * @version    Subversion $Id$
41 * @link       http://www.wifidog.org/
42 */
43
44/**
45 * Load required files
46 */
47require_once('../../include/common.php');
48
49require_once('classes/MainUI.php');
50require_once('classes/Content/PatternLanguage.php');
51$smarty = SmartyWifidog::getObject();
52$session = Session::getObject();
53// This trick is done to allow displaying of Pattern Language right away if there is only one available.
54if(!empty($_REQUEST['content_id']))
55{
56    $content_id = $_REQUEST['content_id'];
57    $pattern_language = PatternLanguage::getObject($content_id);
58}
59else
60{
61    $content_id = "";
62    $pattern_languages = PatternLanguage :: getAllContent();
63    if(count($pattern_languages) >= 1)
64        $pattern_language = $pattern_languages[0];
65    else
66        exit;
67}
68
69// The Pattern Language toolbar
70$tool_html = "<h1>{$pattern_language->getTitle()->__toString()}</h1>";
71$tool_html .= '<ul class="pattern_language_menu">'."\n";
72$node_id = $session->get(SESS_NODE_ID_VAR);
73if(!empty($node_id))
74    $tool_html .= "<li><a href='/portal/?node_id=$node_id'>"._("Go back to this hotspot portal page")."</a></li>";
75$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/index.php?content_id='.$content_id.'">'._("About Pattern Language").'</a><br>'."\n";
76$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/narrative.php?content_id='.$content_id.'">'._("Read narrative").'</a><br>'."\n";
77$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/archives.php?content_id='.$content_id.'">'._("Archives").'</a><br>'."\n";
78$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/hotspots.php?content_id='.$content_id.'">'._("Participating hotspots").'</a><br>'."\n";
79$tool_html .= '<li><a href="'.BASE_SSL_PATH.'content/PatternLanguage/subscription.php?content_id='.$content_id.'">'._("Subscription").'</a><br>'."\n";
80$tool_html .= '</ul>'."\n";
81
82$tool_html .= "<div class='pattern_language_credits'>";
83$tool_html .=  $pattern_language->getSponsorInfo()->__toString();
84$tool_html .= "</div>";
85
86// Body
87$body_html = "<img src='images/header.gif'>\n";
88$body_html .= "<h1>"._("About Pattern Language")."</h1>";
89$body_html .= "<div class='pattern_language_body'>";
90$body_html .= $pattern_language->getLongDescription()->__toString();
91$body_html .= "</div>";
92
93
94$ui=MainUI::getObject();
95$ui->addContent('left_area_middle', $tool_html);
96$ui->setTitle(_("Pattern Language - About"));
97$ui->addContent('main_area_middle', $body_html);
98$ui->display();
99
100/*
101 * Local variables:
102 * tab-width: 4
103 * c-basic-offset: 4
104 * c-hanging-comment-ender-p: nil
105 * End:
106 */
107
108?>
Note: See TracBrowser for help on using the browser.