Permalink
Browse files

support.php doesnt use smarty anymore

  • Loading branch information...
1 parent 79c4b16 commit 8487cc43e3bbe3550a5cffc92ad8b99c6f88925d @soonick committed Aug 14, 2011
View
4 development/File Status
@@ -45,7 +45,7 @@ subscribers_groups.php
subscribers_import.php
subscribers_manage.php
support.lib.php
-support.php
+support.php DONE
track_view.php
update.php
upgrade.php
@@ -407,7 +407,7 @@ subscribe.tpl
./themes/default/support:
support.lib.tpl
-support.tpl
+support.php DONE
./themes/default/user:
activate.tpl
View
2 support.lib.php
@@ -36,5 +36,5 @@
$smarty = new Pommo_Template();
-$smarty->display('support/support.lib.tpl');
+$smarty->display('support/support.lib');
View
42 support.php
@@ -1,21 +1,26 @@
<?php
/**
- * Copyright (C) 2005, 2006, 2007, 2008 Brice Burgess <bhb@iceburg.net>
+ * Original Code Copyright (C) 2005, 2006, 2007, 2008 Brice Burgess <bhb@iceburg.net>
+ * released originally under GPLV2
*
- * This file is part of poMMo (http://www.pommo.org)
+ * This file is part of poMMo.
+ *
+ * poMMo is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * poMMo 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 Pommo. If not, see <http://www.gnu.org/licenses/>.
*
- * poMMo is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2, or any later version.
- *
- * poMMo 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 program; see the file docs/LICENSE. If not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * This fork is from https://github.com/soonick/poMMo
+ * Please see docs/contribs for Contributors
+ *
*/
/**********************************
@@ -32,11 +37,10 @@
SETUP TEMPLATE, PAGE
*********************************/
require_once(Pommo::$_baseDir.'classes/Pommo_Template.php');
-$smarty = new Pommo_Template();
-
+$view = new Pommo_Template();
-$smarty->assign('version', Pommo::$_config['version']);
-$smarty->assign('revision', Pommo::$_config['revision']);
+$view->assign('version', Pommo::$_config['version']);
+$view->assign('revision', Pommo::$_config['revision']);
-$smarty->display('support/support.tpl');
+$view->display('support/support');
View
36 themes/default/inc/admin.footer.php
@@ -1,27 +1,13 @@
-<br class="clear" />
-</div> <!-- end content -->
-<div id="footer">
- <p>
- - <?php echo _('Page fueled by poMMo mailing management software'); ?> -
- </p>
-</div> <!-- end footer -->
-
-<?php
-//Called by javascripts.
-if ($dialogImageCache)
-{
-?>
- <div class="imgCache">
- <img src="<?php echo $this->url['theme']['shared'] ?>images/loader.gif" />
- <img src="<?php echo $this->url['theme']['shared'] ?>images/dialog/close.gif" />
- <img src="<?php echo $this->url['theme']['shared'] ?>images/dialog/close_hover.gif" />
- <img src="<?php echo $this->url['theme']['shared'] ?>images/dialog/sprite.gif" />
- <img src="<?php echo $this->url['theme']['shared'] ?>images/dialog/bl.gif" />
- <img src="<?php echo $this->url['theme']['shared'] ?>images/dialog/br.gif" />
- <img src="<?php echo $this->url['theme']['shared'] ?>images/dialog/bc.gif" />
- </div>
-<?php
-};
-?>
+ <br class="clear" />
+ </div> <!-- end content -->
+ <div id="footer">
+ <p>
+ - <?php echo _('Page fueled by poMMo mailing management software'); ?> -
+ </p>
+ </div> <!-- end footer -->
+ <?php
+ echo $this->capturedFooter;
+ echo $this->capturedDialogs;
+ ?>
</body>
</html>
View
124 themes/default/inc/admin.header.php
@@ -1,73 +1,55 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
- <title><?php echo $this->title; ?></title>
-
- <script src="<?php echo $this->url['theme']['shared'] ?>js/jq/jquery.js"
- type="text/javascript"></script>
- <script src="<?php echo $this->url['theme']['shared'] ?>js/pommo.js"
- type="text/javascript"></script>
- <script type="text/javascript">
- poMMo.confirmMsg = '<?php echo _('Are you sure?'); ?>';
- </script>
- <?php
- //These javascripts are only included if we set them = true in the calling form
- if ($isUiForm)
- {
- include 'ui.form.php';
- }
- if ($isUiDialog)
- {
- include 'ui.dialog.php';
- }
- if ($isUiTabs)
- {
- include 'ui.tabs.php';
- }
- if ($isUiSlider)
- {
- include 'ui.slider.php';
- }
- if ($isUiGrid)
- {
- include 'ui.grid.php';
- }
- ?>
-
- <link type="text/css" rel="stylesheet"
- href="<?php echo $this->url['theme']['shared'] ?>css/default.admin.css" />
-
- <head>
- </head>
-
- <body>
-
- <div id="header">
-
- <h1><a href="<?php echo($this->config['site_url']) ?>">
- <img src="<?php echo($this->url['theme']['shared']); ?>images/pommo.gif"
- alt="pommo logo" /> <strong><?php echo($this->config['site_name']) ?></strong>
- </a></h1>
- </div>
-
- <ul id="menu">
- <li><a href="<?php echo($this->url_base) ?>index.php?logout=TRUE">
- <?php echo _('Logout') ?></a></li>
- <li class="advanced"><a href="<?php echo($this->url_base) ?>support.php">
- <?php echo _('Support') ?></a></li>
- <li><a href="<?php echo($this->url_base) ?>admin.php">
- <?php echo _('Admin Page') ?></a></li>
- </ul>
-
- <?php
- if ($this->sidebar !== false)
- {
- include($this->template_dir.'/inc/admin.sidebar.php');
- echo('<div id="content">');
- } else
- {
- echo('<div id="content" class="wide">');
- }
- ?>
-
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+<title><?php echo $this->title; ?></title>
+
+<script src="<?php echo $this->url['theme']['shared'] ?>js/jq/jquery.js"
+ type="text/javascript"></script>
+<script src="<?php echo $this->url['theme']['shared'] ?>js/pommo.js"
+ type="text/javascript"></script>
+<script type="text/javascript">
+ poMMo.confirmMsg = '<?php echo _('Are you sure?'); ?>';
+</script>
+
+<link type="text/css" rel="stylesheet"
+ href="<?php echo $this->url['theme']['shared']?>css/default.admin.css" />
+<?php
+
+echo $this->capturedHead;
+
+?>
+
+</head>
+
+<body>
+
+<div id="header">
+
+<h1><a href="<?php echo($this->config['site_url']) ?>">
+ <img src="<?php echo($this->url['theme']['shared']); ?>images/pommo.gif"
+ alt="pommo logo" /> <strong><?php echo($this->config['site_name']) ?></strong>
+ </a></h1>
+</div>
+
+<ul id="menu">
+<li><a href="<?php echo($this->url_base) ?>index.php?logout=TRUE">
+ <?php echo _('Logout')?></a></li>
+<li class="advanced"><a href="<?php echo($this->url_base) ?>support.php">
+ <?php echo _('Support')?></a></li>
+<li><a href="<?php echo($this->url_base) ?>admin.php">
+ <?php echo _('Admin Page')?></a></li>
+</ul>
+
+<?php
+ if ($this->sidebar !== false)
+ {
+ include($this->template_dir.'/inc/admin.sidebar.php');
+ echo('<div id="content">');
+ } else
+ {
+ echo('<div id="content" class="wide">');
+ }
+?>
+
+
View
96 themes/default/inc/dialog.php
@@ -1,52 +1,76 @@
<?php
-/*
-Valid Variables
--------
-id: (str) - DOM ID; "dialog" by default
-wide: (bool) - Wide Dialog; false
-tall: (bool) - Tall Dialog; false
-short: (bool) - Short Dialog; false
-content: (str) - Initial Contents of dialog; null
-title: (str) window title ; "poMMo",
-wait: (bool) - wait dialog [no close button] ; false
-*/
+
+if (!$this->dialogId)
+{
+ $this->dialogId = 'dialog';
+}
+
+$dialogClass = 'jqmDialog';
+if ($this->dialogWide)
+{
+ $dialogClass .= ' jqmdWide';
+}
+
+$internalClass = 'jqmdBC';
+if ($this->dialogTall)
+{
+ $internalClass .= ' jqmdTall';
+}
+if ($this->dialogShort)
+{
+ $internalClass .= ' jqmdShort';
+}
+
?>
-<div id="<?php if ($id==null) {echo('Dialog');} else {echo($id);}; ?>"
- class="jqmDialog <?php if ($wide) {echo('jqmdWide');};?>">
- <div class="jqmdTL">
+<div id="<?php echo $this->dialogId; ?>" class="<?php echo $dialogClass; ?>">
+ <div class="jqmdTL">
<div class="jqmdTR">
<div class="jqmdTC">
- <?php if ($title==null) {echo('poMMo');} else {echo($title);};?>
+ <?php
+ if ($this->dialogTitle)
+ {
+ echo $this->dialogTitle;
+ }
+ else
+ {
+ echo 'poMMo';
+ }
+ ?>
</div>
</div>
</div>
<div class="jqmdBL">
<div class="jqmdBR">
- <div class="jqmdBC <?php
- if ($tall) {echo('jqmdTall');}
- if ($short) {echo('jqmdShort');};?>">
- <div class="jqmdMSG<?php if ($dialogMsgClass) {echo('dialogMsgClass');};?>">
+ <div class="<?php echo $internalClass; ?>">
+ <div class="jqmdMSG">
<?php
- if ($content!=null)
- {
- echo($content);
- } else
- {
- echo('<img src="'.$this->url['theme']['shared'].'images/loader.gif"'.
- ' alt="Loading Icon" title="Please Wait" border="0" />');
- echo _('Please Wait...');
- }
- ?>
+ if ($this->dialogContent)
+ {
+ echo $this->dialogContent;
+ }
+ else
+ {
+ ?>
+ <img src="<?php echo $this->url['theme']['shared'];
+ ?>images/loader.gif"
+ alt="Loading Icon" title="Please Wait" border="0" />
+ {t}Please Wait{/t}...
+ <?php
+ }
+ ?>
</div>
</div>
</div>
</div>
- <?php
- if (!$wait)
- {
- echo('<input type="image" src="'.$this->url ['theme']['shared'].
- 'images/dialog/close.gif" class="jqmdX jqmClose" />');
- }
- ?>
+ <?php
+ if (!$this->dialogWait)
+ {
+ ?>
+ <input type="image" src="<?php echo $this->url['theme']['shared'];
+ ?>images/dialog/close.gif"
+ class="jqmdX jqmClose" />
+ <?php
+ }
+ ?>
</div>
View
29 themes/default/inc/ui.dialog.php
@@ -1,5 +1,6 @@
-<script type="text/javascript" src="<?php echo($this->url['theme']['shared']); ?>js/jq/jqModal.js"></script>
-<link type="text/css" rel="stylesheet" href="<?php echo($this->url['theme']['shared']); ?>css/ui.dialog.css" />
+<script type="text/javascript" src="<?php echo $this->url['theme']['shared']; ?>js/jq/jqModal.js"></script>
+<link type="text/css" rel="stylesheet" href="<?php echo $this->url['theme']['shared']; ?>css/ui.dialog.css" />
+
<script type="text/javascript">
PommoDialog = {
@@ -48,11 +49,23 @@ function(){ $(this).removeClass('jqmdXFocus'); });
</script>
<?php
-//Switch on caching of images in the footer
-$dialogImageCache = true;
+ob_start();
+?>
+<div class="imgCache">
+ <img src="<?php echo $this->url['theme']['shared']; ?>images/loader.gif" />
+ <img src="<?php echo $this->url['theme']['shared']; ?>images/dialog/close.gif" />
+ <img src="<?php echo $this->url['theme']['shared']; ?>images/dialog/close_hover.gif" />
+ <img src="<?php echo $this->url['theme']['shared']; ?>images/dialog/sprite.gif" />
+ <img src="<?php echo $this->url['theme']['shared']; ?>images/dialog/bl.gif" />
+ <img src="<?php echo $this->url['theme']['shared']; ?>images/dialog/br.gif" />
+ <img src="<?php echo $this->url['theme']['shared']; ?>images/dialog/bc.gif" />
+</div>
+<?php
-//Call the dialog
-$wait=true;
-$id="wait";
+$this->dialogId = 'wait';
+$this->dialogWait = true;
include $this->template_dir.'/inc/dialog.php';
-?>
+
+$this->capturedFooter = ob_get_clean();
+?>
+
View
78 themes/default/support/support.lib.php
@@ -0,0 +1,78 @@
+<?php
+
+ob_start();
+include $this->template_dir.'/inc/ui.dialog.php';
+$this->capturedHead = ob_get_clean();
+include $this->template_dir.'/inc/admin.header.php';
+include $this->template_dir.'/inc/messages.php';
+
+?>
+
+<h2>
+<?php
+ echo _('poMMo support v0.02');
+?>
+</h2>
+
+<ul>
+ <li>
+ <a href="<?php echo $this->url['base']; ?>file.clearWork.php"
+ title="Clear Work Directory" class="modal"><?php
+ echo _('Clear Work Directory'); ?></a>
+ </li>
+ <li>
+ <a href="<?php echo $this->url['base']; ?>mailing.test.php"
+ onclick="return !window.open(this.href)"><?php
+ echo _('Test Mailing Processor'); ?></a>
+ </li>
+ <li>
+ <a href="<?php echo $this->url['base']; ?>mailing.kill.php"
+ title="Terminate Current Mailing" class="modal"><?php
+ echo _('Terminate Current Mailing'); ?></a>
+ </li>
+ <li>
+ <a href="<?php echo $this->url['base']; ?>mailing.runtime.php"
+ onclick="return !window.open(this.href)"><?php
+ echo _('Test Max Runtime (takes 90 seconds)'); ?></a>
+ </li>
+ <li>
+ <a class="warn" href="<?php echo $this->url['base']; ?>db.clear.php"
+ title="Reset Database"><?php
+ echo _('Reset Database (clears all subscribers, groups, fields)');
+ ?></a>
+ </li>
+ <li>
+ <a class="warn" href="<?php echo $this->url['base']; ?>db.subscriberClear.php"
+ title="Reset Subscribers"><?php
+ echo _('Reset Subscribers (clears all susbcribers)');
+ ?></a>
+ </li>
+ <li>
+ <a class="warn" href="<?php echo $this->url['base']; ?>db.sample.php"
+ title="Load Sample Data"><?php
+ echo _('Load Sample Data (resets database, loads sample data)');
+ ?></a>
+ </li>
+</ul>
+
+<script type="text/javascript">
+$().ready(function() {
+ $('a.warn').click(function() {
+ var str = this.innerHTML;
+ return confirm("<?php echo _('Are you sure you want to '); ?>" +
+ str + "<?php echo _('?\nData will be lost permanently.'); ?>");
+ });
+
+ // Setup Modal Dialogs
+ PommoDialog.init();
+});
+</script>
+
+<?php
+
+ob_start();
+$this->dialogId = 'dialog';
+include $this->template_dir.'/inc/dialog.php';
+$this->capturedDialogs = ob_get_clean();
+include $this->template_dir.'/inc/admin.footer.php';
+
View
40 themes/default/support/support.lib.tpl
@@ -1,40 +0,0 @@
-{capture name=head}{* used to inject content into the HTML <head> *}
-{include file="inc/ui.dialog.tpl"}
-{/capture}
-{include file="inc/admin.header.tpl"}
-
-{include file="inc/messages.tpl"}
-
-<h2>poMMo support v0.02</h2>
-
-<ul>
-<li><a href="{$url.base}file.clearWork.php" title="Clear Work Directory" class="modal">Clear Work Directory</a></li>
-<li><a href="{$url.base}mailing.test.php" onclick="return !window.open(this.href)">Test Mailing Processor</a></li>
-<li><a href="{$url.base}mailing.kill.php" title="Terminate Current Mailing" class="modal">Terminate Current Mailing</a></li>
-<li><a href="{$url.base}mailing.runtime.php" onclick="return !window.open(this.href)">Test Max Runtime (takes 90 seconds)</a></li>
-<li><a class="warn" href="{$url.base}db.clear.php" title="Reset Database">Reset Database (clears all subscribers, groups, fields)</a></li>
-<li><a class="warn" href="{$url.base}db.subscriberClear.php" title="Reset Subscribers">Reset Subscribers (clears all susbcribers)</a></li>
-<li><a class="warn" href="{$url.base}db.sample.php" title="Load Sample Data">Load Sample Data (resets database, loads sample data)</a></li>
-</ul>
-
-{literal}
-<script type="text/javascript">
-$().ready(function() {
- $('a.warn').click(function() {
- var str = this.innerHTML;
- return confirm("{/literal}{t}Are you sure you want to.{/t}{literal}" +
- str + "?\nData will be lost permanently.");
- });
-
- // Setup Modal Dialogs
- PommoDialog.init();
-
-});
-</script>
-{/literal}
-
-{capture name=dialogs}
-{include file="inc/dialog.tpl" id=dialog}
-{/capture}
-
-{include file="inc/admin.footer.tpl"}
View
43 themes/default/support/support.php
@@ -0,0 +1,43 @@
+<?php
+
+include $this->template_dir.'/inc/admin.header.php';
+
+?>
+
+<h2><?php echo _('Support Page'); ?></h2>
+
+<p><a href="support.lib.php"><?php echo _('poMMo Support Library'); ?></a></p>
+
+<p>
+<?php
+ sprintf(_('poMMo version: %s + %s'), $this->version, $this->revision);
+?>
+</p>
+
+<p><i><?php echo _('Coming to a theatre near you'); ?></i></p>
+
+<h3><?php echo _('MY NOTES:'); ?></h3>
+
+<pre>
+<?php
+ echo
+ _('+ Enhanced support library').PHP_EOL
+ ._('+ PHPInfo() (or specifically mysql, php, gettext, safemode, webserver, versions, etc.)').PHP_EOL
+ ._('+ Database dump (allow selection of tables.. provide a dump of them)').PHP_EOL
+ ._('+ Link to README.HTML + local documentation').PHP_EOL
+ ._('+ Link to WIKI documentation').PHP_EOL
+ ._(' + Make a user-contributed open WIKI documentation system').PHP_EOL
+ ._(' + When support page is clicked, show specific support topics for that page').PHP_EOL
+ ._('+ Clear All Subscribers').PHP_EOL
+ ._('+ Reset Database').PHP_EOL
+ ._('+ Backup Database').PHP_EOL
+ ._('+ Ensure max run time is 30 seconds if safe mode is enabled').PHP_EOL;
+?>
+</pre>
+
+<?php
+
+include $this->template_dir.'/inc/admin.footer.php';
+
+?>
+
View
27 themes/default/support/support.tpl
@@ -1,27 +0,0 @@
-{include file="inc/admin.header.tpl"}
-
-<h2>{t}Support Page{/t}</h2>
-
-<p><a href="support.lib.php">poMMo Support Library</a></p>
-
-<p>poMMo version: {$version} +{$revision}</p>
-
-<p><i>Coming to a theatre near you</i></p>
-
-<h3>My NOTES:</h3>
-
-<pre>
-+ Enhanced support library
-+ PHPInfo() (or specifically mysql, php, gettext, safemode, webserver, etc. versions)
-+ Database dump (allow selection of tables.. provide a dump of them)
-+ Link to README.HTML + local documentation
-+ Link to WIKI documentation
- + Make a user-contributed open WIKI documentation system
- + When support page is clicked, show specific support topics for that page
-+ Clear All Subscribers
-+ Reset Database
-+ Backup Database
-+ Ensure max run time is 30 seconds if safe mode is enabled
-</pre>
-
-{include file="inc/admin.footer.tpl"}

0 comments on commit 8487cc4

Please sign in to comment.