mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
merging with upstream
This commit is contained in:
@@ -20,7 +20,11 @@
|
||||
|
||||
require_once("class2.php");
|
||||
|
||||
require_once(e_PLUGIN."download/download.php");
|
||||
$query = (e_QUERY) ? "?".e_QUERY : "";
|
||||
|
||||
e107::getRedirect()->go(e_PLUGIN."download/download.php".$query,true);
|
||||
|
||||
//require_once(e_PLUGIN."download/download.php");
|
||||
|
||||
exit();
|
||||
|
||||
|
@@ -358,7 +358,7 @@ class cron_admin_ui extends e_admin_ui
|
||||
$setpwd_message .= "</pre><small>". LAN_CRON_16."</small>";
|
||||
if(e_DOMAIN && file_exists("/usr/local/cpanel/version"))
|
||||
{
|
||||
$setpwd_message .= "<div style='margin-top:10px'><a rel='external' class='btn btn-primary' href='".e_DOMAIN."/cpanel'>Go to cPanel</a></div>";
|
||||
$setpwd_message .= "<div style='margin-top:10px'><a rel='external' class='btn btn-primary' href='".e_HTTP."cpanel'>Go to cPanel</a></div>";
|
||||
|
||||
}
|
||||
$setpwd_message .= "<br /><br />".$frm->admin_button('generate_pwd', 1, 'delete', 'Generate new cron password',array('class'=>'btn btn-small'));
|
||||
|
@@ -405,7 +405,7 @@ if (isset($_SERVER['HTTP_IF_NONE_MATCH']))
|
||||
}
|
||||
|
||||
|
||||
header("Cache-Control: must-revalidate"); // XXX testing 'always on' state for now.
|
||||
header("Cache-Control: max-age=5,no-cache",true); // XXX testing 'always on' state for now.
|
||||
if(!defined('e_NOCACHE'))
|
||||
{
|
||||
// header("Cache-Control: must-revalidate");
|
||||
|
@@ -315,22 +315,6 @@ if($fp_update_prefs)
|
||||
$fp = new frontpage($front_page);
|
||||
|
||||
|
||||
if(isset($_POST['fp_add_new']))
|
||||
{
|
||||
$text = $fp->edit_rule(array('order' => 0, 'class' => e_UC_PUBLIC, 'page' => 'news.php', 'force' => FALSE)); // Display edit form as well
|
||||
$text .= $fp->select_class($fp_settings, FALSE);
|
||||
$ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_42, $text);
|
||||
}
|
||||
elseif(isset($_POST['fp_edit_rule']))
|
||||
{
|
||||
$text = $fp->edit_rule($fp_settings[key($_POST['fp_edit_rule'])]); // Display edit form as well
|
||||
$text .= $fp->select_class($fp_settings, FALSE);
|
||||
$ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_46, $text);
|
||||
}
|
||||
else
|
||||
{ // Just show existing rules
|
||||
$ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_13, $mes->render().$fp->select_class($fp_settings, TRUE));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -343,6 +327,31 @@ class frontpage
|
||||
{
|
||||
$this->frm = e107::getForm();
|
||||
$this->frontPage = $fp;
|
||||
|
||||
$ns = e107::getRender();
|
||||
$mes = e107::getMessage();
|
||||
|
||||
global $fp_settings;
|
||||
|
||||
|
||||
if(vartrue($_GET['mode']) == 'create')
|
||||
{
|
||||
$text = $this->edit_rule(array('order' => 0, 'class' => e_UC_PUBLIC, 'page' => 'news.php', 'force' => FALSE)); // Display edit form as well
|
||||
// $text .= $this->select_class($fp_settings, FALSE);
|
||||
$ns->tablerender(FRTLAN_PAGE_TITLE.SEP.FRTLAN_42, $text);
|
||||
}
|
||||
elseif(vartrue($_GET['id']))
|
||||
{
|
||||
$key = intval($_GET['id']);
|
||||
$text = $this->edit_rule($fp_settings[$key]); // Display edit form as well
|
||||
// $text .= $this->select_class($fp_settings, FALSE);
|
||||
$ns->tablerender(FRTLAN_PAGE_TITLE.SEP.FRTLAN_46, $text);
|
||||
}
|
||||
else
|
||||
{ // Just show existing rules
|
||||
$ns->tablerender(FRTLAN_PAGE_TITLE.SEP.FRTLAN_13, $mes->render().$this->select_class($fp_settings, TRUE));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -356,6 +365,7 @@ class frontpage
|
||||
*/
|
||||
function select_class(&$fp_settings, $show_button = TRUE)
|
||||
{
|
||||
$frm = e107::getForm();
|
||||
// List of current settings
|
||||
$show_legend = $show_button ? " class='e-hideme'" : '';
|
||||
$text = "
|
||||
@@ -377,7 +387,7 @@ class frontpage
|
||||
<th>".FRTLAN_53."</th>
|
||||
<th>".FRTLAN_49."</th>
|
||||
<th>".FRTLAN_35."</th>
|
||||
<th class='center last'>".LAN_EDIT."</th>
|
||||
<th class='center last'>".LAN_OPTIONS."</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>";
|
||||
@@ -391,13 +401,21 @@ class frontpage
|
||||
<td>".$title."</td>
|
||||
<td>".$this->lookup_path($current_value['page'])."</td>
|
||||
<td>".$this->lookup_path($current_value['force'])."</td>
|
||||
<td class='center options'>
|
||||
<input class='btn btn-large image' type='image' src='".ADMIN_UP_ICON_PATH."' title='".FRTLAN_47."' value='".$order."' name='fp_inc".$order."' />
|
||||
<input class='btn btn-large image' type='image' src='".ADMIN_DOWN_ICON_PATH."' title='".FRTLAN_48."' value='".$order."' name='fp_dec".$order."' />
|
||||
<input class='btn btn-large image edit' type='image' title='".LAN_EDIT."' name='fp_edit_rule[".$order."]' src='".ADMIN_EDIT_ICON_PATH."' />
|
||||
<input class='btn btn-large image delete' type='image' title='".LAN_DELETE."' data-confirm='". LAN_CONFDELETE."' name='fp_delete_rule[".$order."]' src='".ADMIN_DELETE_ICON_PATH."' />
|
||||
<td class='center options last'>
|
||||
<div class='btn-group'>
|
||||
".$frm->admin_button('fp_inc',$order,'up',ADMIN_UP_ICON)."
|
||||
".$frm->admin_button('fp_dec',$order,'down',ADMIN_DOWN_ICON)."
|
||||
<a class='btn' title='".LAN_EDIT."' href='".e_SELF."?id=".$order."' >".ADMIN_EDIT_ICON."</a>
|
||||
".$frm->admin_button('fp_delete_rule['.$order.']',$order,'',ADMIN_DELETE_ICON)."
|
||||
</div>
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
/*
|
||||
<input class='btn ' type='image' src='".ADMIN_UP_ICON_PATH."' title='".FRTLAN_47."' value='".$order."' name='fp_inc".$order."' />
|
||||
<input class='btn ' type='image' src='".ADMIN_DOWN_ICON_PATH."' title='".FRTLAN_48."' value='".$order."' name='fp_dec".$order."' />
|
||||
<input class='btn delete' type='image' title='".LAN_DELETE."' data-confirm='". LAN_CONFDELETE."' name='fp_delete_rule[".$order."]' src='".ADMIN_DELETE_ICON_PATH."' />
|
||||
*/
|
||||
}
|
||||
$text .= "
|
||||
</tbody>
|
||||
@@ -407,7 +425,7 @@ class frontpage
|
||||
{
|
||||
$text .= "
|
||||
<div class='buttons-bar center'>
|
||||
".$this->frm->admin_button('fp_add_new', FRTLAN_42, 'create')."
|
||||
<a href='".e_SELF."?mode=create' class='btn btn-success'>".FRTLAN_42."</a>
|
||||
</div>";
|
||||
}
|
||||
|
||||
@@ -452,59 +470,57 @@ class frontpage
|
||||
|
||||
}
|
||||
|
||||
// <legend class='e-hideme'>".($rule_info['order'] ? FRTLAN_46 : FRTLAN_42)."</legend>
|
||||
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."'>
|
||||
<fieldset id='core-frontpage-edit'>
|
||||
<legend class='e-hideme'>".($rule_info['order'] ? FRTLAN_46 : FRTLAN_42)."</legend>
|
||||
<div id='core-frontpage-edit-home'>
|
||||
<table class='table adminlist'>
|
||||
<form method='post' action='".e_SELF."'>";
|
||||
|
||||
$text .= '<ul class="nav nav-tabs" id="myTabs">
|
||||
<li class="active"><a data-toggle="tab" href="#home">'.FRTLAN_49.'</a></li>
|
||||
<li><a data-toggle="tab" href="#postlogin">'.FRTLAN_35.'</a></li>
|
||||
</ul>
|
||||
';
|
||||
|
||||
$text .= "
|
||||
<div class='tab-content'>
|
||||
<div class='tab-pane active' id='home'>
|
||||
<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col style='width: 40%' />
|
||||
<col style='width: 60%' />
|
||||
<col style='width: 30%' />
|
||||
<col style='width: 70%' />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan='2' class='last'>
|
||||
".FRTLAN_49."
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{$text_tmp_1}
|
||||
".$text_tmp_1."
|
||||
<tr>
|
||||
".$this->add_other('frontpage', $is_other_home, $rule_info['page'])."
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id='core-frontpage-edit-post-login'>
|
||||
<table class='table adminlist'>
|
||||
|
||||
<div class='tab-pane' id='postlogin'>
|
||||
<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col style='width: 40%' />
|
||||
<col style='width: 60%' />
|
||||
<col style='width: 30%' />
|
||||
<col style='width: 70%' />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan='2' class='last'>
|
||||
".FRTLAN_35." ".FRTLAN_50."
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{$text_tmp_2}
|
||||
".$text_tmp_2."
|
||||
<tr>
|
||||
".$this->add_other('fp_force_page', $is_other_force, $rule_info['force'])."
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='buttons-bar center'>
|
||||
".$this->frm->hidden('fp_order', $rule_info['order'])."
|
||||
".FRTLAN_43.": ".e107::getUserClass()->uc_dropdown('class', $rule_info['class'], 'public,guest,member,admin,main,classes')."
|
||||
".$this->frm->admin_button('fp_save_new', LAN_UPDATE, 'update')."
|
||||
".$this->frm->admin_button('fp_cancel', LAN_CANCEL, 'cancel')."
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
";
|
||||
return $text;
|
||||
@@ -592,8 +608,7 @@ class frontpage
|
||||
{ // Multiple options for same page name
|
||||
$text .= "
|
||||
<td>
|
||||
".$this->frm->radio($ob_name, $front_key, $type_selected)."
|
||||
".$this->frm->label($front_value['title'], $ob_name, $front_key)."
|
||||
".$this->frm->radio($ob_name, $front_key, $type_selected, array('label'=>$front_value['title']))."
|
||||
</td>
|
||||
<td>
|
||||
";
|
||||
@@ -609,8 +624,7 @@ class frontpage
|
||||
{ // Single option for URL
|
||||
$text .= "
|
||||
<td>
|
||||
".$this->frm->radio($ob_name, $front_key, $type_selected)."
|
||||
".$this->frm->label($front_value['title'], $ob_name, $front_key)."
|
||||
".$this->frm->radio($ob_name, $front_key, $type_selected, array('label'=>$front_value['title']))."
|
||||
|
||||
</td>
|
||||
<td> </td>";
|
||||
@@ -632,9 +646,11 @@ class frontpage
|
||||
*/
|
||||
function add_other($ob_name, $cur_val, $cur_page)
|
||||
{
|
||||
$label = ($cur_val) ? "Disabled or Enter Custom URL:" : "Custom URL: ";
|
||||
|
||||
return "
|
||||
<td>".$this->frm->radio($ob_name, 'other', $cur_val)." ".$this->frm->label(FRTLAN_15.":", $ob_name, 'other')."</td>
|
||||
<td>".$this->frm->text($ob_name.'_other', ($cur_val ? $cur_page : ''), 150, "size=50&id={$ob_name}-other-txt")."</td>
|
||||
<td>".$this->frm->radio($ob_name, 'other', $cur_val, array('label'=> $label))."</td>
|
||||
<td>".$this->frm->text($ob_name.'_other', ($cur_val ? $cur_page : ''), 150, "size=xxlarge&id={$ob_name}-other-txt")."</td>
|
||||
";
|
||||
}
|
||||
}
|
||||
@@ -654,23 +670,20 @@ function frontpage_adminlog($msg_num = '00', $woffle = '')
|
||||
e107::getAdminLog()->log_event('FRONTPG_'.$msg_num, $woffle, E_LOG_INFORMATIVE, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle page DOM within the page header
|
||||
*
|
||||
* @return string JS source
|
||||
*/
|
||||
function headerjs()
|
||||
{
|
||||
require_once(e_HANDLER.'js_helper.php');
|
||||
$ret = "
|
||||
<script type='text/javascript'>
|
||||
//add required core lan - delete confirm message
|
||||
(".e_jshelper::toString(LAN_JSCONFIRM).").addModLan('core', 'delete_confirm');
|
||||
</script>
|
||||
<script type='text/javascript' src='".e_JS."core/admin.js'></script>
|
||||
";
|
||||
|
||||
return $ret;
|
||||
function frontpage_adminmenu()
|
||||
{
|
||||
|
||||
$action = vartrue($_GET['mode'],'main');
|
||||
|
||||
$var['main']['text'] = LAN_MANAGE;
|
||||
$var['main']['link'] = e_SELF;
|
||||
$var['create']['text'] = LAN_CREATE;
|
||||
$var['create']['link'] = e_SELF."?mode=create";
|
||||
|
||||
|
||||
show_admin_menu(FRTLAN_PAGE_TITLE, $action, $var);
|
||||
}
|
||||
|
||||
|
||||
?>
|
@@ -424,21 +424,21 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
|
||||
<tr>
|
||||
<td>".LAN_MAILOUT_87.": </td>
|
||||
<td>
|
||||
<input class='tbox' type='text' name='smtp_server' size='40' value='".vartrue($pref['smtp_server'])."' maxlength='50' />
|
||||
<input class='tbox' type='text' name='smtp_server' size='40' value='".vartrue($pref['smtp_server'])."' maxlength='50' autocomplete='off' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".LAN_MAILOUT_88.": (".LAN_OPTIONAL.") </td>
|
||||
<td style='width:50%;' >
|
||||
<input class='tbox' type='text' name='smtp_username' size='40' value=\"".vartrue($pref['smtp_username'])."\" maxlength='50' />
|
||||
<input class='tbox' type='text' name='smtp_username' size='40' value=\"".vartrue($pref['smtp_username'])."\" maxlength='50' autocomplete='off' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".LAN_MAILOUT_89.": (".LAN_OPTIONAL.") </td>
|
||||
<td>
|
||||
<input class='tbox' type='password' name='smtp_password' size='40' value='".vartrue($pref['smtp_password'])."' maxlength='50' />
|
||||
<input class='tbox' type='password' name='smtp_password' size='40' value='".vartrue($pref['smtp_password'])."' maxlength='50' autocomplete='off' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@@ -754,7 +754,10 @@ function update_706_to_800($type='')
|
||||
{
|
||||
if(is_dir(e_PLUGIN.$cgpArray['oldpath']))
|
||||
{
|
||||
$chgPath[] = $cgpArray['oldpath'];
|
||||
if(!in_array($cgpArray['oldpath'],$chgPath))
|
||||
{
|
||||
$chgPath[] = $cgpArray['oldpath'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//TODO LAN
|
||||
|
@@ -112,7 +112,9 @@ if (isset($_POST['main_delete']))
|
||||
$mes->addError(LAN_DELETED_FAILED);
|
||||
}
|
||||
}
|
||||
$ns->tablerender($caption, $mes->render() . $text);
|
||||
|
||||
echo $mes->render();
|
||||
|
||||
|
||||
// Show Existing -------
|
||||
if ($action == "main" || $action == "")
|
||||
@@ -183,7 +185,7 @@ if ($action == "create" || $action == "edit")
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".WMLAN_10."</td>
|
||||
<td>".$frm->text(wm_caption, $tp->toForm(vartrue($row['gen_ip'])), 80)."</td>
|
||||
<td>".$frm->text('wm_caption', $tp->toForm(vartrue($row['gen_ip'])), 80)."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".WMLAN_04."</td>
|
||||
|
@@ -90,7 +90,7 @@ class contact_shortcodes extends e_shortcode
|
||||
|
||||
function sc_contact_name($parm='')
|
||||
{
|
||||
return "<input type='text' id='contactName' title='Your full name' name='author_name' required='required' size='30' class='tbox' value=\"".varset($_POST['author_name'])."\" />";
|
||||
return "<input type='text' style='max-width:99%' id='contactName' title='Your full name' name='author_name' required='required' size='30' class='tbox' value=\"".varset($_POST['author_name'])."\" />";
|
||||
|
||||
}
|
||||
|
||||
@@ -98,14 +98,14 @@ class contact_shortcodes extends e_shortcode
|
||||
|
||||
function sc_contact_email($parm='')
|
||||
{
|
||||
return "<input type='email' id='contactEmail' title='a valid email address' name='email_send' required='required' size='30' class='tbox' value='".(vartrue($_POST['email_send']) ? $_POST['email_send'] : USEREMAIL)."' />";
|
||||
return "<input type='email' style='max-width:99%' id='contactEmail' title='a valid email address' name='email_send' required='required' size='30' class='tbox' value='".(vartrue($_POST['email_send']) ? $_POST['email_send'] : USEREMAIL)."' />";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_contact_subject($parm='')
|
||||
{
|
||||
return "<input type='text' title='the subject of your enquiry' name='subject' required='required' size='30' class='tbox' value=\"".varset($_POST['subject'])."\" />";
|
||||
return "<input type='text' style='max-width:99%' title='the subject of your enquiry' name='subject' required='required' size='30' class='tbox' value=\"".varset($_POST['subject'])."\" />";
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class contact_shortcodes extends e_shortcode
|
||||
$size = 'input-xxlarge';
|
||||
}
|
||||
|
||||
return "<textarea cols='{$cols}' id='contactBody' rows='{$rows}' name='body' required='required' class='tbox {$size}'>".stripslashes(varset($_POST['body']))."</textarea>";
|
||||
return "<textarea cols='{$cols}' style='max-width:99%' id='contactBody' rows='{$rows}' name='body' required='required' class='tbox {$size}'>".stripslashes(varset($_POST['body']))."</textarea>";
|
||||
}
|
||||
|
||||
|
||||
|
@@ -191,9 +191,10 @@ class usersettings_shortcodes extends e_shortcode
|
||||
return;
|
||||
}
|
||||
parse_str($parm);
|
||||
$cols = (isset($cols) ? $cols : 58);
|
||||
$rows = (isset($rows) ? $rows : 4);
|
||||
return "<textarea class='tbox signature' name='signature' cols='{$cols}' rows='{$rows}' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>".$this->var['user_signature']."</textarea>";
|
||||
//$cols = (isset($cols) ? $cols : 58);
|
||||
//$rows = (isset($rows) ? $rows : 4);
|
||||
//return "<textarea class='tbox signature' name='signature' cols='{$cols}' rows='{$rows}' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>".$this->var['user_signature']."</textarea>";
|
||||
return e107::getForm()->bbarea('signature', $this->var['user_signature'], '', '', 'small');
|
||||
}
|
||||
|
||||
|
||||
|
@@ -21,7 +21,7 @@ class sitelinks_alt
|
||||
|
||||
$params = explode('+', $parm);
|
||||
|
||||
if (isset($params[0]) && $params[0] && $params[0] != 'no_icons' && $params[0] != 'default')
|
||||
if (vartrue($params[0]) && ($params[0] != 'no_icons') && ($params[0] != 'default'))
|
||||
{
|
||||
$icon = $params[0];
|
||||
}
|
||||
@@ -58,6 +58,7 @@ class sitelinks_alt
|
||||
foreach ($linklist['head_menu'] as $lk)
|
||||
{
|
||||
$lk['link_url'] = $tp->replaceConstants($lk['link_url'], TRUE, TRUE);
|
||||
|
||||
if ($params[0] == 'no_icons')
|
||||
{
|
||||
$link_icon = 'no_icons';
|
||||
@@ -170,6 +171,8 @@ class sitelinks_alt
|
||||
|
||||
function render_sub($linklist, $id, $params, $icon)
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
|
||||
$text = "<div id='l_".$id."' class='menu' onmouseover=\"menuMouseover(event)\">";
|
||||
foreach ($linklist['sub_'.$id] as $sub)
|
||||
{
|
||||
@@ -193,12 +196,20 @@ class sitelinks_alt
|
||||
}
|
||||
else
|
||||
{
|
||||
$sub_icon = "<img src='";
|
||||
$sub_icon .= ($sub['link_button']) ? e_IMAGE.'icons/'.$sub['link_button'] : $icon;
|
||||
$sub_icon .= "' alt='' style='border:0px; vertical-align:bottom; width: 16px; height: 16px' />";
|
||||
|
||||
if(vartrue($sub['link_button']))
|
||||
{
|
||||
$icon_url = ($sub['link_button'][0] == "{") ? $tp->replaceConstants($sub['link_button'],'abs') : e_IMAGE_ABS.'icons/'.$sub['link_button'];
|
||||
$sub_icon = "<img src='".$icon_url."' alt='' style='border:0px; vertical-align:bottom; width: 16px; height: 16px' />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sub_icon = '';
|
||||
}
|
||||
|
||||
}
|
||||
if (isset($linklist['sub_'.$sub['link_id']]))
|
||||
{ // Has Children.
|
||||
if (isset($linklist['sub_'.$sub['link_id']])) // Has Children.
|
||||
{
|
||||
$sub_ids[] = $sub['link_id'];
|
||||
$text .= self::adnav_main($subname, $sub['link_url'], $sub_icon, 'l_'.$sub['link_id'], $params, $sub['link_open']);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// $Id$
|
||||
function user_avatar_shortcode($parm='')
|
||||
function user_avatar_shortcode($parm=null)
|
||||
{
|
||||
global $loop_uid;
|
||||
|
||||
@@ -27,7 +27,7 @@ function user_avatar_shortcode($parm='')
|
||||
$image=$row['user_image'];
|
||||
}
|
||||
}
|
||||
elseif($parm)
|
||||
elseif(!is_null($parm))
|
||||
{
|
||||
$image=$parm;
|
||||
}
|
||||
|
@@ -15,7 +15,12 @@
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined("USER_WIDTH")){ define("USER_WIDTH", "width:auto"); }
|
||||
if (!defined("USER_WIDTH"))
|
||||
{
|
||||
$uw = (deftrue('e_BOOTSTRAP')) ? "" : "width:97%";
|
||||
define("USER_WIDTH", $uw);
|
||||
}
|
||||
|
||||
|
||||
// global $usersettings_shortcodes, $pref;
|
||||
|
||||
|
@@ -305,6 +305,12 @@ class redirection
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function redirect($url, $replace = TRUE, $http_response_code = NULL)
|
||||
{
|
||||
return $this->go($url, $replace, $http_response_code);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Redirect to the given URI
|
||||
@@ -314,7 +320,7 @@ class redirection
|
||||
* @param integer|null $http_response_code - default NULL
|
||||
* @return void
|
||||
*/
|
||||
public function redirect($url, $replace = TRUE, $http_response_code = NULL)
|
||||
public function go($url, $replace = TRUE, $http_response_code = NULL)
|
||||
{
|
||||
if(session_id())
|
||||
{
|
||||
|
@@ -91,8 +91,7 @@ if(false === $cached)
|
||||
// -------------------------------
|
||||
// create the month selection item
|
||||
// -------------------------------
|
||||
$month_selector = "<div class='forumheader' style='text-align: center; margin-bottom: 2px;'>";
|
||||
$month_selector .= "<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>";
|
||||
|
||||
|
||||
// get all newsposts since the beginning of the year till now
|
||||
// -------------------------------------------
|
||||
@@ -141,32 +140,11 @@ if(false === $cached)
|
||||
}
|
||||
|
||||
// go over the link array and create the option fields
|
||||
foreach($month_links as $index => $val)
|
||||
{
|
||||
$month_selector .= "<option value='".$val."'";
|
||||
$month_selector .= ($index == $req_month)?" selected='selected'":
|
||||
"";
|
||||
$month_selector .= ">".$marray[$index-1]."</option>";
|
||||
}
|
||||
|
||||
// close the select item
|
||||
$month_selector .= "</select></div>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(deftrue('e_BOOTSTRAP'))
|
||||
{
|
||||
$month_selector = '<div class="btn-group pull-right"><a class="btn btn-mini " href="#blogCalendar" data-slide="prev">‹</a>
|
||||
<a class="btn btn-mini" href="#blogCalendar" data-slide="next">›</a></div>';
|
||||
$caption = "<div class='inline-text'>".BLOGCAL_L1." ".$month_selector."</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$caption = "<div class='form-inline'>".BLOGCAL_L1." ".$req_year."</div>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------
|
||||
// create and show calendar
|
||||
@@ -178,28 +156,58 @@ if(false === $cached)
|
||||
$menu .= "<div class='forumheader' style='text-align: center; margin-top:2px;'><span class='smalltext'><a href='$prefix/archive.php'>".BLOGCAL_L2."</a></span></div></td></tr>";
|
||||
$menu .= "</table></div>";
|
||||
*/
|
||||
$menu = "<div id='blogCalendar' data-interval='false' class='carousel slide blogcalendar-block' style='text-align: center;'><table class='table blogcalendar-table' border='0' cellspacing='7'>";
|
||||
$menu .= "<tr><td class='blogcalendar-month-selector'>"; // .$month_selector;
|
||||
if(!defset('e_BOOTSTRAP')) // BC
|
||||
|
||||
|
||||
if(deftrue('e_BOOTSTRAP')) // v2.x
|
||||
{
|
||||
$menu .= $month_selector;
|
||||
}
|
||||
|
||||
$menu .= "<div class='blogcalendar-day-selector carousel-inner' style='text-align:center'>";
|
||||
|
||||
|
||||
foreach($months as $year=>$val)
|
||||
{
|
||||
foreach($val as $month=>$v)
|
||||
$month_selector = '<div class="btn-group pull-right"><a class="btn btn-mini " href="#blogCalendar" data-slide="prev">‹</a>
|
||||
<a class="btn btn-mini" href="#blogCalendar" data-slide="next">›</a></div>';
|
||||
|
||||
$caption = "<div class='inline-text'>".BLOGCAL_L1." ".$month_selector."</div>";
|
||||
|
||||
$menu = "<div id='blogCalendar' data-interval='false' class='carousel slide blogcalendar-block text-center'>";
|
||||
$menu .= "<div class='blogcalendar-day-selector carousel-inner'>";
|
||||
|
||||
foreach($months as $year=>$val)
|
||||
{
|
||||
$menu .= calendar($req_day, $month, $year, $links[$year][$month], $pref['blogcal_ws']);
|
||||
foreach($val as $month=>$v)
|
||||
{
|
||||
$menu .= calendar($req_day, $month, $year, $links[$year][$month], $pref['blogcal_ws']);
|
||||
}
|
||||
}
|
||||
|
||||
$menu .= "</div>";
|
||||
$menu .= "<div class='blogcalendar-archive-link' >
|
||||
<a class='blogcalendar-archive-link btn btn-small' href='$prefix/archive.php'>".BLOGCAL_L2."</a>
|
||||
</div>
|
||||
</div>";
|
||||
|
||||
}
|
||||
$menu .= "</div>";
|
||||
$menu .= "<div class='forumheader blogcalendar-archive-link' style='text-align: center; margin-top:2px;'><span class='smalltext'><a class='blogcalendar-archive-link btn btn-small' href='$prefix/archive.php'>".BLOGCAL_L2."</a></span></div>
|
||||
</td></tr>";
|
||||
$menu .= "</table></div>";
|
||||
|
||||
else // BC
|
||||
{
|
||||
|
||||
$month_selector = "<div class='forumheader' style='text-align: center; margin-bottom: 2px;'>";
|
||||
$month_selector .= "<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>";
|
||||
|
||||
foreach($month_links as $index => $val)
|
||||
{
|
||||
$month_selector .= "<option value='".$val."'";
|
||||
$month_selector .= ($index == $req_month)?" selected='selected'": "";
|
||||
$month_selector .= ">".$marray[$index-1]."</option>";
|
||||
}
|
||||
|
||||
$month_selector .= "</select></div>";
|
||||
|
||||
$menu = "<div class='blogcalendar-block' style='text-align: center; max-width: 100%; overflow: hidden;'>
|
||||
<table class='blogcalendar-table' border='0' cellspacing='7' cellpadding='0'>";
|
||||
$menu .= "<tr><td class='blogcalendar-month-selector'>".$month_selector;
|
||||
$menu .= "<div class='blogcalendar-day-selector' style='text-align:center'>".calendar($req_day, $req_month, $req_year, $day_links, $pref['blogcal_ws'])."</div>";
|
||||
$menu .= "<div class='forumheader blogcalendar-archive-link' style='text-align: center; margin-top:2px;'><span class='smalltext'><a class='blogcalendar-archive-link' href='$prefix/archive.php'>".BLOGCAL_L2."</a></span></div></td></tr>";
|
||||
$menu .= "</table></div>";
|
||||
|
||||
$caption = "<div class='form-inline'>".BLOGCAL_L1." ".$req_year."</div>";
|
||||
}
|
||||
|
||||
$cached = $ns->tablerender($caption, $menu, 'blog_calendar', true);
|
||||
// echo "day= ".$req_day. " month=".$req_month." year=".$req_year." links=".print_a($day_links)." ws=".$pref['blogcal_ws'];
|
||||
e107::getCache()->set($cString, $menu);
|
||||
|
@@ -64,72 +64,76 @@ $emessage='';
|
||||
|
||||
|
||||
// FIX - using generic sc names is affecting old installs/templates and global wrappers (e.g. sc_style[USERNAME])
|
||||
class chatbox_shortcodes extends e_shortcode
|
||||
if(!class_exists('chatbox_shortcodes'))
|
||||
{
|
||||
function sc_cb_username($parm='')
|
||||
class chatbox_shortcodes extends e_shortcode
|
||||
{
|
||||
list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2);
|
||||
if($this->var['user_name'])
|
||||
|
||||
function sc_username($parm='')
|
||||
{
|
||||
$cb_nick = "<a href='".e_HTTP."user.php?id.{$cb_uid}'>".$this->var['user_name']."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$cb_nick = $tp -> toHTML($cb_nick,FALSE,'USER_TITLE, emotes_off, no_make_clickable');
|
||||
$cb_nick = str_replace("Anonymous", LAN_ANONYMOUS, $cb_nick);
|
||||
}
|
||||
|
||||
return $cb_nick;
|
||||
}
|
||||
|
||||
function sc_cb_timedate($parm='')
|
||||
{
|
||||
return e107::getDate()->convert_date($this->var['cb_datestamp'], "relative");
|
||||
}
|
||||
|
||||
|
||||
function sc_cb_message($parm = '')
|
||||
{
|
||||
if($this->var['cb_blocked'])
|
||||
{
|
||||
return CHATBOX_L6;
|
||||
}
|
||||
|
||||
$pref = e107::getPref();
|
||||
$emotes_active = $pref['cb_emote'] ? 'USER_BODY, emotes_on' : 'USER_BODY, emotes_off';
|
||||
|
||||
list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2);
|
||||
|
||||
$cb_message = e107::getParser()->toHTML($this->var['cb_message'], false, $emotes_active, $cb_uid, $pref['menu_wordwrap']);
|
||||
|
||||
return $cb_message;
|
||||
|
||||
$replace[0] = "["; $replace[1] = "]";
|
||||
$search[0] = "["; $search[1] = "]";
|
||||
$cb_message = str_replace($search, $replace, $cb_message);
|
||||
}
|
||||
|
||||
function sc_cb_avatar($parm='')
|
||||
{
|
||||
return e107::getParser()->parseTemplate("{USER_AVATAR=".vartrue($this->var['user_image'])."}");
|
||||
}
|
||||
|
||||
function sc_cb_bullet($parm = '')
|
||||
{
|
||||
$bullet = "";
|
||||
|
||||
if(defined('BULLET'))
|
||||
{
|
||||
$bullet = '<img src="'.THEME_ABS.'images/'.BULLET.'" alt="" class="icon" />';
|
||||
}
|
||||
elseif(file_exists(THEME.'images/bullet2.gif'))
|
||||
{
|
||||
$bullet = '<img src="'.THEME_ABS.'images/bullet2.gif" alt="" class="icon" />';
|
||||
list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2);
|
||||
if($this->var['user_name'])
|
||||
{
|
||||
$cb_nick = "<a href='".e_HTTP."user.php?id.{$cb_uid}'>".$this->var['user_name']."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$cb_nick = $tp -> toHTML($cb_nick,FALSE,'USER_TITLE, emotes_off, no_make_clickable');
|
||||
$cb_nick = str_replace("Anonymous", LAN_ANONYMOUS, $cb_nick);
|
||||
}
|
||||
|
||||
return $cb_nick;
|
||||
}
|
||||
|
||||
return $bullet;
|
||||
function sc_timedate($parm='')
|
||||
{
|
||||
return e107::getDate()->convert_date($this->var['cb_datestamp'], "relative");
|
||||
}
|
||||
|
||||
|
||||
function sc_message($parm = '')
|
||||
{
|
||||
if($this->var['cb_blocked'])
|
||||
{
|
||||
return CHATBOX_L6;
|
||||
}
|
||||
|
||||
$pref = e107::getPref();
|
||||
$emotes_active = $pref['cb_emote'] ? 'USER_BODY, emotes_on' : 'USER_BODY, emotes_off';
|
||||
|
||||
list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2);
|
||||
|
||||
$cb_message = e107::getParser()->toHTML($this->var['cb_message'], false, $emotes_active, $cb_uid, $pref['menu_wordwrap']);
|
||||
|
||||
return $cb_message;
|
||||
|
||||
$replace[0] = "["; $replace[1] = "]";
|
||||
$search[0] = "["; $search[1] = "]";
|
||||
$cb_message = str_replace($search, $replace, $cb_message);
|
||||
}
|
||||
|
||||
function sc_cb_avatar($parm='')
|
||||
{
|
||||
return e107::getParser()->parseTemplate("{USER_AVATAR=".vartrue($this->var['user_image'])."}");
|
||||
}
|
||||
|
||||
function sc_cb_bullet($parm = '')
|
||||
{
|
||||
$bullet = "";
|
||||
|
||||
if(defined('BULLET'))
|
||||
{
|
||||
$bullet = '<img src="'.THEME_ABS.'images/'.BULLET.'" alt="" class="icon" />';
|
||||
}
|
||||
elseif(file_exists(THEME.'images/bullet2.gif'))
|
||||
{
|
||||
$bullet = '<img src="'.THEME_ABS.'images/bullet2.gif" alt="" class="icon" />';
|
||||
}
|
||||
|
||||
return $bullet;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +150,6 @@ class chatbox_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
|
||||
|
||||
if((isset($_POST['chat_submit']) || e_AJAX_REQUEST) && $_POST['cmessage'] != '')
|
||||
{
|
||||
if(!USER && !$pref['anon_post'])
|
||||
@@ -284,12 +287,11 @@ if(!$text = $e107cache->retrieve("nq_chatbox"))
|
||||
define("CB_MOD", check_class($pref['cb_mod']));
|
||||
|
||||
$qry = "
|
||||
SELECT c.*, u.user_name FROM #chatbox AS c
|
||||
SELECT c.*, u.user_name, u.user_image FROM #chatbox AS c
|
||||
LEFT JOIN #user AS u ON SUBSTRING_INDEX(c.cb_nick,'.',1) = u.user_id
|
||||
ORDER BY c.cb_datestamp DESC LIMIT 0, ".intval($chatbox_posts);
|
||||
|
||||
global $CHATBOXSTYLE;
|
||||
|
||||
|
||||
if($CHATBOXSTYLE)
|
||||
{
|
||||
@@ -303,9 +305,9 @@ if(!$text = $e107cache->retrieve("nq_chatbox"))
|
||||
// FIXME - move to template
|
||||
$CHATBOX_TEMPLATE['start'] = "<ul class='unstyled'>";
|
||||
$CHATBOX_TEMPLATE['item'] = "<li>
|
||||
{CB_AVATAR} <b>{CB_USERNAME}</b>
|
||||
<small class='muted smalltext'>{CB_TIMEDATE}</small><br />
|
||||
<p style='margin-left:50px'>{CB_MESSAGE}</p>
|
||||
{CB_AVATAR} <b>{USERNAME}</b>
|
||||
<small class='muted smalltext'>{TIMEDATE}</small><br />
|
||||
<p style='margin-left:50px'>{MESSAGE}</p>
|
||||
</li>\n";
|
||||
|
||||
$CHATBOX_TEMPLATE['end'] = "</ul>";
|
||||
|
@@ -138,7 +138,7 @@ class fb_category_ui extends e_admin_ui
|
||||
if(!varset($new_data['fb_category_template']))
|
||||
{
|
||||
$new_data['fb_category_template'] = 'default';
|
||||
}var_dump($new_data);
|
||||
}
|
||||
return $new_data;
|
||||
}
|
||||
|
||||
|
@@ -1233,6 +1233,9 @@ function step12()
|
||||
$ret = $f -> setNewVersion();
|
||||
|
||||
$mes -> addSuccess("Congratulations, the forum upgrade is now completed!<br /><br />{$ret}");
|
||||
|
||||
$text = "<a class='btn btn-primary' href='".e_ADMIN."e107_update.php'>Return to e107 Update</a>";
|
||||
|
||||
$ns -> tablerender($stepCaption, $mes -> render() . $text);
|
||||
return;
|
||||
}
|
||||
|
@@ -353,7 +353,7 @@ class login_menu_class
|
||||
require_once(e_HANDLER.'xml_class.php');
|
||||
$xml = new xmlClass;
|
||||
$xml->filter = array('name' => FALSE,'version'=>FALSE); // Just want a couple of variables
|
||||
$readFile = $xml->loadXMLfile(e_PLUGIN.$plugin_path.'/plugin.xml', true, true);
|
||||
$readFile = $xml->loadXMLfile(e_PLUGIN.$plugid.'/plugin.xml', true, true);
|
||||
$ret['eplug_name'] = defined($readFile['name']) ? constant($readFile['name']) : $readFile['name'];
|
||||
$ret['eplug_version'] = $readFile['version'];
|
||||
}
|
||||
|
@@ -153,6 +153,7 @@ $HEADER['default'] = '
|
||||
</div><!--/span-->
|
||||
<div class="span9">
|
||||
{SETSTYLE=default}
|
||||
{WMESSAGE}
|
||||
';
|
||||
|
||||
|
||||
@@ -176,7 +177,7 @@ $HEADER['default-home'] = $HEADER['default'];
|
||||
|
||||
|
||||
$FOOTER['default-home'] = '
|
||||
{WMESSAGE}
|
||||
|
||||
{SETSTYLE=span4}
|
||||
|
||||
<div class="row-fluid">
|
||||
|
Reference in New Issue
Block a user