1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Merge pull request #1 from e107inc/master

Update from Master repo
This commit is contained in:
MikeyGMT
2015-06-29 21:41:13 +01:00
27 changed files with 201 additions and 114 deletions

View File

@@ -304,13 +304,13 @@ class auth
<div class='field'> <div class='field'>
<label for='username'>".ADLAN_89."</label> <label for='username'>".ADLAN_89."</label>
<input class='tbox e-tip' type='text' autofocus required='required' name='authname' placeholder='".ADLAN_89."' id='username' size='30' value='' maxlength='".varset($pref['loginname_maxlength'], 30)."' /> <input class='tbox e-tip' type='text' autofocus required='required' name='authname' placeholder='".ADLAN_89."' id='username' size='30' value='' maxlength='".varset($pref['loginname_maxlength'], 30)."' />
<div class='field-help'>Please enter your username or email</div> <div class='field-help'>".LAN_ENTER_USRNAME_EMAIL."</div>
</div> </div>
<div class='field'> <div class='field'>
<label for='userpass'>".ADLAN_90."</label> <label for='userpass'>".ADLAN_90."</label>
<input class='tbox e-tip' type='password' required='required' name='authpass' placeholder='".ADLAN_90."' id='userpass' size='30' value='' maxlength='30' /> <input class='tbox e-tip' type='password' required='required' name='authpass' placeholder='".ADLAN_90."' id='userpass' size='30' value='' maxlength='30' />
<div class='field-help'>Password is required</div> <div class='field-help'>".LAN_PWD_REQUIRED."</div>
</div>"; </div>";
if ($use_imagecode) if ($use_imagecode)

View File

