';
}
}
diff --git a/classes/Viewer/Smarty.php b/classes/Viewer/Smarty.php
index 4b3092f..dca0309 100644
--- a/classes/Viewer/Smarty.php
+++ b/classes/Viewer/Smarty.php
@@ -16,7 +16,6 @@ class Viewer_Smarty extends Viewer_Common {
ini_set('url_rewriter.tags', 'a=href,area=href,frame=src,input=src,fieldset=');
// @todo Create a wrapper so that we can auto load this
- //var_dump(getcwd(), );
require_once 'contrib/smarty/libs/Smarty.class.php';
$smarty = new Smarty();
@@ -53,8 +52,18 @@ class Viewer_Smarty extends Viewer_Common {
}
}
+ $navigation = $this->config->get('navigation', 'sections');
+
+ // Add the admin section if we're authenticated
+ // @todo add code to check if the user is logged in
+ if (false) {
+ if ($this->config->get('admin', 'menu') == true) {
+ $navigation['admin'] = 'Admin';
+ }
+ }
+
// Pass all of our controller values to Smarty
- $smarty->assign('navigation', $this->config->get('navigation', 'sections'));
+ $smarty->assign('navigation', $navigation);
$smarty->assign('section', $this->model->get('section'));
$smarty->assign('action', $this->model->get('action')); // @todo rename me to event
$smarty->assign('admin', $this->config->get('admin', 'sections'));
diff --git a/config/ribbonnutrition.com.xml b/config/ribbonnutrition.com.xml
new file mode 100755
index 0000000..16598b8
--- /dev/null
+++ b/config/ribbonnutrition.com.xml
@@ -0,0 +1,26 @@
+
+
+ localhost
+ ribbonnutrition
+ r1bb0nnu7r1710n
+ ribbonnutrition
+
+
+ home
+
+ home
+
+
+
+
+
+ Logout
+
+
+
+ RN
+
+ joshsherman@gmail.com
+
+
+
diff --git a/config/verynicenoise.com.xml b/config/verynicenoise.com.xml
index c6fe959..4dea1d3 100755
--- a/config/verynicenoise.com.xml
+++ b/config/verynicenoise.com.xml
@@ -6,9 +6,9 @@
verynicenoise
- home
+ news
- Home
+ NewsAboutReleasesArtists
@@ -19,8 +19,8 @@
- Artist Profile
- User Account
+ Artist Profile
+ User AccountLogout
diff --git a/smarty/functions/function.contact_form.php b/smarty/functions/function.contact_form.php
index 228743b..da57de2 100644
--- a/smarty/functions/function.contact_form.php
+++ b/smarty/functions/function.contact_form.php
@@ -11,7 +11,6 @@ function smarty_function_contact_form($params, &$smarty) {
-
';
diff --git a/static/js/ajax.js b/static/js/ajax.js
index c481f8f..cd2bb1b 100644
--- a/static/js/ajax.js
+++ b/static/js/ajax.js
@@ -71,17 +71,15 @@ function ajaxSubmit(form) {
request.onreadystatechange = function() {
if (request.readyState == 4 && request.status == 200) {
-
- // We need to split the response because the response comes
- // back in this format: type | message
- // Where type could be error or success (and eventually warning)
- var responseText = request.responseText;
- var splitResponse = responseText.split('|');
+ var responseObject = eval( "(" + request.responseText + ")" );
var responseElement = document.createElement('div');
- responseElement.className = splitResponse[0];
- var responseMessage = document.createTextNode(splitResponse[1]);
+ responseElement.className = responseObject.type;
+
+ var responseMessage = document.createTextNode(responseObject.message);
+
responseElement.appendChild(responseMessage);
+
form.insertBefore(responseElement, form.firstChild);
}
}