--- a/includes/comment.php Sat Aug 21 23:36:04 2010 -0400
+++ b/includes/comment.php Sun Sep 05 16:05:33 2010 -0400
@@ -133,7 +133,7 @@
$ret['mode'] = 'refetch';
}
$limit_clause = "LIMIT $per_page OFFSET " . ($page * $per_page);
- $q = $db->sql_query('SELECT c.comment_id,c.name,c.subject,c.comment_data,c.time,c.approved,( c.ip_address IS NOT NULL ) AS have_ip,u.user_level,u.user_id,u.email,u.signature,u.user_has_avatar,u.avatar_type, b.buddy_id IS NOT NULL AS is_buddy, ( b.is_friend IS NOT NULL AND b.is_friend=1 ) AS is_friend FROM '.table_prefix.'comments AS c
+ $q = $db->sql_query('SELECT c.comment_id,c.name,c.subject,c.comment_data,c.time,c.approved,( c.ip_address IS NOT NULL ) AS have_ip,u.username,u.user_level,u.user_id,u.email,u.signature,u.user_has_avatar,u.avatar_type, b.buddy_id IS NOT NULL AS is_buddy, ( b.is_friend IS NOT NULL AND b.is_friend=1 ) AS is_friend FROM '.table_prefix.'comments AS c
LEFT JOIN '.table_prefix.'users AS u
ON (u.user_id=c.user_id)
LEFT JOIN '.table_prefix.'buddies AS b
@@ -143,7 +143,7 @@
WHERE page_id=\'' . $this->page_id . '\'
AND namespace=\'' . $this->namespace . '\'
' . $approve_clause . '
- GROUP BY c.comment_id,c.name,c.subject,c.comment_data,c.time,c.approved,c.ip_address,u.user_level,u.user_id,u.email,u.signature,u.user_has_avatar,u.avatar_type,b.buddy_id,b.is_friend
+ GROUP BY c.comment_id,c.name,c.subject,c.comment_data,c.time,c.approved,c.ip_address,u.username,u.user_level,u.user_id,u.email,u.signature,u.user_has_avatar,u.avatar_type,b.buddy_id,b.is_friend
ORDER BY c.time ASC
' . $limit_clause . ';');
$ret['comments'] = Array();
@@ -193,6 +193,10 @@
// Avatar URL
$row['avatar_path'] = make_avatar_url($row['user_id'], $row['avatar_type'], $row['email']);
+ // Name
+ //if ( $row['user_id'] > 1 )
+ // $row['name'] = $row['username'];
+
// Add the comment to the list
$ret['comments'][] = $row;
--- a/includes/functions.php Sat Aug 21 23:36:04 2010 -0400
+++ b/includes/functions.php Sun Sep 05 16:05:33 2010 -0400
@@ -598,7 +598,7 @@
if ( !is_object($template) )
{
$template = new template_nodb();
- $template->load_theme('oxygen', 'bleu', false);
+ $template->load_theme('enanium', 'babygrand', false);
$template->assign_vars(array(
'SITE_NAME' => 'Enano',
'SITE_DESC' => 'This site is experiencing a critical error and cannot load.',
@@ -1029,8 +1029,8 @@
echo "$p\n";
exit(1);
}
- $theme = ( defined('ENANO_CONFIG_FETCHED') ) ? getConfig('theme_default') : 'oxygen';
- $style = ( defined('ENANO_CONFIG_FETCHED') ) ? '__foo__' : 'bleu';
+ $theme = ( defined('ENANO_CONFIG_FETCHED') ) ? getConfig('theme_default') : 'enanium';
+ $style = ( defined('ENANO_CONFIG_FETCHED') ) ? '__foo__' : 'babygrand';
$tpl = new template_nodb();
$tpl->load_theme($theme, $style);
@@ -1369,7 +1369,7 @@
{
if ( !defined('ENANO_CONFIG_FETCHED') )
{
- return function_exists('installer_enano_version') ? installer_enano_version() : $GLOBALS['enano_version'];
+ return function_exists('installer_enano_version') ? installer_enano_version() : $GLOBALS['version'];
}
$r = getConfig('enano_version');
$rc = ( $long ) ? ' release candidate ' : 'RC';
--- a/language/english/admin.json Sat Aug 21 23:36:04 2010 -0400
+++ b/language/english/admin.json Sun Sep 05 16:05:33 2010 -0400
@@ -195,7 +195,7 @@
inherit_global_everyone: 'Rule for everyone on the entire site',
inherit_global_group: 'Rule for the group "%group_name%" on the entire site',
inherit_global_user: 'Rule for this user on the entire site',
- inherit_pg_everyone: 'Rule for everyone in the page group "%pg_name"',
+ inherit_pg_everyone: 'Rule for everyone in the page group "%pg_name%"',
inherit_pg_group: 'Rule for the group "%group_name%" in the page group "%pg_name%"',
inherit_pg_user: 'Rule for this user in the page group "%pg_name%"',
inherit_local_everyone: 'Rule for everyone on this page',
--- a/themes/enanium/js/inlinerename.js Sat Aug 21 23:36:04 2010 -0400
+++ b/themes/enanium/js/inlinerename.js Sun Sep 05 16:05:33 2010 -0400
@@ -1,138 +1,140 @@
// Sidebar collapse
function enanium_toggle_sidebar(side)
{
- if ( document.getElementById('enanium_sidebar_' + side).style.display == 'none' )
- {
- // show
- document.getElementById('enanium_sidebar_' + side).style.display = 'block';
- document.getElementById('enanium_sidebar_' + side + '_hidden').style.display = 'none';
- createCookie(side + '_sidebar', 'open', 365);
- }
- else
- {
- // hide
- document.getElementById('enanium_sidebar_' + side).style.display = 'none';
- document.getElementById('enanium_sidebar_' + side + '_hidden').style.display = 'block';
- createCookie(side + '_sidebar', 'collapsed', 365);
- }
+ if ( !document.getElementById('enanium_sidebar_' + side) )
+ return false;
+ if ( document.getElementById('enanium_sidebar_' + side).style.display == 'none' )
+ {
+ // show
+ document.getElementById('enanium_sidebar_' + side).style.display = 'block';
+ document.getElementById('enanium_sidebar_' + side + '_hidden').style.display = 'none';
+ createCookie(side + '_sidebar', 'open', 365);
+ }
+ else
+ {
+ // hide
+ document.getElementById('enanium_sidebar_' + side).style.display = 'none';
+ document.getElementById('enanium_sidebar_' + side + '_hidden').style.display = 'block';
+ createCookie(side + '_sidebar', 'collapsed', 365);
+ }
}
function enanium_toggle_sidebar_right()
{
- enanium_toggle_sidebar('right');
+ enanium_toggle_sidebar('right');
}
function enanium_toggle_sidebar_left()
{
- enanium_toggle_sidebar('left');
+ enanium_toggle_sidebar('left');
}
addOnloadHook(function()
- {
- if ( readCookie('left_sidebar') == 'collapsed' )
- {
- document.getElementById('enanium_sidebar_left').style.display = 'none';
- document.getElementById('enanium_sidebar_left_hidden').style.display = 'block';
- }
-
- if ( readCookie('right_sidebar') == 'collapsed' )
- {
- document.getElementById('enanium_sidebar_right').style.display = 'none';
- document.getElementById('enanium_sidebar_right_hidden').style.display = 'block';
- }
- });
+ {
+ if ( readCookie('left_sidebar') == 'collapsed' && document.getElementById('enanium_sidebar_left') )
+ {
+ document.getElementById('enanium_sidebar_left').style.display = 'none';
+ document.getElementById('enanium_sidebar_left_hidden').style.display = 'block';
+ }
+
+ if ( readCookie('right_sidebar') == 'collapsed' && document.getElementById('enanium_sidebar_right') )
+ {
+ document.getElementById('enanium_sidebar_right').style.display = 'none';
+ document.getElementById('enanium_sidebar_right_hidden').style.display = 'block';
+ }
+ });
// Inline rename
function ajaxRenameInline()
{
- if ( KILL_SWITCH || IE )
- return false;
- // This trick is _so_ vBulletin...
- elem = document.getElementById('h2PageName');
- if(!elem) return;
- elem.style.display = 'none';
- name = elem.firstChild.nodeValue;
- textbox = document.createElement('input');
- textbox.type = 'text';
- textbox.value = name;
- textbox.id = 'pageheading';
- textbox.size = name.length + 7;
- textbox.onkeyup = function(e) { if(!e) return; if(e.keyCode == 13) ajaxRenameInlineSave(); if(e.keyCode == 27) ajaxRenameInlineCancel(); };
- textbox.oldname = name;
- elem.parentNode.insertBefore(textbox, elem);
- document.onclick = ajaxRenameInlineCancel;
-
- load_component(['l10n', 'fadefilter', 'messagebox']);
- textbox.focus();
- textbox.select();
+ if ( KILL_SWITCH || IE )
+ return false;
+ // This trick is _so_ vBulletin...
+ elem = document.getElementById('h2PageName');
+ if(!elem) return;
+ elem.style.display = 'none';
+ name = elem.firstChild.nodeValue;
+ textbox = document.createElement('input');
+ textbox.type = 'text';
+ textbox.value = name;
+ textbox.id = 'pageheading';
+ textbox.size = name.length + 7;
+ textbox.onkeyup = function(e) { if(!e) return; if(e.keyCode == 13) ajaxRenameInlineSave(); if(e.keyCode == 27) ajaxRenameInlineCancel(); };
+ textbox.oldname = name;
+ elem.parentNode.insertBefore(textbox, elem);
+ document.onclick = ajaxRenameInlineCancel;
+
+ load_component(['l10n', 'fadefilter', 'messagebox']);
+ textbox.focus();
+ textbox.select();
}
function ajaxRenameInlineSave()
{
- elem1 = document.getElementById('h2PageName');
- elem2 = document.getElementById('pageheading');
- if(!elem1 || !elem2) return;
- value = elem2.value;
- elem2.parentNode.removeChild(elem2); // just destroy the thing
- elem1.removeChild(elem1.firstChild);
- elem1.appendChild(document.createTextNode(value));
- elem1.style.display = 'block';
- if(!value || value=='' || value==elem2.oldname) return;
- setAjaxLoading();
- ajaxPost(stdAjaxPrefix+'&_mode=rename', 'newtitle='+ajaxEscape(value), function() {
- if ( ajax.readyState == 4 )
- {
- unsetAjaxLoading();
- var response = String(ajax.responseText);
- if ( !check_json_response(response) )
- {
- handle_invalid_json(response);
- return false;
- }
- response = parseJSON(response);
- if ( response.success )
- {
- new MessageBox( MB_OK|MB_ICONINFORMATION, $lang.get('ajax_rename_success_title'), $lang.get('ajax_rename_success_body', { page_name_new: value }) );
- }
- else
- {
- alert(response.error);
- }
- }
- });
+ elem1 = document.getElementById('h2PageName');
+ elem2 = document.getElementById('pageheading');
+ if(!elem1 || !elem2) return;
+ value = elem2.value;
+ elem2.parentNode.removeChild(elem2); // just destroy the thing
+ elem1.removeChild(elem1.firstChild);
+ elem1.appendChild(document.createTextNode(value));
+ elem1.style.display = 'block';
+ if(!value || value=='' || value==elem2.oldname) return;
+ setAjaxLoading();
+ ajaxPost(stdAjaxPrefix+'&_mode=rename', 'newtitle='+ajaxEscape(value), function() {
+ if ( ajax.readyState == 4 )
+ {
+ unsetAjaxLoading();
+ var response = String(ajax.responseText);
+ if ( !check_json_response(response) )
+ {
+ handle_invalid_json(response);
+ return false;
+ }
+ response = parseJSON(response);
+ if ( response.success )
+ {
+ new MessageBox( MB_OK|MB_ICONINFORMATION, $lang.get('ajax_rename_success_title'), $lang.get('ajax_rename_success_body', { page_name_new: value }) );
+ }
+ else
+ {
+ alert(response.error);
+ }
+ }
+ });
}
function ajaxRenameInlineCancel(e)
{
- if ( typeof(e) != 'object' && IE )
- e = window.event;
- elem1 = document.getElementById('h2PageName');
- elem2 = document.getElementById('pageheading');
- if(!elem1 || !elem2) return;
- if ( typeof(e) == 'object' && e.target )
- {
- if(e.target == elem2)
- return;
- }
- //value = elem2.value;
- elem2.parentNode.removeChild(elem2); // just destroy the thing
- //elem1.innerHTML = value;
- elem1.style.display = 'block';
- document.onclick = null;
+ if ( typeof(e) != 'object' && IE )
+ e = window.event;
+ elem1 = document.getElementById('h2PageName');
+ elem2 = document.getElementById('pageheading');
+ if(!elem1 || !elem2) return;
+ if ( typeof(e) == 'object' && e.target )
+ {
+ if(e.target == elem2)
+ return;
+ }
+ //value = elem2.value;
+ elem2.parentNode.removeChild(elem2); // just destroy the thing
+ //elem1.innerHTML = value;
+ elem1.style.display = 'block';
+ document.onclick = null;
}
if ( window.auth_rename )
{
- addOnloadHook(function()
- {
- var h2 = document.getElementById('h2PageName');
- if ( h2 )
- {
- h2.ondblclick = function()
- {
- ajaxRenameInline();
- }
- }
- });
+ addOnloadHook(function()
+ {
+ var h2 = document.getElementById('h2PageName');
+ if ( h2 )
+ {
+ h2.ondblclick = function()
+ {
+ ajaxRenameInline();
+ }
+ }
+ });
}