@@ -321,7 +321,7 @@ class eurl_admin_ui extends e_admin_controller_ui
public function SettingsPage() public function SettingsPage()
{ {
$this->addTitle(LAN_EURL_NAME_SETTINGS); //$this->addTitle(LAN_EURL_NAME_SETTINGS);
return $this->getUI()->urlSettings(); return $this->getUI()->urlSettings();
} }
@@ -357,7 +357,7 @@ class eurl_admin_ui extends e_admin_controller_ui
public function AliasPage() public function AliasPage()
{ {
$this->addTitle(LAN_EURL_NAME_ALIASES); // $this->addTitle(LAN_EURL_NAME_ALIASES);
$aliases = e107::getPref('url_aliases', array()); $aliases = e107::getPref('url_aliases', array());
@@ -412,7 +412,7 @@ class eurl_admin_ui extends e_admin_controller_ui
public function ConfigPage() public function ConfigPage()
{ {
$this->addTitle(LAN_EURL_NAME_CONFIG); // $this->addTitle(LAN_EURL_NAME_CONFIG);
$active = e107::getPref('url_config'); $active = e107::getPref('url_config');
$set = array(); $set = array();

View File

@@ -60,7 +60,7 @@ $CONTACT_TEMPLATE['menu'] = '
// In this case (see contact.php) e107::getScBatch('contact')->wrapper('contact/form') // In this case (see contact.php) e107::getScBatch('contact')->wrapper('contact/form')
// Only one Option is used - WRAPPER > SC_STYLE // Only one Option is used - WRAPPER > SC_STYLE
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "<tr><td>".LANCONTACT_16."<br />{---}"; $CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "<tr><td>".LAN_ENTER_CODE."<br />{---}";
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}</td></tr>"; $CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}</td></tr>";
$CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "<tr><td>{---}".LANCONTACT_07."</td></tr>"; $CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "<tr><td>{---}".LANCONTACT_07."</td></tr>";
$CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<tr><td>".LANCONTACT_14."<br />{---}</td></tr>"; $CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<tr><td>".LANCONTACT_14."<br />{---}</td></tr>";

View File

@@ -2040,7 +2040,7 @@ class e_parse extends e_parser
*/ */
public function thumbWidth($width=null) public function thumbWidth($width=null)
{ {
if($height !== null) if($width !== null)
{ {
$this->thumbWidth = intval($width); $this->thumbWidth = intval($width);
} }
@@ -2685,7 +2685,9 @@ class e_parser
'script' => array('type', 'src', 'language'), 'script' => array('type', 'src', 'language'),
'iframe' => array('id', 'src', 'frameborder', 'class', 'width', 'height', 'style'), 'iframe' => array('id', 'src', 'frameborder', 'class', 'width', 'height', 'style'),
'input' => array('type','name','value','class','style'), 'input' => array('type','name','value','class','style'),
'form' => array('action','method','target') 'form' => array('action','method','target'),
'audio' => array('src','controls', 'autoplay', 'loop', 'muted', 'preload' ),
'video' => array('autoplay', 'controls', 'height', 'loop', 'muted', 'poster', 'preload', 'src', 'width')
); );
protected $badAttrValues = array('javascript[\s]*?:','alert\(','vbscript[\s]*?:','data:text\/html', 'mhtml[\s]*?:', 'data:[\s]*?image'); protected $badAttrValues = array('javascript[\s]*?:','alert\(','vbscript[\s]*?:','data:text\/html', 'mhtml[\s]*?:', 'data:[\s]*?image');
@@ -2696,7 +2698,7 @@ class e_parser
protected $allowedTags = array('html', 'body','div','a','img','table','tr', 'td', 'th', 'tbody', 'thead', 'colgroup', 'b', protected $allowedTags = array('html', 'body','div','a','img','table','tr', 'td', 'th', 'tbody', 'thead', 'colgroup', 'b',
'i', 'pre','code', 'strong', 'u', 'em','ul', 'ol', 'li','img','h1','h2','h3','h4','h5','h6','p', 'i', 'pre','code', 'strong', 'u', 'em','ul', 'ol', 'li','img','h1','h2','h3','h4','h5','h6','p',
'div','pre','section','article', 'blockquote','hgroup','aside','figure','span', 'video', 'br', 'div','pre','section','article', 'blockquote','hgroup','aside','figure','span', 'audio', 'video', 'br',
'small', 'caption', 'noscript' 'small', 'caption', 'noscript'
); );
protected $scriptTags = array('script','applet','iframe','form','input','button'); //allowed when $pref['post_script'] is enabled. protected $scriptTags = array('script','applet','iframe','form','input','button'); //allowed when $pref['post_script'] is enabled.
@@ -2811,6 +2813,7 @@ class e_parser
* @param $lan - string LAN * @param $lan - string LAN
* @param string | array $vals - either a single value, which will replace '[x]' or an array with key=>value pairs. * @param string | array $vals - either a single value, which will replace '[x]' or an array with key=>value pairs.
* @example $tp->lanVars("My name is [x] and I own a [y]", array('x'=>"John", 'y'=>"Cat")); * @example $tp->lanVars("My name is [x] and I own a [y]", array('x'=>"John", 'y'=>"Cat"));
* @example $tp->lanVars("My name is [x] and I own a [y]", array("John","Cat"));
* @return string * @return string
*/ */
function lanVars($lan, $vals, $bold=false) function lanVars($lan, $vals, $bold=false)
@@ -2821,8 +2824,15 @@ class e_parser
$search = array(); $search = array();
$replace = array(); $replace = array();
$defaults = array('x', 'y', 'z');
foreach($array as $k=>$v) foreach($array as $k=>$v)
{ {
if(is_numeric($k)) // convert array of numeric to x,y,z
{
$k = $defaults[$k];
}
$search[] = "[".$k."]"; $search[] = "[".$k."]";
$replace[] = ($bold===true) ? "<strong>".$v."</strong>" : $v; $replace[] = ($bold===true) ? "<strong>".$v."</strong>" : $v;
} }

View File

@@ -88,5 +88,9 @@ define("LAN_DESCRIPTION", "Description");
define("LAN_FILE", "File"); define("LAN_FILE", "File");
define("LAN_COMMENTS", "Comments"); define("LAN_COMMENTS", "Comments");
define("LAN_ENTER_USRNAME_EMAIL", "Please enter your username or email"); // admin php hover field admin name
define("LAN_PWD_REQUIRED", "Password is required"); // admin php hover field admin password
?> ?>

View File

@@ -31,4 +31,4 @@ define("LANCONTACT_13", "Please include a subject.");
define("LANCONTACT_14", "Send message to:"); define("LANCONTACT_14", "Send message to:");
define("LANCONTACT_15", "Incorrect code entered"); define("LANCONTACT_15", "Incorrect code entered");
define("LANCONTACT_16", "Enter Code");

View File

@@ -23,9 +23,9 @@ define("PAGE_NAME", "Register");
//define("LAN_106", "That doesn't appear to be a valid email address"); //define("LAN_106", "That doesn't appear to be a valid email address");
define("LAN_108", "Registration complete"); define("LAN_108", "Registration complete");
define("LAN_185", "You left required field(s) blank"); define("LAN_185", "You left required field(s) blank");
define("LAN_201", "Yes"); // define("LAN_201", "Yes");
define("LAN_200", "No"); // define("LAN_200", "No");
define("LAN_399", "Continue"); // define("LAN_399", "Continue");
define("LAN_407", "Please keep this email for your own information. Your password has been encrypted and cannot be retrieved if you misplace or forget it. You can however request a new password if this happens.\n\nThanks for your registration.\n\nFrom"); define("LAN_407", "Please keep this email for your own information. Your password has been encrypted and cannot be retrieved if you misplace or forget it. You can however request a new password if this happens.\n\nThanks for your registration.\n\nFrom");
//define("LAN_408", "A user with that email address already exists. Please use the 'forgot password' screen to retrieve your password."); //define("LAN_408", "A user with that email address already exists. Please use the 'forgot password' screen to retrieve your password.");

View File

@@ -166,10 +166,10 @@ if(false === $cached)
if(deftrue('BOOTSTRAP')) // v2.x if(deftrue('BOOTSTRAP')) // v2.x
{ {
$month_selector = '<div class="btn-group pull-right"><a class="btn btn-mini btn-default btn-xs " href="#blogCalendar" data-slide="prev"></a> $month_selector = '<span class="btn-group pull-right"><a class="btn btn-mini btn-default btn-xs " href="#blogCalendar" data-slide="prev"></a>
<a class="btn btn-mini btn-default btn-xs" href="#blogCalendar" data-slide="next"></a></div>'; <a class="btn btn-mini btn-default btn-xs" href="#blogCalendar" data-slide="next"></a></span>';
$caption = "<div class='inline-text'>".BLOGCAL_L1." ".$month_selector."</div>"; $caption = "<span class='inline-text'>".BLOGCAL_L1." ".$month_selector."</span>";
$menu = "<div id='blogCalendar' data-interval='false' class='carousel slide blogcalendar-block text-center'>"; $menu = "<div id='blogCalendar' data-interval='false' class='carousel slide blogcalendar-block text-center'>";
$menu .= "<div class='blogcalendar-day-selector carousel-inner'>"; $menu .= "<div class='blogcalendar-day-selector carousel-inner'>";
@@ -221,4 +221,4 @@ if(false === $cached)
} }
echo $cached; echo $cached;
?> ?>

View File

@@ -43,12 +43,24 @@ class forum_url // plugin-folder + '_url'
'redirect' => '{e_PLUGIN}forum/forum_post.php', 'redirect' => '{e_PLUGIN}forum/forum_post.php',
); );
// only create url - parsed above.
$config['move'] = array(
'sef' => 'forum/post/?f=move&amp;id={thread_id}',
);
$config['topic'] = array( $config['topic'] = array(
'regex' => '^forum/(.*)/(\d*)-([\w-]*)/?\??(.*)', 'regex' => '^forum/(.*)/(\d*)-([\w-]*)/?\??(.*)',
'sef' => 'forum/{forum_sef}/{thread_id}-{thread_sef}/', 'sef' => 'forum/{forum_sef}/{thread_id}-{thread_sef}/',
'redirect' => '{e_PLUGIN}forum/forum_viewtopic.php?id=$2&$4' 'redirect' => '{e_PLUGIN}forum/forum_viewtopic.php?id=$2&$4'
); );
/*
$config['subforum'] = array(
'regex' => '^forum/(.*)/(.*)$',
'sef' => 'forum/{parent_sef}/{forum_sef}',
'redirect' => '{e_PLUGIN}forum/forum_viewforum.php?sef=$2',
'legacy' => '{e_PLUGIN}forum/forum_viewforum.php?id={forum_id}'
);
*/
$config['forum'] = array( $config['forum'] = array(
'regex' => '^forum/(.*)$', 'regex' => '^forum/(.*)$',

View File

@@ -379,7 +379,7 @@ function parse_forum($f, $restricted_string = '')
if(is_array($forumList['subs'][$f['forum_id']])) if(is_array($forumList['subs'][$f['forum_id']]))
{ {
list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']); list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
$ret = parse_subs($forumList['subs'][$f['forum_id']], $lastpost_datestamp); $ret = parse_subs($forumList, $f['forum_id'], $lastpost_datestamp);
$fVars->FORUMSUBFORUMS = "<br /><div class='smalltext'>".LAN_FORUM_0069.": {$ret['text']}</div>"; $fVars->FORUMSUBFORUMS = "<br /><div class='smalltext'>".LAN_FORUM_0069.": {$ret['text']}</div>";
$fVars->THREADS += $ret['threads']; $fVars->THREADS += $ret['threads'];
$fVars->REPLIES += $ret['replies']; $fVars->REPLIES += $ret['replies'];
@@ -426,20 +426,31 @@ function parse_forum($f, $restricted_string = '')
return $tp->simpleParse($FORUM_MAIN_FORUM, $fVars); return $tp->simpleParse($FORUM_MAIN_FORUM, $fVars);
} }
function parse_subs($subList, $lastpost_datestamp)
function parse_subs($forumList, $id ='', $lastpost_datestamp)
{ {
$e107 = e107::getInstance();
$tp = e107::getParser(); $tp = e107::getParser();
$ret = array(); $ret = array();
$subList = $forumList['subs'][$id];
$ret['text'] = ''; $ret['text'] = '';
foreach($subList as $sub) foreach($subList as $sub)
{ {
$ret['text'] .= ($ret['text'] ? ', ' : ''); $ret['text'] .= ($ret['text'] ? ', ' : '');
$suburl = $e107->url->create('forum/forum/view', $sub);
$ret['text'] .= "<a href='{$suburl}'>".$tp->toHTML($sub['forum_name']).'</a>'; $urlData = $sub;
$ret['threads'] += $sub['forum_threads']; $urlData['parent_sef'] = $forumList['all'][$sub['forum_sub']]['forum_sef']; // = array('parent_sef'=>
$ret['replies'] += $sub['forum_replies']; $suburl = e107::url('forum','forum', $urlData);
$tmp = explode('.', $sub['forum_lastpost_info']);
$ret['text'] .= "<a href='{$suburl}'>".$tp->toHTML($sub['forum_name']).'</a>';
$ret['threads'] += $sub['forum_threads'];
$ret['replies'] += $sub['forum_replies'];
$tmp = explode('.', $sub['forum_lastpost_info']);
if($tmp[0] > $lastpost_datestamp) if($tmp[0] > $lastpost_datestamp)
{ {
$ret['lastpost_info'] = $sub['forum_lastpost_info']; $ret['lastpost_info'] = $sub['forum_lastpost_info'];
@@ -449,9 +460,13 @@ function parse_subs($subList, $lastpost_datestamp)
$lastpost_datestamp = $tmp[0]; $lastpost_datestamp = $tmp[0];
} }
} }
return $ret; return $ret;
} }
if (e_QUERY == 'track') if (e_QUERY == 'track')
{ {
if($trackedThreadList = $forum->getTrackedThreadList(USERID, 'list')) if($trackedThreadList = $forum->getTrackedThreadList(USERID, 'list'))
@@ -493,6 +508,8 @@ if (e_QUERY == 'track')
} }
} }
if (e_QUERY == 'new') if (e_QUERY == 'new')
{ {
$nVars = new e_vars; $nVars = new e_vars;
@@ -553,6 +570,14 @@ else
{ {
echo $forum_main_start.$forum_string.$forum_main_end; echo $forum_main_start.$forum_string.$forum_main_end;
} }
require_once(FOOTERF); require_once(FOOTERF);
function forum_rules($action = 'check') function forum_rules($action = 'check')

View File

@@ -863,8 +863,9 @@ class e107forum
//TODO: Fix query to get only forum and parent info needed, with correct naming //TODO: Fix query to get only forum and parent info needed, with correct naming
$qry = ' $qry = '
SELECT t.*, f.*, SELECT t.*, f.*,
fp.forum_id as parent_id, fp.forum_name as parent_name, fp.forum_id AS parent_id, fp.forum_name AS parent_name,
sp.forum_id as forum_sub, sp.forum_name as sub_parent, sp.forum_id AS forum_sub, sp.forum_name AS sub_parent,
sp.forum_sef AS parent_sef,
tr.track_userid tr.track_userid
FROM `#forum_thread` AS t FROM `#forum_thread` AS t
LEFT JOIN `#forum` AS f ON t.thread_forum_id = f.forum_id LEFT JOIN `#forum` AS f ON t.thread_forum_id = f.forum_id
@@ -897,7 +898,7 @@ class e107forum
} }
else else
{ {
e107::getMessage()->addDebug('Query failed ('.__METHOD__.' ): '.$qry); e107::getMessage()->addDebug('Query failed ('.__METHOD__.' ): '.str_replace('#', MPREFIX,$qry));
} }
return false; return false;
} }
@@ -1379,6 +1380,9 @@ class e107forum
{ {
$ret['forums'][$row['forum_parent']][] = $row; $ret['forums'][$row['forum_parent']][] = $row;
} }
$id = $row['forum_id'];
$ret['all'][$id] = $row;
} }
return $ret; return $ret;
} }
@@ -1544,7 +1548,10 @@ class e107forum
$sql = e107::getDb(); $sql = e107::getDb();
$forum_id = (int)$forum_id; $forum_id = (int)$forum_id;
$qry = " $qry = "
SELECT f.*, fp.forum_class as parent_class, fp.forum_name as parent_name, fp.forum_id as parent_id, fp.forum_postclass as parent_postclass, sp.forum_name AS sub_parent FROM #forum AS f SELECT f.*, fp.forum_class as parent_class, fp.forum_name as parent_name,
fp.forum_id as parent_id, fp.forum_postclass as parent_postclass,
sp.forum_name AS sub_parent, sp.forum_sef AS parent_sef
FROM #forum AS f
LEFT JOIN #forum AS fp ON fp.forum_id = f.forum_parent LEFT JOIN #forum AS fp ON fp.forum_id = f.forum_parent
LEFT JOIN #forum AS sp ON f.forum_sub = sp.forum_id AND f.forum_sub > 0 LEFT JOIN #forum AS sp ON f.forum_sub = sp.forum_id AND f.forum_sub > 0
WHERE f.forum_id = {$forum_id} WHERE f.forum_id = {$forum_id}
@@ -1845,7 +1852,7 @@ class e107forum
*/ */
function set_crumb($forum_href=false, $thread_title='', &$templateVar) function set_crumb($forum_href=false, $thread_title='', &$templateVar)
{ {
$e107 = e107::getInstance();
$tp = e107::getParser(); $tp = e107::getParser();
$frm = e107::getForm(); $frm = e107::getForm();
@@ -1923,7 +1930,8 @@ class e107forum
// New v2.x Bootstrap Standardized Breadcrumb. // New v2.x Bootstrap Standardized Breadcrumb.
// return print_a($forumInfo); // print_a($forumInfo);
// return;
$breadcrumb = array(); $breadcrumb = array();
@@ -1938,11 +1946,16 @@ class e107forum
if($forumInfo['forum_sub']) if($forumInfo['forum_sub'])
{ {
$breadcrumb[] = array('text'=> ltrim($forumInfo['sub_parent'], '*') , 'url'=> e107::getUrl()->create('forum/forum/view', "id={$forumInfo['forum_sub']}")); $breadcrumb[] = array('text'=> ltrim($forumInfo['sub_parent'], '*') , 'url'=> e107::url('forum','forum', array('forum_sef'=> $forumInfo['parent_sef'])));
$breadcrumb[] = array('text'=>ltrim($forumInfo['forum_name'], '*') , 'url'=> (e_PAGE !='forum_viewforum.php') ? e107::url('forum', 'forum', $forumInfo) : null);
} }
else
$breadcrumb[] = array('text'=>ltrim($forumInfo['forum_name'], '*') , 'url'=> (e_PAGE !='forum_viewforum.php') ? e107::url('forum', 'forum', $forumInfo) : null); {
$breadcrumb[] = array('text'=>ltrim($forumInfo['forum_name'], '*') , 'url'=> (e_PAGE !='forum_viewforum.php') ? e107::url('forum', 'forum', $forumInfo) : null);
}
if(vartrue($forumInfo['thread_name'])) if(vartrue($forumInfo['thread_name']))
{ {
$breadcrumb[] = array('text'=> $forumInfo['thread_name'] , 'url'=>null); $breadcrumb[] = array('text'=> $forumInfo['thread_name'] , 'url'=>null);
@@ -2116,7 +2129,7 @@ function img_path($filename)
if(file_exists(THEME.'forum/'.$filename) || is_readable(THEME.'forum/'.e_LANGUAGE.'_'.$filename)) if(file_exists(THEME.'forum/'.$filename) || is_readable(THEME.'forum/'.e_LANGUAGE.'_'.$filename))
{ {
$image = ($ML && is_readable(THEME.'forum/'.e_LANGUAGE.'_'.$filename)) ? THEME.'forum/'.e_LANGUAGE."_".$filename : THEME.'forum/'.$filename; $image = ($ML && is_readable(THEME.'forum/'.e_LANGUAGE.'_'.$filename)) ? THEME_ABS.'forum/'.e_LANGUAGE."_".$filename : THEME_ABS.'forum/'.$filename;
} }
else else
{ {
@@ -2124,22 +2137,22 @@ function img_path($filename)
{ {
if($ML) if($ML)
{ {
$image = (is_readable(e_PLUGIN.'forum/images/icons/'.e_LANGUAGE.'_'.$filename)) ? e_PLUGIN.'forum/images/icons/'.e_LANGUAGE.'_'.$filename : e_PLUGIN.'forum/images/icons/English_'.$filename; $image = (is_readable(e_PLUGIN.'forum/images/icons/'.e_LANGUAGE.'_'.$filename)) ? e_PLUGIN_ABS.'forum/images/icons/'.e_LANGUAGE.'_'.$filename : e_PLUGIN_ABS.'forum/images/icons/English_'.$filename;
} }
else else
{ {
$image = e_PLUGIN.'forum/images/icons/'.$filename; $image = e_PLUGIN_ABS.'forum/images/icons/'.$filename;
} }
} }
else else
{ {
if($ML) if($ML)
{ {
$image = (is_readable(e_PLUGIN."forum/images/lite/".e_LANGUAGE.'_'.$filename)) ? e_PLUGIN.'forum/images/icons/'.e_LANGUAGE.'_'.$filename : e_PLUGIN.'forum/images/icons/English_'.$filename; $image = (is_readable(e_PLUGIN."forum/images/lite/".e_LANGUAGE.'_'.$filename)) ? e_PLUGIN_ABS.'forum/images/icons/'.e_LANGUAGE.'_'.$filename : e_PLUGIN_ABS.'forum/images/icons/English_'.$filename;
} }
else else
{ {
$image = e_PLUGIN.'forum/images/icons/'.$filename; $image = e_PLUGIN_ABS.'forum/images/icons/'.$filename;
} }
} }

View File

@@ -132,10 +132,8 @@ class forum_post_handler
break; break;
case 'edit': case 'edit':
case 'move':
case "quote": case "quote":
case "report": case "report":
$postInfo = $this->forumObj->postGet($this->post, 'post'); $postInfo = $this->forumObj->postGet($this->post, 'post');
$forumInfo = $this->forumObj->forumGet($postInfo['post_forum']); $forumInfo = $this->forumObj->forumGet($postInfo['post_forum']);
$data = array_merge($postInfo ,$forumInfo); $data = array_merge($postInfo ,$forumInfo);
@@ -144,6 +142,15 @@ class forum_post_handler
return $data; return $data;
break; break;
case 'move':
$thread = $this->forumObj->threadGet($this->id, true);
$extra = $this->forumObj->postGet($this->id,0,1); // get first post.
$data = array_merge($thread,$extra[0]);
$data['action'] = $this->action;
$this->setPageTitle($data);
return $data;
break;
default: default:
$url = e107::url('forum','index',null,'full'); $url = e107::url('forum','index',null,'full');
$this->redirect($url); $this->redirect($url);

View File

@@ -389,7 +389,7 @@ else
} }
$fVars->FORUMJUMP = forumjump(); $fVars->FORUMJUMP = forumjump();
$fVars->TOPLINK = "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".LAN_GOTO.'</a>'; // FIXME - TOPLINK not used anymore? $fVars->TOPLINK = "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".LAN_GO.'</a>'; // FIXME - TOPLINK not used anymore?
if($container_only) if($container_only)
{ {
@@ -428,8 +428,6 @@ function parse_thread($thread_info)
global $forum, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $menu_pref, $threadsViewed; global $forum, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $menu_pref, $threadsViewed;
$tp = e107::getParser(); $tp = e107::getParser();
$tVars = new e_vars; $tVars = new e_vars;
$e107 = e107::getInstance();
$text = '';
$threadId = $thread_info['thread_id']; $threadId = $thread_info['thread_id'];
$forumId = $thread_info['thread_forum_id']; $forumId = $thread_info['thread_forum_id'];
@@ -542,6 +540,7 @@ function parse_thread($thread_info)
// FIXME - pages -> convert to nextprev shortcode // FIXME - pages -> convert to nextprev shortcode
/*
$pages = ceil(($tVars->REPLIES)/$forum->prefs->get('postspage')); $pages = ceil(($tVars->REPLIES)/$forum->prefs->get('postspage'));
$urlparms = $thread_info; $urlparms = $thread_info;
if ($pages > 1) if ($pages > 1)
@@ -583,7 +582,10 @@ function parse_thread($thread_info)
{ {
$tVars->PAGES = ''; $tVars->PAGES = '';
} }
*/
$tVars->PAGES = fpages($thread_info, $tVars->REPLIES);
$tVars->PAGESX = fpages($thread_info, $tVars->REPLIES); $tVars->PAGESX = fpages($thread_info, $tVars->REPLIES);
if (MODERATOR) if (MODERATOR)
@@ -591,21 +593,21 @@ function parse_thread($thread_info)
// FIXME _URL_ thread name // FIXME _URL_ thread name
// e107::getUrl()->create('forum/forum/view', "id={$thread_info['thread_forum_id']}") // e107::getUrl()->create('forum/forum/view', "id={$thread_info['thread_forum_id']}")
// USED self instead // USED self instead
$moveUrl = e107::url('forum','move', $thread_info);
$tVars->ADMIN_ICONS = " $tVars->ADMIN_ICONS = "
<form method='post' action='".e_REQUEST_URI."' id='frmMod_{$forumId}_{$threadId}' style='margin:0;'><div> <form method='post' action='".e_REQUEST_URI."' id='frmMod_{$forumId}_{$threadId}' style='margin:0;'><div>
<input type='image' ".IMAGE_admin_delete." name='deleteThread_{$threadId}' value='thread_action' onclick=\"return confirm_({$threadId})\" /> <input type='image' ".IMAGE_admin_delete." name='deleteThread_{$threadId}' value='thread_action' onclick=\"return confirm_({$threadId})\" />
".($thread_info['thread_sticky'] == 1 ? "<input type='image' ".IMAGE_admin_unstick." name='unstick_{$threadId}' value='thread_action' /> " : "<input type='image' ".IMAGE_admin_stick." name='stick_{$threadId}' value='thread_action' /> ")." ".($thread_info['thread_sticky'] == 1 ? "<input type='image' ".IMAGE_admin_unstick." name='unstick_{$threadId}' value='thread_action' /> " : "<input type='image' ".IMAGE_admin_stick." name='stick_{$threadId}' value='thread_action' /> ")."
".($thread_info['thread_active'] ? "<input type='image' ".IMAGE_admin_lock." name='lock_{$threadId}' value='thread_action' /> " : "<input type='image' ".IMAGE_admin_unlock." name='unlock_{$threadId}' value='thread_action' /> "). " ".($thread_info['thread_active'] ? "<input type='image' ".IMAGE_admin_lock." name='lock_{$threadId}' value='thread_action' /> " : "<input type='image' ".IMAGE_admin_unlock." name='unlock_{$threadId}' value='thread_action' /> "). "
<a href='".e107::getUrl()->create('forum/thread/move', "id={$threadId}")."'>".IMAGE_admin_move.'</a> <a href='".$moveUrl."'>".IMAGE_admin_move.'</a>
</div></form> </div></form>
'; ';
$tVars->ADMINOPTIONS = fadminoptions($thread_info); $tVars->ADMINOPTIONS = fadminoptions($thread_info);
} }
$text .= "</td>
<td style='vertical-align:top; text-align:center; width:20%' class='forumheader3'>".$THREADDATE.'<br />';
// $tmp = explode('.', $thread_info['thread_user'], 2);
if($thread_info['user_name']) if($thread_info['user_name'])
{ {
@@ -664,12 +666,13 @@ function parse_thread($thread_info)
return $tp->simpleParse($_TEMPLATE, $tVars); return $tp->simpleParse($_TEMPLATE, $tVars);
} }
function parse_sub($subInfo) function parse_sub($subInfo)
{ {
global $FORUM_VIEW_SUB, $gen, $newflag_list; global $FORUM_VIEW_SUB, $gen, $newflag_list;
$tp = e107::getParser(); $tp = e107::getParser();
$tVars = new e_vars; $tVars = new e_vars;
$e107 = e107::getInstance();
$forumName = $tp->toHTML($subInfo['forum_name'], true); $forumName = $tp->toHTML($subInfo['forum_name'], true);
$tVars->SUB_FORUMTITLE = "<a href='".e107::getUrl()->create('forum/forum/view', $subInfo)."'>{$forumName}</a>"; $tVars->SUB_FORUMTITLE = "<a href='".e107::getUrl()->create('forum/forum/view', $subInfo)."'>{$forumName}</a>";
$tVars->SUB_DESCRIPTION = $tp->toHTML($subInfo['forum_description'], false, 'no_hook'); $tVars->SUB_DESCRIPTION = $tp->toHTML($subInfo['forum_description'], false, 'no_hook');
@@ -744,15 +747,16 @@ function fadminoptions($thread_info)
$tp = e107::getParser(); $tp = e107::getParser();
// $text = "<form method='post' action='".e_REQUEST_URI."' id='frmMod_{$forumId}_{$threadId}' style='margin:0;'>"; // $text = "<form method='post' action='".e_REQUEST_URI."' id='frmMod_{$forumId}_{$threadId}' style='margin:0;'>";
$text .= '<div class="btn-group"><button class="btn btn-default btn-sm btn-mini dropdown-toggle" data-toggle="dropdown"> $text = '<div class="btn-group"><button class="btn btn-default btn-sm btn-mini dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu pull-right"> <ul class="dropdown-menu pull-right">
'; ';
//FIXME - not fully working. //FIXME - not fully working.
$moveUrl = e107::getUrl()->create('forum/thread/move', "id=".$thread_info['thread_id']); $moveUrl = e107::url('forum','move', $thread_info);
$lockUnlock = ($thread_info['thread_active'] ) ? 'lock' : 'unlock'; $lockUnlock = ($thread_info['thread_active'] ) ? 'lock' : 'unlock';
$stickUnstick = ($thread_info['thread_sticky'] == 1) ? 'unstick' : 'stick'; $stickUnstick = ($thread_info['thread_sticky'] == 1) ? 'unstick' : 'stick';
$id = intval($thread_info['thread_id']); $id = intval($thread_info['thread_id']);

View File

@@ -539,7 +539,8 @@ function showmodoptions()
"; ";
if ($type == 'Thread') if ($type == 'Thread')
{ {
$ret .= "<a href='" . $e107->url->create('forum/thread/move', array('id' => $postInfo['post_id']))."'>" . IMAGE_admin_move2 . "</a>"; $moveUrl = e107::url('forum','move', array('thread_id'=>$postInfo['post_thread']));
$ret .= "<a href='" . $moveUrl."'>" . IMAGE_admin_move2 . "</a>";
} }
else else
{ {
@@ -704,8 +705,9 @@ class e107ForumThread
{ {
if(E107_DEBUG_LEVEL > 0) if(E107_DEBUG_LEVEL > 0)
{ {
echo __METHOD__ .' Line: '.__LINE__; e107::getMessage()->addError("Thread not found or query error: ". __METHOD__ .' Line: '.__LINE__ );
exit; return;
// exit;
} }
$url = e107::url('forum','index','full'); $url = e107::url('forum','index','full');

View File

@@ -564,8 +564,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
if ($type == 'thread') if ($type == 'thread')
{ {
$url = e107::url('forum','post')."?f=move&amp;id=".$this->postInfo['post_thread']."&amp;post=".$this->postInfo['post_id']; $url = e107::url('forum','move', array('thread_id'=>$this->postInfo['post_thread']));
// $url = e107::getUrl()->create('forum/thread/move', array('id' => $this->postInfo['post_id'], 'post'=>$this->postInfo['post_id']));
$text .= "<li class='text-right'><a href='" . $url."'>".LAN_FORUM_2042." ".$tp->toGlyph('move')."</a></a></li>"; $text .= "<li class='text-right'><a href='" . $url."'>".LAN_FORUM_2042." ".$tp->toGlyph('move')."</a></a></li>";
} }
else //TODO else //TODO

View File

@@ -12,6 +12,29 @@
if (!defined('e107_INIT')) { exit(); } if (!defined('e107_INIT')) { exit(); }
$tp = e107::getParser();
if(deftrue("FONTAWESOME", 4)) {
define('IMAGE_e', 'e');
define('IMAGE_new', $tp->toGlyph('fa-star', 'size=2x'));
define('IMAGE_nonew', $tp->toGlyph('fa-comment', 'size=2x'));
define('IMAGE_new_small', $tp->toGlyph('fa-star'));
define('IMAGE_nonew_small', $tp->toGlyph('fa-comment-o'));
define('IMAGE_new_popular', $tp->toGlyph('fa-comments', 'size=2x'));
define('IMAGE_nonew_popular', $tp->toGlyph('fa-comments-o', 'size=2x'));
define('IMAGE_new_popular_small', $tp->toGlyph('fa-comments'));
define('IMAGE_nonew_popular_small', $tp->toGlyph('fa-comments-o'));
define('IMAGE_sticky', $tp->toGlyph('fa-thumb-tack', 'size=2x'));
define('IMAGE_stickyclosed', $tp->toGlyph('fa-lock', 'size=2x'));
define('IMAGE_sticky_small', $tp->toGlyph('fa-thumb-tack'));
define('IMAGE_stickyclosed_small', $tp->toGlyph('fa-lock'));
define('IMAGE_announce', $tp->toGlyph('fa-bullhorn', 'size=2x'));
define('IMAGE_announce_small', $tp->toGlyph('fa-bullhorn'));
define('IMAGE_closed_small', $tp->toGlyph('fa-lock'));
define('IMAGE_closed', $tp->toGlyph('fa-lock', 'size=2x'));
} else {
// Thread info // Thread info
define('IMAGE_e', '<img src="'.img_path('e.png').'" alt="" title="" />'); define('IMAGE_e', '<img src="'.img_path('e.png').'" alt="" title="" />');
define('IMAGE_new', '<img src="'.img_path('new.png').'" alt="'.LAN_FORUM_4001.'" title="'.LAN_FORUM_4001.'" />'); define('IMAGE_new', '<img src="'.img_path('new.png').'" alt="'.LAN_FORUM_4001.'" title="'.LAN_FORUM_4001.'" />');
@@ -31,6 +54,8 @@ define('IMAGE_announce_small', '<img src="'.img_path('announce_small.png').'"
define('IMAGE_closed_small', '<img src="'.img_path('closed_small.png').'" alt="'.LAN_FORUM_1014.'" title="'.LAN_FORUM_1014.'" />'); define('IMAGE_closed_small', '<img src="'.img_path('closed_small.png').'" alt="'.LAN_FORUM_1014.'" title="'.LAN_FORUM_1014.'" />');
define('IMAGE_closed', '<img src="'.img_path('closed.png').'" alt="'.LAN_FORUM_1014.'" title="'.LAN_FORUM_1014.'" />'); define('IMAGE_closed', '<img src="'.img_path('closed.png').'" alt="'.LAN_FORUM_1014.'" title="'.LAN_FORUM_1014.'" />');
}
// User info // User info
define('IMAGE_website', '<img src="'.img_path('website.png').'" alt="'.LAN_FORUM_2034.'" title="'.LAN_FORUM_2034.'" />'); define('IMAGE_website', '<img src="'.img_path('website.png').'" alt="'.LAN_FORUM_2034.'" title="'.LAN_FORUM_2034.'" />');
define('IMAGE_email', '<img src="'.img_path('email.png').'" alt="'.LAN_FORUM_2044.'" title="'.LAN_FORUM_2044.'" />'); define('IMAGE_email', '<img src="'.img_path('email.png').'" alt="'.LAN_FORUM_2044.'" title="'.LAN_FORUM_2044.'" />');
@@ -65,4 +90,4 @@ define('IMAGE_rank_moderator_image', '<img src="'.img_path('moderator.png', '',
define('IMAGE_rank_main_admin_image', '<img src="'.img_path('main_admin.png', '', 'rank_main_admin_image').'" alt="" />'); define('IMAGE_rank_main_admin_image', '<img src="'.img_path('main_admin.png', '', 'rank_main_admin_image').'" alt="" />');
define('IMAGE_rank_admin_image', '<img src="'.img_path('admin.png', '', 'rank_admin_image').'" alt="" />'); define('IMAGE_rank_admin_image', '<img src="'.img_path('admin.png', '', 'rank_admin_image').'" alt="" />');
?> ?>

View File

@@ -71,12 +71,8 @@ define('LAN_PM_67', 'No users blocked');
define('LAN_PM_68', 'User Name'); define('LAN_PM_68', 'User Name');
define('LAN_PM_69', 'Date blocked'); define('LAN_PM_69', 'Date blocked');
define('LAN_PM_70', 'Deleting block on user'); define('LAN_PM_70', 'Deleting block on user');
define('LAN_PM_71', '--GOOD-- attachment(s) deleted. --FAIL-- failure(s)'); define('LAN_PM_71', '[x] attachment(s) deleted. [y] failure(s)');
define('LAN_PM_72', '');
define('LAN_PM_73', '');
define('LAN_PM_74', '');
define('LAN_PM_75', '');
define('LAN_PM_76', '');
define("LAN_PM_100", "New PM from "); define("LAN_PM_100", "New PM from ");
define("LAN_PM_101", "You have received a new Private Message from "); define("LAN_PM_101", "You have received a new Private Message from ");
@@ -88,6 +84,5 @@ define("LAN_PM_106", "PM read by ");
define("LAN_PM_107", "The Private Message you sent to {UNAME} was read on "); define("LAN_PM_107", "The Private Message you sent to {UNAME} was read on ");
define("LAN_PM_108", "Message sent on: "); define("LAN_PM_108", "Message sent on: ");
define("LAN_PM_109", "New Message(s)"); define("LAN_PM_109", "New Message(s)");
define("LAN_PM_110", "ok");
define("LAN_PM_111", "Read"); define("LAN_PM_111", "Read");
?> ?>

View File

@@ -316,7 +316,9 @@ class private_message
} }
if ($aCount[0] || $aCount[1]) if ($aCount[0] || $aCount[1])
{ {
$ret .= str_replace(array('--GOOD--', '--FAIL--'), $aCount, LAN_PM_71).'<br />';
// $ret .= str_replace(array('--GOOD--', '--FAIL--'), $aCount, LAN_PM_71).'<br />';
$ret .= e107::getParser()->lanVars(LAN_PM_71, $aCount);
} }
$sql->delete('private_msg', 'pm_id = '.$pmid); $sql->delete('private_msg', 'pm_id = '.$pmid);
} }

View File

@@ -54,7 +54,7 @@ if(!function_exists('pm_show_popup'))
<td width=100% style='text-align:center'> <td width=100% style='text-align:center'>
<b>--- ".LAN_PM." ---</b><br />".$pm_inbox['inbox']['new'].' '.LAN_PM_109."<br />".$pm_inbox['inbox']['unread'].' '.LAN_PM_37."<br /><br /> <b>--- ".LAN_PM." ---</b><br />".$pm_inbox['inbox']['new'].' '.LAN_PM_109."<br />".$pm_inbox['inbox']['unread'].' '.LAN_PM_37."<br /><br />
<form> <form>
<input class=\'button\' type=\'submit\' onclick=\'self.close();\' value = \'".LAN_PM_110."\' /> <input class=\'button\' type=\'submit\' onclick=\'self.close();\' value = \'".LAN_OK."\' />
</form> </form>
</td> </td>
</tr> </tr>

View File

@@ -66,7 +66,7 @@ if(deftrue('BOOTSTRAP'))
$text = ' $text = '
<form class="form-inline" method="get" action="'.e_HTTP.'search.php"> <form class="form-inline" method="get" action="'.e_HTTP.'search.php">
<div class="input-group"> <div class="input-group">
<input class="form-control search" type="text" name="q" size="20" maxlength="50" '.$value_text.'> <input class="form-control search" type="text" name="q" size="20" maxlength="50" '.$value_text.' />
<input type="hidden" name="r" value="0" />'; <input type="hidden" name="r" value="0" />';
if (isset($custom_query[4]) && $custom_query[4] != '') if (isset($custom_query[4]) && $custom_query[4] != '')

View File

@@ -225,8 +225,11 @@ TEMPL;
parse_str($qry,$qr); parse_str($qry,$qr);
$qr['w'] = $img['width']; if(substr($url,0,4)!=='http' && empty($qr['w']) && empty($qr['aw']))
$qr['h'] = $img['height']; {
$qr['w'] = $img['width'];
$qr['h'] = $img['height'];
}
$src = $url."?".urldecode(http_build_query($qr)); $src = $url."?".urldecode(http_build_query($qr));

View File

@@ -199,7 +199,7 @@ $ADMIN_HEADER .= '<div class="container-fluid">
{ADMIN_MENU} {ADMIN_MENU}
{ADMIN_MENUMANAGER} {ADMIN_MENUMANAGER}
{ADMIN_PWORD} {ADMIN_PWORD}
{SETSTYLE=site_info} {SETSTYLE=site_info}
@@ -216,11 +216,10 @@ $ADMIN_HEADER .= '<div class="container-fluid">
{SETSTYLE=none} {SETSTYLE=default}
</div> </div>
<div class="span10" id="right-panel" > <div class="span10" id="right-panel" >
'; ';
@@ -231,7 +230,7 @@ $ADMIN_FOOTER = '
</div><!--/.fluid-container--> </div><!--/.fluid-container-->
<footer class="center mute"> <footer class="center mute">
Copyright &copy; 2008-2013 e107 Inc (e107.org)<br /> Copyright &copy; 2008-2015 e107 Inc (e107.org)<br />
</footer>'; </footer>';

View File

@@ -54,15 +54,15 @@ $no_core_css = TRUE;
class bootstrap_admintheme class bootstrap_admintheme
{ {
function tablestyle($caption, $text, $mode) function tablestyle($caption, $text, $mode, $data)
{ {
global $style; // global $style;
$style = $data['setStyle'];
// echo "Style: ".$style;
$class = ''; $class = '';
if(is_string($mode) && $mode == 'admin_help') $class = ' '.str_replace('_', '-', $mode); if(is_string($mode) && $mode == 'admin_help') $class = ' '.str_replace('_', '-', $mode);
if($mode == 'e_help') if($mode == 'e_help')

View File

@@ -3,7 +3,8 @@ if ( ! defined('e107_INIT')) { exit(); }
/* /*
* This is a 100% Pure Bootstrap Theme for e107 v2 * This is a 100% Pure Bootstrap Theme for e107 v2
*/ */
define('BOOTSTRAP',true); define("BOOTSTRAP",true);
define("FONTAWESOME", 4);
define("VIEWPORT", "width=device-width, initial-scale=1.0"); define("VIEWPORT", "width=device-width, initial-scale=1.0");
define("BODYTAG", '<body data-spy="scroll" data-target=".bs-docs-sidebar" >'); define("BODYTAG", '<body data-spy="scroll" data-target=".bs-docs-sidebar" >');
@@ -43,7 +44,7 @@ else
e107::css('bootstrap','bootstrap-responsive.min.css'); e107::css('bootstrap','bootstrap-responsive.min.css');
e107::css('bootstrap','jquery-ui.custom.css'); e107::css('bootstrap','jquery-ui.custom.css');
e107::css('url', "//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"); e107::css('url', "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
e107::css('theme', 'js/google-code-prettify/prettify.css'); e107::css('theme', 'js/google-code-prettify/prettify.css');
e107::js('theme', "js/google-code-prettify/prettify.js"); e107::js('theme', "js/google-code-prettify/prettify.js");
@@ -537,4 +538,4 @@ $NEWSCAT_ITEM = "\n\n\n\n<!-- News Category Item -->\n\n\n\n
?> ?>

View File

@@ -83,17 +83,17 @@ class theme_shortcodes extends e_shortcode
<ul class="nav pull-right"> <ul class="nav pull-right">
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Logged in as '.USERNAME.' <b class="caret"></b></a> <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Logged in as '.USERNAME.' <b class="caret"></b></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="'.e_HTTP.'usersettings.php"><i class="icon-cog"></i> '.LAN_SETTINGS.'</a></li> <li><a href="'.e_HTTP.'usersettings.php"><i class="fa fa-cog"></i> '.LAN_SETTINGS.'</a></li>
<li><a class="dropdown-toggle no-block" role="button" href="'.e_HTTP.'user.php?id.'.USERID.'"><i class="icon-user"></i> '.LAN_LOGINMENU_13.'</a></li> <li><a class="dropdown-toggle no-block" role="button" href="'.e_HTTP.'user.php?id.'.USERID.'"><i class="fa fa-user"></i> '.LAN_LOGINMENU_13.'</a></li>
<li class="divider"></li>'; <li class="divider"></li>';
if(ADMIN) if(ADMIN)
{ {
$text .= '<li><a href="'.e_ADMIN_ABS.'"><i class="icon-cogs"></i> '.LAN_LOGINMENU_11.'</a></li>'; $text .= '<li><a href="'.e_ADMIN_ABS.'"><i class="fa fa-cogs"></i> '.LAN_LOGINMENU_11.'</a></li>';
} }
$text .= ' $text .= '
<li><a href="'.e_HTTP.'index.php?logout"><i class="icon-off"></i> '.LAN_LOGOUT.'</a></li> <li><a href="'.e_HTTP.'index.php?logout"><i class="fa fa-sign-out"></i> '.LAN_LOGOUT.'</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@@ -111,4 +111,4 @@ class theme_shortcodes extends e_shortcode
?> ?>

View File

@@ -853,25 +853,4 @@ $NEWSCAT_ITEM = "\n\n\n\n<!-- News Category Item -->\n\n\n\n
</td></tr></table></div> </td></tr></table></div>
"; ";
$tp = e107::getParser(); ?>
// Used by Forum plugin.
define('IMAGE_e', 'e');
define('IMAGE_new', $tp->toGlyph('fa-star', 'size=2x'));
define('IMAGE_nonew', $tp->toGlyph('fa-comment', 'size=2x'));
define('IMAGE_new_small', $tp->toGlyph('fa-star'));
define('IMAGE_nonew_small', $tp->toGlyph('fa-comment-o'));
define('IMAGE_new_popular', $tp->toGlyph('fa-comments', 'size=2x'));
define('IMAGE_nonew_popular', $tp->toGlyph('fa-comments-o', 'size=2x'));
define('IMAGE_new_popular_small', $tp->toGlyph('fa-comments'));
define('IMAGE_nonew_popular_small', $tp->toGlyph('fa-comments-o'));
define('IMAGE_sticky', $tp->toGlyph('fa-thumb-tack', 'size=2x'));
define('IMAGE_stickyclosed', $tp->toGlyph('fa-lock', 'size=2x'));
define('IMAGE_sticky_small', $tp->toGlyph('fa-thumb-tack'));
define('IMAGE_stickyclosed_small', $tp->toGlyph('fa-lock'));
define('IMAGE_announce', $tp->toGlyph('fa-bullhorn', 'size=2x'));
define('IMAGE_announce_small', $tp->toGlyph('fa-bullhorn'));
define('IMAGE_closed_small', $tp->toGlyph('fa-lock'));
define('IMAGE_closed', $tp->toGlyph('fa-lock', 'size=2x'));
?>

View File

@@ -100,6 +100,13 @@
foreach($cfg as $k=>$v) foreach($cfg as $k=>$v)
{ {
if(empty($v['regex']))
{
// e107::getMessage()->addDebug("Skipping empty regex: <b>".$k."</b>");
continue;
}
if(!empty($v['alias'])) if(!empty($v['alias']))
{ {
$alias = (!empty($pref['e_url_alias'][e_LAN][$plug][$k])) ? $pref['e_url_alias'][e_LAN][$plug][$k] : $v['alias']; $alias = (!empty($pref['e_url_alias'][e_LAN][$plug][$k])) ? $pref['e_url_alias'][e_LAN][$plug][$k] : $v['alias'];