mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
@@ -202,6 +202,8 @@ class convert
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated - for internal use only.
|
||||||
|
* @see $tp->toDate() as a replacement.
|
||||||
* Converts between unix timestamp and human-readable date-time OR vice-versa. (auto-detected)
|
* Converts between unix timestamp and human-readable date-time OR vice-versa. (auto-detected)
|
||||||
* @param string $string unix timestamp OR human-readable date-time.
|
* @param string $string unix timestamp OR human-readable date-time.
|
||||||
* @param string $mask (optional) long | short | input
|
* @param string $mask (optional) long | short | input
|
||||||
|
@@ -376,10 +376,28 @@ class news {
|
|||||||
|
|
||||||
$wrapperKey = (!empty($param['template_key'])) ? 'news/'.$param['template_key'].'/item' : 'news/view/item';
|
$wrapperKey = (!empty($param['template_key'])) ? 'news/'.$param['template_key'].'/item' : 'news/view/item';
|
||||||
|
|
||||||
|
$editable = array(
|
||||||
|
'table' => 'news',
|
||||||
|
'pid' => 'news_id',
|
||||||
|
'vars' => 'news_item',
|
||||||
|
'perms' => '0',
|
||||||
|
'shortcodes' => array(
|
||||||
|
'news_title' => array('field'=>'news_title', 'type'=>'text', 'container'=>'span'),
|
||||||
|
'news_description' => array('field'=>'news_meta_description','type'=>'text', 'container'=>'div'),
|
||||||
|
'news_body' => array('field'=>'news_body', 'type'=>'html', 'container'=>'div'),
|
||||||
|
'news_summary' => array('field'=>'news_summary', 'type'=>'text', 'container'=>'span'),
|
||||||
|
)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$sc = e107::getScBatch('news')
|
$sc = e107::getScBatch('news')
|
||||||
->wrapper($wrapperKey)
|
->wrapper($wrapperKey)
|
||||||
->setScVar('news_item', $news)
|
->setScVar('news_item', $news)
|
||||||
->setScVar('param', $param);
|
->setScVar('param', $param)
|
||||||
|
->editable($editable);
|
||||||
|
|
||||||
|
|
||||||
$text = e107::getParser()->parseTemplate($NEWS_PARSE, true, $sc);
|
$text = e107::getParser()->parseTemplate($NEWS_PARSE, true, $sc);
|
||||||
|
@@ -91,20 +91,45 @@ if(isset($_GET['f']))
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fVars = new e_vars;
|
|
||||||
|
//echo "<hr><hr><hr>";
|
||||||
|
$sc = e107::getScBatch('forum', true);
|
||||||
|
//echo "<hr>";
|
||||||
|
//var_dump ($sc);
|
||||||
|
// $sc->forum = $forum;
|
||||||
|
//var_dump ($sc);
|
||||||
|
//echo $tp->parseTemplate("====>{FORUMTITLE}<====", false, $sc);
|
||||||
|
//echo "<hr>";
|
||||||
|
//var_dump (is_object($sc));
|
||||||
|
//var_dump (is_array($sc));
|
||||||
|
|
||||||
|
//--$fVars = new e_vars;
|
||||||
$gen = new convert;
|
$gen = new convert;
|
||||||
|
|
||||||
|
/*--
|
||||||
|
// Gonne directly to shortcode file
|
||||||
$fVars->FORUMTITLE = e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME);
|
$fVars->FORUMTITLE = e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME);
|
||||||
|
// Gonne directly to template file
|
||||||
$fVars->THREADTITLE = LAN_FORUM_0002;
|
$fVars->THREADTITLE = LAN_FORUM_0002;
|
||||||
|
// Gonne directly to template file
|
||||||
$fVars->REPLYTITLE = LAN_FORUM_0003;
|
$fVars->REPLYTITLE = LAN_FORUM_0003;
|
||||||
|
// Gonne directly to template file
|
||||||
$fVars->LASTPOSTITLE = LAN_FORUM_0004;
|
$fVars->LASTPOSTITLE = LAN_FORUM_0004;
|
||||||
|
// Gonne directly to template file
|
||||||
$fVars->INFOTITLE = LAN_FORUM_0009;
|
$fVars->INFOTITLE = LAN_FORUM_0009;
|
||||||
|
// Gonne directly to shortcode file
|
||||||
$fVars->LOGO = IMAGE_e;
|
$fVars->LOGO = IMAGE_e;
|
||||||
|
// Gonne directly to template file
|
||||||
$fVars->NEWTHREADTITLE = LAN_FORUM_0075;
|
$fVars->NEWTHREADTITLE = LAN_FORUM_0075;
|
||||||
|
// Gonne directly to template file
|
||||||
$fVars->POSTEDTITLE = LAN_FORUM_0074;
|
$fVars->POSTEDTITLE = LAN_FORUM_0074;
|
||||||
|
// Gonne directly to shortcode file
|
||||||
$fVars->NEWIMAGE = IMAGE_new_small;
|
$fVars->NEWIMAGE = IMAGE_new_small;
|
||||||
|
// Gonne directly to template file
|
||||||
$fVars->TRACKTITLE = LAN_FORUM_0073;
|
$fVars->TRACKTITLE = LAN_FORUM_0073;
|
||||||
|
--*/
|
||||||
|
/*--
|
||||||
|
// Gonne directly to shortcode file
|
||||||
$rules_text = forum_rules('check');
|
$rules_text = forum_rules('check');
|
||||||
|
|
||||||
$fVars->USERINFO = "<a href='".e_BASE."top.php?0.top.forum.10'>".LAN_FORUM_0010."</a> | <a href='".e_BASE."top.php?0.active'>".LAN_FORUM_0011."</a>";
|
$fVars->USERINFO = "<a href='".e_BASE."top.php?0.top.forum.10'>".LAN_FORUM_0010."</a> | <a href='".e_BASE."top.php?0.active'>".LAN_FORUM_0011."</a>";
|
||||||
@@ -138,10 +163,11 @@ if(!empty($trackPref))
|
|||||||
}
|
}
|
||||||
$fVars->USERINFOX = implode(" | ",$uInfo);
|
$fVars->USERINFOX = implode(" | ",$uInfo);
|
||||||
// -----------
|
// -----------
|
||||||
|
--*/
|
||||||
|
|
||||||
|
|
||||||
|
/*--
|
||||||
|
// Gonne to foruminfo shortcode
|
||||||
$total_topics = $sql->count("forum_thread", "(*)");
|
$total_topics = $sql->count("forum_thread", "(*)");
|
||||||
$total_replies = $sql->count("forum_post", "(*)");
|
$total_replies = $sql->count("forum_post", "(*)");
|
||||||
$total_members = $sql->count("user");
|
$total_members = $sql->count("user");
|
||||||
@@ -153,6 +179,8 @@ if(!defined('e_TRACKING_DISABLED'))
|
|||||||
$member_users = $sql->select("online", "*", "online_location REGEXP('forum.php') AND online_user_id!='0' ");
|
$member_users = $sql->select("online", "*", "online_location REGEXP('forum.php') AND online_user_id!='0' ");
|
||||||
$guest_users = $sql->select("online", "*", "online_location REGEXP('forum.php') AND online_user_id='0' ");
|
$guest_users = $sql->select("online", "*", "online_location REGEXP('forum.php') AND online_user_id='0' ");
|
||||||
$users = $member_users+$guest_users;
|
$users = $member_users+$guest_users;
|
||||||
|
// Gonne to shortcode file
|
||||||
|
/*--
|
||||||
$fVars->USERLIST = LAN_FORUM_0036.": ";
|
$fVars->USERLIST = LAN_FORUM_0036.": ";
|
||||||
global $listuserson;
|
global $listuserson;
|
||||||
$c = 0;
|
$c = 0;
|
||||||
@@ -167,6 +195,9 @@ if(!defined('e_TRACKING_DISABLED'))
|
|||||||
}
|
}
|
||||||
$fVars->USERLIST .= "<br /><a rel='external' href='".e_BASE."online.php'>".LAN_FORUM_0037."</a> ".LAN_FORUM_0038;
|
$fVars->USERLIST .= "<br /><a rel='external' href='".e_BASE."online.php'>".LAN_FORUM_0037."</a> ".LAN_FORUM_0038;
|
||||||
}
|
}
|
||||||
|
--*/
|
||||||
|
// Gonne directly to shortcode file
|
||||||
|
/*--
|
||||||
$fVars->STATLINK = "<a href='".e_PLUGIN."forum/forum_stats.php'>".LAN_FORUM_0017."</a>\n";
|
$fVars->STATLINK = "<a href='".e_PLUGIN."forum/forum_stats.php'>".LAN_FORUM_0017."</a>\n";
|
||||||
$fVars->ICONKEY = "
|
$fVars->ICONKEY = "
|
||||||
<table class='table table-bordered' style='width:100%'>\n<tr>
|
<table class='table table-bordered' style='width:100%'>\n<tr>
|
||||||
@@ -186,13 +217,13 @@ if(!$srchIcon = $tp->toGlyph('fa-search'))
|
|||||||
$fVars->SEARCH = "
|
$fVars->SEARCH = "
|
||||||
<form method='get' class='form-inline input-append' action='".e_BASE."search.php'>
|
<form method='get' class='form-inline input-append' action='".e_BASE."search.php'>
|
||||||
<div class='input-group'>
|
<div class='input-group'>
|
||||||
<input type='hidden' name='r' value='0' />
|
|
||||||
<input type='hidden' name='t' value='forum' />
|
|
||||||
<input type='hidden' name='forum' value='all' />
|
|
||||||
<input class='tbox form-control' type='text' name='q' size='20' value='' maxlength='50' />
|
<input class='tbox form-control' type='text' name='q' size='20' value='' maxlength='50' />
|
||||||
<span class='input-group-btn'>
|
<span class='input-group-btn'>
|
||||||
<button class='btn btn-default button' type='submit' name='s' value='search' />".$srchIcon."</button>
|
<button class='btn btn-default button' type='submit' name='s' value='search' />".$srchIcon."</button>
|
||||||
</span>
|
</span>
|
||||||
|
<input type='hidden' name='r' value='0' />
|
||||||
|
<input type='hidden' name='t' value='forum' />
|
||||||
|
<input type='hidden' name='forum' value='all' />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>\n";
|
</form>\n";
|
||||||
@@ -270,6 +301,7 @@ if (USER && vartrue($trackPref) && e_QUERY != 'track')
|
|||||||
$fVars->FORUMINFO =
|
$fVars->FORUMINFO =
|
||||||
str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_topics ".($total_topics == 1 ? LAN_FORUM_0032 : LAN_FORUM_0033).", $total_replies ".($total_replies == 1 ? LAN_FORUM_0034 : LAN_FORUM_0035).")
|
str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_topics ".($total_topics == 1 ? LAN_FORUM_0032 : LAN_FORUM_0033).", $total_replies ".($total_replies == 1 ? LAN_FORUM_0034 : LAN_FORUM_0035).")
|
||||||
".(!defined("e_TRACKING_DISABLED") ? "" : "<br />".$users." ".($users == 1 ? LAN_FORUM_0059 : LAN_FORUM_0060)." (".$member_users." ".($member_users == 1 ? LAN_FORUM_0061 : LAN_FORUM_0062).", ".$guest_users." ".($guest_users == 1 ? LAN_FORUM_0063 : LAN_FORUM_0064).")<br />".LAN_FORUM_0066." ".$total_members."<br />".LAN_FORUM_0065." <a href='".e_HTTP."user.php ?id.".$nuser_id."'>".$nuser_name."</a>.\n"); // FIXME cannot find other references to e_TRACKING_DISABLED, use pref?
|
".(!defined("e_TRACKING_DISABLED") ? "" : "<br />".$users." ".($users == 1 ? LAN_FORUM_0059 : LAN_FORUM_0060)." (".$member_users." ".($member_users == 1 ? LAN_FORUM_0061 : LAN_FORUM_0062).", ".$guest_users." ".($guest_users == 1 ? LAN_FORUM_0063 : LAN_FORUM_0064).")<br />".LAN_FORUM_0066." ".$total_members."<br />".LAN_FORUM_0065." <a href='".e_HTTP."user.php ?id.".$nuser_id."'>".$nuser_name."</a>.\n"); // FIXME cannot find other references to e_TRACKING_DISABLED, use pref?
|
||||||
|
--*/
|
||||||
|
|
||||||
// FIX - core template always override theme template
|
// FIX - core template always override theme template
|
||||||
// Include core template
|
// Include core template
|
||||||
@@ -285,9 +317,6 @@ elseif(file_exists(THEME.'templates/forum/forum_template.php'))
|
|||||||
require_once(THEME.'templates/forum/forum_template.php');
|
require_once(THEME.'templates/forum/forum_template.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(is_array($FORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // new v2.x format.
|
if(is_array($FORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // new v2.x format.
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -307,11 +336,8 @@ if(is_array($FORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // new v2.x format.
|
|||||||
$FORUM_NEWPOSTS_START = $FORUM_TEMPLATE['main']['start']; // $FORUM_TEMPLATE['new-start'];
|
$FORUM_NEWPOSTS_START = $FORUM_TEMPLATE['main']['start']; // $FORUM_TEMPLATE['new-start'];
|
||||||
$FORUM_NEWPOSTS_MAIN = $FORUM_TEMPLATE['main']['forum']; // $FORUM_TEMPLATE['new-main'];
|
$FORUM_NEWPOSTS_MAIN = $FORUM_TEMPLATE['main']['forum']; // $FORUM_TEMPLATE['new-main'];
|
||||||
$FORUM_NEWPOSTS_END = $FORUM_TEMPLATE['main']['end']; // $FORUM_TEMPLATE['new-end'];
|
$FORUM_NEWPOSTS_END = $FORUM_TEMPLATE['main']['end']; // $FORUM_TEMPLATE['new-end'];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once(HEADERF);
|
require_once(HEADERF);
|
||||||
|
|
||||||
$forumList = $forum->forumGetForumList();
|
$forumList = $forum->forumGetForumList();
|
||||||
@@ -325,18 +351,23 @@ if (!$forumList)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$forum_string = '';
|
$forum_string = '';
|
||||||
$pVars = new e_vars;
|
//--$pVars = new e_vars;
|
||||||
$frm = e107::getForm();
|
//--$frm = e107::getForm();
|
||||||
|
|
||||||
foreach ($forumList['parents'] as $parent)
|
foreach ($forumList['parents'] as $parent)
|
||||||
{
|
{
|
||||||
$status = parse_parent($parent);
|
// Gonne directly to shortcode file
|
||||||
$pVars->PARENTSTATUS = $status;
|
//-- $status = parse_parent($parent);
|
||||||
|
//-- $pVars->PARENTSTATUS = $status;
|
||||||
|
//---- $sc->parentstatus = parse_parent($parent);
|
||||||
|
|
||||||
$pVars->PARENTID = $parent['forum_id'];
|
// Gonne directly to shortcode file
|
||||||
// $pVars->PARENTNAME = "<a id='".$frm->name2id($parent['forum_name'])."'>".$parent['forum_name']."</a>";
|
// $pVars->PARENTNAME = "<a id='".$frm->name2id($parent['forum_name'])."'>".$parent['forum_name']."</a>";
|
||||||
$pVars->PARENTNAME = $parent['forum_name'];
|
// $pVars->PARENTNAME = $parent['forum_name'];
|
||||||
$forum_string .= $tp->simpleParse($FORUM_MAIN_PARENT, $pVars);
|
//---- $sc->parentname = $parent['forum_name'];
|
||||||
|
//-- $forum_string .= $tp->simpleParse($FORUM_MAIN_PARENT, $pVars);
|
||||||
|
// $sc->fparent = $parent;
|
||||||
|
$sc->setVars($parent);
|
||||||
|
$forum_string .= $tp->parseTemplate($FORUM_MAIN_PARENT, false, $sc);
|
||||||
if (!count($forumList['forums'][$parent['forum_id']]))
|
if (!count($forumList['forums'][$parent['forum_id']]))
|
||||||
{
|
{
|
||||||
$text .= "<td colspan='5' style='text-align:center' class='forumheader3'>".LAN_FORUM_0068."</td>";
|
$text .= "<td colspan='5' style='text-align:center' class='forumheader3'>".LAN_FORUM_0068."</td>";
|
||||||
@@ -369,11 +400,13 @@ foreach ($forumList['parents'] as $parent)
|
|||||||
}
|
}
|
||||||
if (isset($FORUM_MAIN_PARENT_END))
|
if (isset($FORUM_MAIN_PARENT_END))
|
||||||
{
|
{
|
||||||
$forum_string .= $tp->simpleParse($FORUM_MAIN_PARENT_END, $pVars);
|
//-- $forum_string .= $tp->simpleParse($FORUM_MAIN_PARENT_END, $pVars);
|
||||||
|
$forum_string .= $tp->parseTemplate($FORUM_MAIN_PARENT_END, false, $sc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----
|
||||||
function parse_parent($parent)
|
function parse_parent($parent)
|
||||||
{
|
{
|
||||||
if(!check_class($parent['forum_postclass']))
|
if(!check_class($parent['forum_postclass']))
|
||||||
@@ -382,16 +415,20 @@ function parse_parent($parent)
|
|||||||
}
|
}
|
||||||
return vartrue($status);
|
return vartrue($status);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
function parse_forum($f, $restricted_string = '')
|
function parse_forum($f, $restricted_string = '')
|
||||||
{
|
{
|
||||||
global $FORUM_MAIN_FORUM, $gen, $forum, $newflag_list, $forumList;
|
//---- global $FORUM_MAIN_FORUM, $gen, $forum, $newflag_list, $forumList, $sc;
|
||||||
$fVars = new e_vars;
|
global $FORUM_MAIN_FORUM, $forumList, $sc;
|
||||||
$e107 = e107::getInstance();
|
//-- $fVars = new e_vars;
|
||||||
|
//---- $e107 = e107::getInstance();
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
|
// Gonne directly to shortcode file
|
||||||
|
/*--
|
||||||
if(USER && is_array($newflag_list) && in_array($f['forum_id'], $newflag_list))
|
if(USER && is_array($newflag_list) && in_array($f['forum_id'], $newflag_list))
|
||||||
{
|
{
|
||||||
|
|
||||||
$fVars->NEWFLAG = "<a href='".$e107->url->create('forum/forum/mfar', $f)."'>".IMAGE_new.'</a>';
|
$fVars->NEWFLAG = "<a href='".$e107->url->create('forum/forum/mfar', $f)."'>".IMAGE_new.'</a>';
|
||||||
}
|
}
|
||||||
elseif(empty($f['forum_replies']) && defined('IMAGE_noreplies'))
|
elseif(empty($f['forum_replies']) && defined('IMAGE_noreplies'))
|
||||||
@@ -402,42 +439,48 @@ function parse_forum($f, $restricted_string = '')
|
|||||||
{
|
{
|
||||||
$fVars->NEWFLAG = IMAGE_nonew;
|
$fVars->NEWFLAG = IMAGE_nonew;
|
||||||
}
|
}
|
||||||
|
--*/
|
||||||
|
|
||||||
|
// Gonne directly to shortcode file
|
||||||
|
/*--
|
||||||
if(substr($f['forum_name'], 0, 1) == '*')
|
if(substr($f['forum_name'], 0, 1) == '*')
|
||||||
{
|
{
|
||||||
$f['forum_name'] = substr($f['forum_name'], 1);
|
$f['forum_name'] = substr($f['forum_name'], 1);
|
||||||
}
|
}
|
||||||
$f['forum_name'] = $tp->toHTML($f['forum_name'], true, 'no_hook');
|
$f['forum_name'] = $tp->toHTML($f['forum_name'], true, 'no_hook');
|
||||||
$f['forum_description'] = $tp->toHTML($f['forum_description'], TRUE, "BODY");
|
$f['forum_description'] = $tp->toHTML($f['forum_description'], true, 'no_hook');
|
||||||
|
|
||||||
|
|
||||||
//$url= $e107->url->create('forum/forum/view', $f);
|
//$url= $e107->url->create('forum/forum/view', $f);
|
||||||
$url = e107::url('forum', 'forum', $f);
|
$url = e107::url('forum', 'forum', $f);
|
||||||
$fVars->FORUMNAME = "<a href='".$url."'>{$f['forum_name']}</a>";
|
$fVars->FORUMNAME = "<a href='".$url."'>{$f['forum_name']}</a>";
|
||||||
$fVars->FORUMDESCRIPTION = $f['forum_description'].($restricted_string ? "<br /><span class='smalltext'><i>$restricted_string</i></span>" : "");
|
$fVars->FORUMDESCRIPTION = $f['forum_description'].($restricted_string ? "<br /><span class='smalltext'><i>$restricted_string</i></span>" : "");
|
||||||
$fVars->THREADS = $f['forum_threads'];
|
--*/
|
||||||
$fVars->REPLIES = $f['forum_replies'];
|
//-- $fVars->THREADS = $f['forum_threads'];
|
||||||
$fVars->FORUMSUBFORUMS = '';
|
//---- $sc->threads = $f['forum_threads'];
|
||||||
|
//-- $fVars->REPLIES = $f['forum_replies'];
|
||||||
|
//---- $sc->replies = $f['forum_replies'];
|
||||||
|
//-- $fVars->FORUMSUBFORUMS = '';
|
||||||
|
|
||||||
|
//-- $badgeReplies = ($f['forum_replies']) ? "badge-info" : "";
|
||||||
|
//-- $badgeThreads = ($f['forum_threads']) ? "badge-info" : "";
|
||||||
|
|
||||||
|
//-- $fVars->THREADSX = "<span class='badge {$badgeThreads}'>".$f['forum_threads']."</span>";
|
||||||
|
//-- $fVars->REPLIESX = "<span class='badge {$badgeReplies}'>".$f['forum_replies']."</span>";
|
||||||
|
|
||||||
|
|
||||||
|
//---- $subId = $f['forum_id'];
|
||||||
|
//---- if(!empty($forumList['subs']) && is_array($forumList['subs'][$subId]))
|
||||||
|
if(!empty($forumList['subs']) && is_array($forumList['subs'][$f['forum_id']]))
|
||||||
$badgeReplies = ($f['forum_replies']) ? "badge-info" : "";
|
|
||||||
$badgeThreads = ($f['forum_threads']) ? "badge-info" : "";
|
|
||||||
|
|
||||||
$fVars->THREADSX = "<span class='badge {$badgeThreads}'>".$f['forum_threads']."</span>";
|
|
||||||
$fVars->REPLIESX = "<span class='badge {$badgeReplies}'>".$f['forum_replies']."</span>";
|
|
||||||
|
|
||||||
|
|
||||||
$subId = $f['forum_id'];
|
|
||||||
if(!empty($forumList['subs']) && is_array($forumList['subs'][$subId]))
|
|
||||||
{
|
{
|
||||||
list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
|
//---- list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
|
||||||
|
$lastpost_datestamp = reset(explode('.', $f['forum_lastpost_info']));
|
||||||
$ret = parse_subs($forumList, $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'];
|
||||||
|
$f['forum_threads'] += $ret['threads'];
|
||||||
|
$f['forum_replies'] += $ret['replies'];
|
||||||
if(isset($ret['lastpost_info']))
|
if(isset($ret['lastpost_info']))
|
||||||
{
|
{
|
||||||
$f['forum_lastpost_info'] = $ret['lastpost_info'];
|
$f['forum_lastpost_info'] = $ret['lastpost_info'];
|
||||||
@@ -445,8 +488,11 @@ function parse_forum($f, $restricted_string = '')
|
|||||||
$f['forum_lastpost_user_anon'] = $ret['lastpost_user_anon'];
|
$f['forum_lastpost_user_anon'] = $ret['lastpost_user_anon'];
|
||||||
$f['user_name'] = $ret['user_name'];
|
$f['user_name'] = $ret['user_name'];
|
||||||
}
|
}
|
||||||
|
$f['text'] = $ret['text'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sc->setVars($f);
|
||||||
|
/*--
|
||||||
if ($f['forum_lastpost_info'])
|
if ($f['forum_lastpost_info'])
|
||||||
{
|
{
|
||||||
list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
|
list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
|
||||||
@@ -478,9 +524,10 @@ function parse_forum($f, $restricted_string = '')
|
|||||||
$fVars->LASTPOSTDATE = "-";
|
$fVars->LASTPOSTDATE = "-";
|
||||||
$fVars->LASTPOST = '-';
|
$fVars->LASTPOST = '-';
|
||||||
}
|
}
|
||||||
|
--*/
|
||||||
|
|
||||||
|
//-- return $tp->simpleParse($FORUM_MAIN_FORUM, $fVars);
|
||||||
return $tp->simpleParse($FORUM_MAIN_FORUM, $fVars);
|
return $tp->parseTemplate($FORUM_MAIN_FORUM, false, $sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -526,24 +573,23 @@ function parse_subs($forumList, $id ='', $lastpost_datestamp)
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (e_QUERY == 'track')
|
if (e_QUERY == 'track')
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (e_QUERY == 'new')
|
if (e_QUERY == 'new')
|
||||||
{
|
{
|
||||||
$nVars = new e_vars;
|
//-- $nVars = new e_vars;
|
||||||
$newThreadList = $forum->threadGetNew(10);
|
$newThreadList = $forum->threadGetNew(10);
|
||||||
foreach($newThreadList as $thread)
|
foreach($newThreadList as $thread)
|
||||||
{
|
{
|
||||||
$author_name = ($thread['user_name'] ? $thread['user_name'] : $thread['lastuser_anon']);
|
//-- $author_name = ($thread['user_name'] ? $thread['user_name'] : $thread['lastuser_anon']);
|
||||||
|
//---- $sc->author_name = ($thread['user_name'] ? $thread['user_name'] : $thread['lastuser_anon']);
|
||||||
|
|
||||||
$datestamp = $gen->convert_date($thread['thread_lastpost'], 'forum');
|
//-- $datestamp = $gen->convert_date($thread['thread_lastpost'], 'forum');
|
||||||
|
//---- $sc->datestamp = $gen->convert_date($thread['thread_lastpost'], 'forum');
|
||||||
|
/*--
|
||||||
if(!$thread['user_name'])
|
if(!$thread['user_name'])
|
||||||
{
|
{
|
||||||
$nVars->STARTERTITLE = $author_name.'<br />'.$datestamp;
|
$nVars->STARTERTITLE = $author_name.'<br />'.$datestamp;
|
||||||
@@ -552,19 +598,26 @@ if (e_QUERY == 'new')
|
|||||||
{
|
{
|
||||||
$nVars->STARTERTITLE = "<a href='".$e107->url->create('user/profile/view', array('id' => $thread['thread_lastuser'], 'name' => $author_name))."'>{$author_name}</a><br />".$datestamp;
|
$nVars->STARTERTITLE = "<a href='".$e107->url->create('user/profile/view', array('id' => $thread['thread_lastuser'], 'name' => $author_name))."'>{$author_name}</a><br />".$datestamp;
|
||||||
}
|
}
|
||||||
$nVars->NEWSPOSTNAME = "<a href='".$e107->url->create('forum/thread/last', $thread)."'>".$tp->toHTML($thread['thread_name'], TRUE, 'no_make_clickable, no_hook').'</a>';
|
|
||||||
|
|
||||||
$forum_newstring .= $tp->simpleParse($FORUM_NEWPOSTS_MAIN, $nVars);
|
$nVars->NEWSPOSTNAME = "<a href='".$e107->url->create('forum/thread/last', $thread)."'>".$tp->toHTML($thread['thread_name'], TRUE, 'no_make_clickable, no_hook').'</a>';
|
||||||
|
--*/
|
||||||
|
|
||||||
|
//-- $forum_newstring .= $tp->simpleParse($FORUM_NEWPOSTS_MAIN, $nVars);
|
||||||
|
$sc->setVars($thread);
|
||||||
|
$forum_newstring .= $tp->parseTemplate($FORUM_NEWPOSTS_MAIN, false, $sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($newThreadList))
|
if (empty($newThreadList))
|
||||||
{
|
{
|
||||||
$nVars->NEWSPOSTNAME = LAN_FORUM_0029;
|
//-- $nVars->NEWSPOSTNAME = LAN_FORUM_0029;
|
||||||
$forum_newstring = $tp->simpleParse($FORUM_NEWPOSTS_MAIN, $nVars);
|
//-- $forum_newstring = $tp->simpleParse($FORUM_NEWPOSTS_MAIN, $nVars);
|
||||||
|
$forum_newstring = $tp->parseTemplate($FORUM_NEWPOSTS_MAIN, false, $sc);
|
||||||
|
|
||||||
}
|
}
|
||||||
$forum_new_start = $tp->simpleParse($FORUM_NEWPOSTS_START, $nVars);
|
//-- $forum_new_start = $tp->simpleParse($FORUM_NEWPOSTS_START, $nVars);
|
||||||
$forum_new_end = $tp->simpleParse($FORUM_NEWPOSTS_END, $nVars);
|
//-- $forum_new_end = $tp->simpleParse($FORUM_NEWPOSTS_END, $nVars);
|
||||||
|
$forum_new_start = $tp->parseTemplate($FORUM_NEWPOSTS_START, false, $sc);
|
||||||
|
$forum_new_end = $tp->parseTemplate($FORUM_NEWPOSTS_END, false, $sc);
|
||||||
|
|
||||||
if ($forum->prefs->get('enclose'))
|
if ($forum->prefs->get('enclose'))
|
||||||
{
|
{
|
||||||
@@ -576,16 +629,18 @@ if (e_QUERY == 'new')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$frm = e107::getForm();
|
//$frm = e107::getForm();
|
||||||
|
|
||||||
$breadarray = array(
|
$breadarray = array(
|
||||||
array('text'=> $forum->prefs->get('title'), 'url' => e107::url('forum','index') )
|
array('text'=> $forum->prefs->get('title'), 'url' => e107::url('forum','index') )
|
||||||
);
|
);
|
||||||
|
|
||||||
$fVars->FORUM_BREADCRUMB = $frm->breadcrumb($breadarray);
|
//-- $fVars->FORUM_BREADCRUMB = $frm->breadcrumb($breadarray);
|
||||||
|
|
||||||
$forum_main_start = $tp->simpleParse($FORUM_MAIN_START, $fVars);
|
//-- $forum_main_start = $tp->simpleParse($FORUM_MAIN_START, $fVars);
|
||||||
$forum_main_end = $tp->simpleParse($FORUM_MAIN_END, $fVars);
|
$forum_main_start = $tp->parseTemplate($FORUM_MAIN_START, false, $sc);
|
||||||
|
//-- $forum_main_end = $tp->simpleParse($FORUM_MAIN_END, $fVars);
|
||||||
|
$forum_main_end = $tp->parseTemplate($FORUM_MAIN_END, false, $sc);
|
||||||
|
|
||||||
if ($forum->prefs->get('enclose'))
|
if ($forum->prefs->get('enclose'))
|
||||||
{
|
{
|
||||||
|
589
e107_plugins/forum/shortcodes/batch/forum_shortcodes.php
Normal file
589
e107_plugins/forum/shortcodes/batch/forum_shortcodes.php
Normal file
@@ -0,0 +1,589 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||||
|
*
|
||||||
|
* Forum plugin - view shortcodess
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
|
class forum_shortcodes extends e_shortcode
|
||||||
|
{
|
||||||
|
private $forum_rules;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->forum_rules = forum_rules('check');
|
||||||
|
}
|
||||||
|
|
||||||
|
// START OF $FVARS
|
||||||
|
function sc_forumtitle()
|
||||||
|
{
|
||||||
|
return e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
// LEGACY shortcodes, to be deprecated & directly handled in template file???
|
||||||
|
function sc_threadtitle()
|
||||||
|
{
|
||||||
|
return LAN_FORUM_0002;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_replytitle()
|
||||||
|
{
|
||||||
|
return LAN_FORUM_0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_lastpostitle()
|
||||||
|
{
|
||||||
|
return LAN_FORUM_0004;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_infotitle()
|
||||||
|
{
|
||||||
|
return LAN_FORUM_0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_newthreadtitle()
|
||||||
|
{
|
||||||
|
return LAN_FORUM_0075;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_postedtitle()
|
||||||
|
{
|
||||||
|
return LAN_FORUM_0074;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_tracktitle()
|
||||||
|
{
|
||||||
|
return LAN_FORUM_0073;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_statlink()
|
||||||
|
{
|
||||||
|
return "<a href='".e_PLUGIN."forum/forum_stats.php'>".LAN_FORUM_0017."</a>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_iconkey()
|
||||||
|
{
|
||||||
|
return "
|
||||||
|
<table class='table table-bordered' style='width:100%'>\n<tr>
|
||||||
|
<td style='width:2%'>".IMAGE_new_small."</td>
|
||||||
|
<td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0039."</span></td>
|
||||||
|
<td style='width:2%'>".IMAGE_nonew_small."</td>
|
||||||
|
<td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0040."</span></td>
|
||||||
|
<td style='width:2%'>".IMAGE_closed_small."</td>
|
||||||
|
<td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0041."</span></td>
|
||||||
|
</tr>\n</table>\n";
|
||||||
|
}
|
||||||
|
// End of LEGACY shortcodes...
|
||||||
|
|
||||||
|
function sc_logo()
|
||||||
|
{
|
||||||
|
return IMAGE_e;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_newimage()
|
||||||
|
{
|
||||||
|
return IMAGE_new_small;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_userinfo()
|
||||||
|
{
|
||||||
|
//---- Pass globals via $sc?????
|
||||||
|
global $forum, $pref;
|
||||||
|
|
||||||
|
$text = "<a href='".e_BASE."top.php?0.top.forum.10'>".LAN_FORUM_0010."</a> | <a href='".e_BASE."top.php?0.active'>".LAN_FORUM_0011."</a>";
|
||||||
|
if(USER)
|
||||||
|
{
|
||||||
|
$text .= " | <a href='".e_BASE.'userposts.php?0.forums.'.USERID."'>".LAN_FORUM_0012."</a> | <a href='".e_BASE."usersettings.php'>".LAN_FORUM_0013."</a> | <a href='".e_HTTP."user.php ?id.".USERID."'>".LAN_FORUM_0014."</a>";
|
||||||
|
// To be reworked to get the $forum var
|
||||||
|
if($forum->prefs->get('attach') && (check_class($pref['upload_class']) || getperms('0')))
|
||||||
|
{
|
||||||
|
$text .= " | <a href='".e_PLUGIN."forum/forum_uploads.php'>".LAN_FORUM_0015."</a>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!empty($this->forum_rules))
|
||||||
|
{
|
||||||
|
$text .= " | <a href='".e107::url('forum','rules')."'>".LAN_FORUM_0016.'</a>';
|
||||||
|
}
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sc_userinfox()
|
||||||
|
{
|
||||||
|
global $forum;
|
||||||
|
|
||||||
|
$uInfo = array();
|
||||||
|
$uInfo[0] = "<a href='".e107::url('forum','stats')."'>".LAN_FORUM_6013.'</a>';
|
||||||
|
|
||||||
|
if(!empty($this->forum_rules))
|
||||||
|
{
|
||||||
|
$uInfo[1] = "<a href='".e107::url('forum','rules')."'>".LAN_FORUM_0016.'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// To be reworked to get the $forum var
|
||||||
|
$trackPref = $forum->prefs->get('track');
|
||||||
|
if(!empty($trackPref))
|
||||||
|
{
|
||||||
|
$uInfo[2] = "<a href='".e107::url('forum','track')."'>".LAN_FORUM_0030."</a>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode(" | ",$uInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_userlist()
|
||||||
|
{
|
||||||
|
if(!defined('e_TRACKING_DISABLED'))
|
||||||
|
{
|
||||||
|
// String candidate for USERLIST wrapper
|
||||||
|
$text = LAN_FORUM_0036.": ";
|
||||||
|
|
||||||
|
global $listuserson;
|
||||||
|
$c = 0;
|
||||||
|
if(is_array($listuserson))
|
||||||
|
{
|
||||||
|
//---- foreach($listuserson as $uinfo => $pinfo)
|
||||||
|
foreach(array_keys($listuserson) as $uinfo)
|
||||||
|
// foreach($listuserson as $uinfo => &$pinfo)
|
||||||
|
{
|
||||||
|
list($oid, $oname) = explode(".", $uinfo, 2);
|
||||||
|
$c ++;
|
||||||
|
$text .= "<a href='".e_HTTP."user.php ?id.$oid'>$oname</a>".($c == MEMBERS_ONLINE ? "." :", ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// String candidate for USERLIST wrapper
|
||||||
|
$text .= "<br /><a rel='external' href='".e_BASE."online.php'>".LAN_FORUM_0037."</a> ".LAN_FORUM_0038;
|
||||||
|
}
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_search()
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!$srchIcon = e107::getParser()->toGlyph('fa-search'))
|
||||||
|
{
|
||||||
|
$srchIcon = LAN_SEARCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
// String candidate for USERLIST wrapper
|
||||||
|
return "
|
||||||
|
<form method='get' class='form-inline input-append' action='".e_BASE."search.php'>
|
||||||
|
<div class='input-group'>
|
||||||
|
<input class='tbox form-control' type='text' name='q' size='20' value='' maxlength='50' />
|
||||||
|
<span class='input-group-btn'>
|
||||||
|
<button class='btn btn-default button' type='submit' name='s' value='search' />".$srchIcon."</button>
|
||||||
|
</span>
|
||||||
|
<input type='hidden' name='r' value='0' />
|
||||||
|
<input type='hidden' name='t' value='forum' />
|
||||||
|
<input type='hidden' name='forum' value='all' />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_perms()
|
||||||
|
{
|
||||||
|
return (USER == TRUE || ANON == TRUE ? LAN_FORUM_0043." - ".LAN_FORUM_0045." - ".LAN_FORUM_0047 : LAN_FORUM_0044." - ".LAN_FORUM_0046." - ".LAN_FORUM_0048);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_info()
|
||||||
|
{
|
||||||
|
//$fVars->INFO = "";
|
||||||
|
// global $forum;
|
||||||
|
//$sql = e107::getDb();
|
||||||
|
//$gen = new convert;
|
||||||
|
if (ANON == TRUE)
|
||||||
|
{
|
||||||
|
$text = LAN_FORUM_0049.'<br />'.LAN_FORUM_0050." <a href='".e_SIGNUP."'>".LAN_FORUM_0051."</a> ".LAN_FORUM_0052;
|
||||||
|
}
|
||||||
|
elseif(USER == FALSE)
|
||||||
|
{
|
||||||
|
$text = LAN_FORUM_0049.'<br />'.LAN_FORUM_0053." <a href='".e_SIGNUP."'>".LAN_FORUM_0054."</a> ".LAN_FORUM_0055;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (USER == TRUE)
|
||||||
|
{
|
||||||
|
$total_new_threads = e107::getDb()->count('forum_thread', '(*)', "WHERE thread_datestamp>'".USERLV."' ");
|
||||||
|
$total_read_threads = 0;
|
||||||
|
if (USERVIEWED != "")
|
||||||
|
{
|
||||||
|
$tmp = explode(".", USERVIEWED); // List of numbers, separated by single period
|
||||||
|
$total_read_threads = count($tmp);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$total_read_threads = 0;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
$gen = new convert;
|
||||||
|
$text = LAN_FORUM_0018." ".USERNAME."<br />";
|
||||||
|
$lastvisit_datestamp = $gen->convert_date(USERLV, 'long');
|
||||||
|
$datestamp = $gen->convert_date(time(), "long");
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (!$total_new_threads)
|
||||||
|
{
|
||||||
|
$text .= LAN_FORUM_0019." ";
|
||||||
|
}
|
||||||
|
elseif($total_new_threads == 1)
|
||||||
|
{
|
||||||
|
$text .= LAN_FORUM_0020;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$text .= LAN_FORUM_0021." ".$total_new_threads." ".LAN_FORUM_0022." ";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
$text .= (!$total_new_threads?LAN_FORUM_0019." ":($total_new_threads == 1?LAN_FORUM_0020:LAN_FORUM_0021." ".$total_new_threads." ".LAN_FORUM_0022." ")).LAN_FORUM_0023;
|
||||||
|
// $text .= LAN_FORUM_0023;
|
||||||
|
// if ($total_new_threads == $total_read_threads && $total_new_threads != 0 && $total_read_threads >= $total_new_threads)
|
||||||
|
if ($total_new_threads != 0 && $total_read_threads >= $total_new_threads)
|
||||||
|
{
|
||||||
|
$text .= LAN_FORUM_0029;
|
||||||
|
$allread = TRUE;
|
||||||
|
}
|
||||||
|
elseif($total_read_threads != 0)
|
||||||
|
{
|
||||||
|
$text .= " (".LAN_FORUM_0027." ".$total_read_threads." ".LAN_FORUM_0028.")";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "<br />
|
||||||
|
".LAN_FORUM_0024." ".$lastvisit_datestamp."<br />
|
||||||
|
".LAN_FORUM_0025." ".$datestamp;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$text .= '';
|
||||||
|
if (ANON == TRUE)
|
||||||
|
{
|
||||||
|
$text .= LAN_FORUM_0049.'<br />'.LAN_FORUM_0050." <a href='".e_SIGNUP."'>".LAN_FORUM_0051."</a> ".LAN_FORUM_0052;
|
||||||
|
}
|
||||||
|
elseif(USER == FALSE)
|
||||||
|
{
|
||||||
|
$text .= LAN_FORUM_0049.'<br />'.LAN_FORUM_0053." <a href='".e_SIGNUP."'>".LAN_FORUM_0054."</a> ".LAN_FORUM_0055;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
//if (USER && vartrue($allread) != TRUE && $total_new_threads && $total_new_threads >= $total_read_threads)
|
||||||
|
if (USER && !$allread && $total_new_threads && $total_new_threads >= $total_read_threads)
|
||||||
|
{
|
||||||
|
$text .= "<br /><a href='".e_SELF."?mark.all.as.read'>".LAN_FORUM_0057.'</a>'.(e_QUERY != 'new' ? ", <a href='".e_SELF."?new'>".LAN_FORUM_0058."</a>" : '');
|
||||||
|
}
|
||||||
|
|
||||||
|
$forum = new e107forum;
|
||||||
|
//$trackPref = $forum->prefs->get('track');
|
||||||
|
//if (USER && vartrue($trackPref) && e_QUERY != 'track')
|
||||||
|
if (USER && vartrue($forum->prefs->get('track')) && e_QUERY != 'track')
|
||||||
|
{
|
||||||
|
$text .= "<br /><a href='".e107::url('forum','track')."'>".LAN_FORUM_0030.'</a>';
|
||||||
|
}
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_foruminfo()
|
||||||
|
{
|
||||||
|
$sql = e107::getDb();
|
||||||
|
|
||||||
|
$total_topics = $sql->count("forum_thread", "(*)");
|
||||||
|
$total_replies = $sql->count("forum_post", "(*)");
|
||||||
|
$total_members = $sql->count("user");
|
||||||
|
//----$newest_member = $sql->select("user", "*", "user_ban='0' ORDER BY user_join DESC LIMIT 0,1");
|
||||||
|
list($nuser_id, $nuser_name) = $sql->fetch('num'); // FIXME $nuser_id & $user_name return empty even though print_a($newest_member); returns proper result.
|
||||||
|
|
||||||
|
if(!defined('e_TRACKING_DISABLED'))
|
||||||
|
{
|
||||||
|
$member_users = $sql->select("online", "*", "online_location REGEXP('forum.php') AND online_user_id!='0' ");
|
||||||
|
$guest_users = $sql->select("online", "*", "online_location REGEXP('forum.php') AND online_user_id='0' ");
|
||||||
|
$users = $member_users+$guest_users;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_topics ".($total_topics == 1 ? LAN_FORUM_0032 : LAN_FORUM_0033).", $total_replies ".($total_replies == 1 ? LAN_FORUM_0034 : LAN_FORUM_0035).")
|
||||||
|
".(!defined("e_TRACKING_DISABLED") ? "" : "<br />".$users." ".($users == 1 ? LAN_FORUM_0059 : LAN_FORUM_0060)." (".$member_users." ".($member_users == 1 ? LAN_FORUM_0061 : LAN_FORUM_0062).", ".$guest_users." ".($guest_users == 1 ? LAN_FORUM_0063 : LAN_FORUM_0064).")<br />".LAN_FORUM_0066." ".$total_members."<br />".LAN_FORUM_0065." <a href='".e_HTTP."user.php ?id.".$nuser_id."'>".$nuser_name."</a>.\n"); // FIXME cannot find other references to e_TRACKING_DISABLED, use pref?
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function sc_parentstatus()
|
||||||
|
{
|
||||||
|
//---- return $this->parentstatus;
|
||||||
|
// if(!check_class($this->fparent['forum_postclass']))
|
||||||
|
if(!check_class($this->var['forum_postclass']))
|
||||||
|
{
|
||||||
|
$status = '('.LAN_FORUM_0056.')';
|
||||||
|
}
|
||||||
|
return vartrue($status);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_parentname()
|
||||||
|
{
|
||||||
|
return $this->var['forum_name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to show the retrieval of parent ID, not really needed by core template
|
||||||
|
function sc_parentid()
|
||||||
|
{
|
||||||
|
return $this->var['forum_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// START OF parse_forum function $FVARS
|
||||||
|
|
||||||
|
function sc_newflag()
|
||||||
|
{
|
||||||
|
global $newflag_list;
|
||||||
|
|
||||||
|
|
||||||
|
if(USER && is_array($newflag_list) && in_array($this->var['forum_id'], $newflag_list))
|
||||||
|
{
|
||||||
|
|
||||||
|
return "<a href='".e107::getInstance()->url->create('forum/forum/mfar', $this->var)."'>".IMAGE_new.'</a>';
|
||||||
|
}
|
||||||
|
elseif(empty($this->var['forum_replies']) && defined('IMAGE_noreplies'))
|
||||||
|
{
|
||||||
|
return IMAGE_noreplies;
|
||||||
|
}
|
||||||
|
|
||||||
|
return IMAGE_nonew;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_forumname()
|
||||||
|
{
|
||||||
|
// global $f;
|
||||||
|
// $tp = e107::getParser();
|
||||||
|
if(substr($this->var['forum_name'], 0, 1) == '*')
|
||||||
|
{
|
||||||
|
$this->var['forum_name'] = substr($this->var['forum_name'], 1);
|
||||||
|
}
|
||||||
|
$this->var['forum_name'] = e107::getParser()->toHTML($this->var['forum_name'], true, 'no_hook');
|
||||||
|
|
||||||
|
$url = e107::url('forum', 'forum', $this->var);
|
||||||
|
return "<a href='".$url."'>{$this->var['forum_name']}</a>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_forumdescription()
|
||||||
|
{
|
||||||
|
// global $f, $restricted_string;
|
||||||
|
global $restricted_string;
|
||||||
|
// $tp = e107::getParser();
|
||||||
|
$this->var['forum_description'] = e107::getParser()->toHTML($this->var['forum_description'], true, 'no_hook');
|
||||||
|
return $this->var['forum_description'].($restricted_string ? "<br /><span class='smalltext'><i>$restricted_string</i></span>" : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_threads()
|
||||||
|
{
|
||||||
|
return $this->var['forum_threads'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_replies()
|
||||||
|
{
|
||||||
|
return $this->var['forum_replies'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_threadsx()
|
||||||
|
{
|
||||||
|
// global $f;
|
||||||
|
// return "<span class='badge ".(($f['forum_threads']) ? "badge-info" : "")."'>".$f['forum_threads']."</span>";
|
||||||
|
return "<span class='badge ".(($this->var['forum_threads']) ? "badge-info" : "")."'>".$this->var['forum_threads']."</span>";
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_repliesx()
|
||||||
|
{
|
||||||
|
// global $f;
|
||||||
|
// return "<span class='badge ".(($f['forum_replies']) ? "badge-info" : "")."'>".$f['forum_replies']."</span>";
|
||||||
|
return "<span class='badge ".(($this->var['forum_replies']) ? "badge-info" : "")."'>".$this->var['forum_replies']."</span>";
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_forumsubforums()
|
||||||
|
{
|
||||||
|
// VAR_DUMP ($this->ret);
|
||||||
|
// return ($this->ret)?"<br /><div class='smalltext'>".LAN_FORUM_0069.": {$this->ret['text']}</div>":"";
|
||||||
|
return ($this->var['text'])?"<br /><div class='smalltext'>".LAN_FORUM_0069.": {$this->var['text']}</div>":"";
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_lastpostuser()
|
||||||
|
{
|
||||||
|
// global $f;
|
||||||
|
// $e107 = e107::getInstance();
|
||||||
|
// $tp = e107::getParser();
|
||||||
|
|
||||||
|
// if ($f['forum_lastpost_info'])
|
||||||
|
if ($this->var['forum_lastpost_info'])
|
||||||
|
{
|
||||||
|
// list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
|
||||||
|
// $lastpost_name = $tp->toHTML($f['forum_lastpost_user_anon']);
|
||||||
|
|
||||||
|
// if ($f['user_name'])
|
||||||
|
$lastpost_name = e107::getParser()->toHTML($this->var['forum_lastpost_user_anon']);
|
||||||
|
|
||||||
|
if ($this->var['user_name'])
|
||||||
|
{
|
||||||
|
|
||||||
|
// $lastpost_name = "<a href='".$e107->url->create('user/profile/view', array('name' => $f['user_name'], 'id' => $f['forum_lastpost_user']))."'>{$f['user_name']}</a>";
|
||||||
|
$lastpost_name = "<a href='".e107::getUrl()->create('user/profile/view', array('name' => $this->var['user_name'], 'id' => $this->var['forum_lastpost_user']))."'>{$this->var['user_name']}</a>";
|
||||||
|
}
|
||||||
|
//---- else
|
||||||
|
//---- {
|
||||||
|
//---- $lastpost_name = $tp->toHTML($f['forum_lastpost_user_anon']);
|
||||||
|
//---- }
|
||||||
|
|
||||||
|
// $lastpost = $forum->threadGetLastpost($lastpost_thread); //XXX TODO inefficient to have SQL query here.
|
||||||
|
|
||||||
|
return $lastpost_name;
|
||||||
|
// {forum_sef}/{thread_id}-{thread_sef}
|
||||||
|
|
||||||
|
// $urlData = array('forum_sef'=>$f['forum_sef'], 'thread_id'=>$lastpost['post_thread'],'thread_sef'=>$lastpost['thread_sef']);
|
||||||
|
// $url = e107::url('forum', 'topic', $urlData)."?last=1#post-".$lastpost['post_id'];
|
||||||
|
// $fVars->LASTPOSTDATE .= "<a href='".$url."'>". $gen->computeLapse($lastpost_datestamp, time(), false, false, 'short')."</a>";
|
||||||
|
// $lastpost_datestamp = $gen->convert_date($lastpost_datestamp, 'forum');
|
||||||
|
// $fVars->LASTPOST = $lastpost_datestamp.'<br />'.$lastpost_name." <a href='".$e107->url->create('forum/thread/last', array('name' => $lastpost_name, 'id' => $lastpost_thread))."'>".IMAGE_post2.'</a>';
|
||||||
|
|
||||||
|
}
|
||||||
|
//---- else
|
||||||
|
//---- {
|
||||||
|
return "";
|
||||||
|
// $fVars->LASTPOSTDATE = "-";
|
||||||
|
// $fVars->LASTPOST = '-';
|
||||||
|
//---- }
|
||||||
|
}
|
||||||
|
function sc_lastpostdate()
|
||||||
|
{
|
||||||
|
// global $f, $forum;
|
||||||
|
global $forum;
|
||||||
|
// $e107 = e107::getInstance();
|
||||||
|
// $tp = e107::getParser();
|
||||||
|
$gen = new convert;
|
||||||
|
|
||||||
|
// if ($f['forum_lastpost_info'])
|
||||||
|
if ($this->var['forum_lastpost_info'])
|
||||||
|
{
|
||||||
|
// list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
|
||||||
|
list($lastpost_datestamp, $lastpost_thread) = explode('.', $this->var['forum_lastpost_info']);
|
||||||
|
// if ($f['user_name'])
|
||||||
|
// {
|
||||||
|
|
||||||
|
// $lastpost_name = "<a href='".$e107->url->create('user/profile/view', array('name' => $f['user_name'], 'id' => $f['forum_lastpost_user']))."'>{$f['user_name']}</a>";
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// $lastpost_name = $tp->toHTML($f['forum_lastpost_user_anon']);
|
||||||
|
// }
|
||||||
|
|
||||||
|
$lastpost = $forum->threadGetLastpost($lastpost_thread); //XXX TODO inefficient to have SQL query here.
|
||||||
|
|
||||||
|
// $fVars->LASTPOSTUSER = $lastpost_name;
|
||||||
|
// {forum_sef}/{thread_id}-{thread_sef}
|
||||||
|
|
||||||
|
// $urlData = array('forum_sef'=>$f['forum_sef'], 'thread_id'=>$lastpost['post_thread'],'thread_sef'=>$lastpost['thread_sef']);
|
||||||
|
$urlData = array('forum_sef'=>$this->var['forum_sef'], 'thread_id'=>$lastpost['post_thread'],'thread_sef'=>$lastpost['thread_sef']);
|
||||||
|
$url = e107::url('forum', 'topic', $urlData)."?last=1#post-".$lastpost['post_id'];
|
||||||
|
return "<a href='".$url."'>". $gen->computeLapse($lastpost_datestamp, time(), false, false, 'short')."</a>";
|
||||||
|
// $lastpost_datestamp = $gen->convert_date($lastpost_datestamp, 'forum');
|
||||||
|
// $fVars->LASTPOST = $lastpost_datestamp.'<br />'.$lastpost_name." <a href='".$e107->url->create('forum/thread/last', array('name' => $lastpost_name, 'id' => $lastpost_thread))."'>".IMAGE_post2.'</a>';
|
||||||
|
|
||||||
|
}
|
||||||
|
//---- else
|
||||||
|
//---- {
|
||||||
|
// $fVars->LASTPOSTUSER = "";
|
||||||
|
return "-";
|
||||||
|
// $fVars->LASTPOST = '-';
|
||||||
|
//---- }
|
||||||
|
}
|
||||||
|
function sc_lastpost()
|
||||||
|
{
|
||||||
|
|
||||||
|
$e107 = e107::getInstance();
|
||||||
|
$gen = new convert;
|
||||||
|
|
||||||
|
// if ($f['forum_lastpost_info'])
|
||||||
|
if ($this->var['forum_lastpost_info'])
|
||||||
|
{
|
||||||
|
// list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
|
||||||
|
list($lastpost_datestamp, $lastpost_thread) = explode('.', $this->var['forum_lastpost_info']);
|
||||||
|
// $lastpost_name = $tp->toHTML($f['forum_lastpost_user_anon']);
|
||||||
|
// $lastpost_name = e107::getParser()->toHTML($f['forum_lastpost_user_anon']);
|
||||||
|
// if ($f['user_name'])
|
||||||
|
$lastpost_name = e107::getParser()->toHTML($this->var['forum_lastpost_user_anon']);
|
||||||
|
|
||||||
|
if ($this->var['user_name'])
|
||||||
|
{
|
||||||
|
// $lastpost_name = "<a href='".$e107->url->create('user/profile/view', array('name' => $f['user_name'], 'id' => $f['forum_lastpost_user']))."'>{$f['user_name']}</a>";
|
||||||
|
$lastpost_name = "<a href='".e107::getUrl()->create('user/profile/view', array('name' => $this->var['user_name'], 'id' => $this->var['forum_lastpost_user']))."'>{$this->var['user_name']}</a>";
|
||||||
|
}
|
||||||
|
//---- else
|
||||||
|
//---- {
|
||||||
|
//---- $lastpost_name = $tp->toHTML($f['forum_lastpost_user_anon']);
|
||||||
|
//---- }
|
||||||
|
|
||||||
|
// $lastpost = $forum->threadGetLastpost($lastpost_thread); //XXX TODO inefficient to have SQL query here.
|
||||||
|
|
||||||
|
// $fVars->LASTPOSTUSER = $lastpost_name;
|
||||||
|
// {forum_sef}/{thread_id}-{thread_sef}
|
||||||
|
|
||||||
|
// $urlData = array('forum_sef'=>$f['forum_sef'], 'thread_id'=>$lastpost['post_thread'],'thread_sef'=>$lastpost['thread_sef']);
|
||||||
|
// $url = e107::url('forum', 'topic', $urlData)."?last=1#post-".$lastpost['post_id'];
|
||||||
|
// $fVars->LASTPOSTDATE .= "<a href='".$url."'>". $gen->computeLapse($lastpost_datestamp, time(), false, false, 'short')."</a>";
|
||||||
|
$lastpost_datestamp = $gen->convert_date($lastpost_datestamp, 'forum');
|
||||||
|
return $lastpost_datestamp.'<br />'.$lastpost_name." <a href='".$e107->url->create('forum/thread/last', array('name' => $lastpost_name, 'id' => $lastpost_thread))."'>".IMAGE_post2.'</a>';
|
||||||
|
|
||||||
|
}
|
||||||
|
//---- else
|
||||||
|
//---- {
|
||||||
|
// $fVars->LASTPOSTUSER = "";
|
||||||
|
// $fVars->LASTPOSTDATE = "-";
|
||||||
|
return '-';
|
||||||
|
//---- }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sc_startertitle()
|
||||||
|
{
|
||||||
|
// global $thread;
|
||||||
|
$gen = new convert;
|
||||||
|
|
||||||
|
$author_name = ($this->var['user_name'] ? $this->var['user_name'] : $this->var['lastuser_anon']);
|
||||||
|
|
||||||
|
//-- $datestamp = $gen->convert_date($thread['thread_lastpost'], 'forum');
|
||||||
|
$datestamp = $gen->convert_date($this->var['thread_lastpost'], 'forum');
|
||||||
|
|
||||||
|
|
||||||
|
if(!$this->var['user_name'])
|
||||||
|
{
|
||||||
|
return $author_name.'<br />'.$datestamp;
|
||||||
|
}
|
||||||
|
//---- else
|
||||||
|
//---- {
|
||||||
|
// $e107 = e107::getInstance();
|
||||||
|
// return "<a href='".$e107->url->create('user/profile/view', array('id' => $thread['thread_lastuser'], 'name' => $sc->author_name))."'>{$sc->author_name}</a><br />".$sc->datestamp;
|
||||||
|
return "<a href='".e107::getUrl()->create('user/profile/view', array('id' => $this->var['thread_lastuser'], 'name' => $author_name))."'>{$author_name}</a><br />".$datestamp;
|
||||||
|
//---- }
|
||||||
|
}
|
||||||
|
|
||||||
|
function sc_newspostname()
|
||||||
|
{
|
||||||
|
// global $thread;
|
||||||
|
// $e107 = e107::getInstance();
|
||||||
|
// $tp = e107::getParser();
|
||||||
|
|
||||||
|
// return empty($thread)?LAN_FORUM_0029:"<a href='".$e107->url->create('forum/thread/last', $thread)."'>".$tp->toHTML($thread['thread_name'], TRUE, 'no_make_clickable, no_hook').'</a>';
|
||||||
|
// Only $this->var???'
|
||||||
|
return empty($this->var)?LAN_FORUM_0029:"<a href='".e107::getUrl()->create('forum/thread/last', $this->var)."'>".e107::getParser()->toHTML($this->var['thread_name'], TRUE, 'no_make_clickable, no_hook').'</a>';
|
||||||
|
}
|
||||||
|
// END OF $NVARS
|
||||||
|
|
||||||
|
|
||||||
|
function sc_forum_breadcrumb()
|
||||||
|
{
|
||||||
|
global $breadarray;
|
||||||
|
$frm = e107::getForm();
|
||||||
|
return $frm->breadcrumb($breadarray);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -7,12 +7,16 @@
|
|||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
|
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
|
||||||
|
|
||||||
if (!isset($FORUM_MAIN_START))
|
if (!isset($FORUM_MAIN_START))
|
||||||
{
|
{
|
||||||
|
// How it should be??? (LAN Shortcodes replaced by their outputed LANS...)
|
||||||
|
/*
|
||||||
|
$FORUM_MAIN_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<th colspan='2' style='width:60%; text-align:center' class='fcaption'>{FORUMTITLE}</th>\n<th style='width:10%; text-align:center' class='fcaption'>".LAN_FORUM_0002."</th>\n<th style='width:10%; text-align:center' class='fcaption'>".LAN_FORUM_0003."</th>\n<th style='width:20%; text-align:center' class='fcaption'>".LAN_FORUM_0004."</th>\n</tr>";
|
||||||
|
*/
|
||||||
|
// LEGACY definition with LAN Shortcodes ({THREADTITLE}, {REPLYTITLE}, {LASTPOSTITLE}).....
|
||||||
$FORUM_MAIN_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<th colspan='2' style='width:60%; text-align:center' class='fcaption'>{FORUMTITLE}</th>\n<th style='width:10%; text-align:center' class='fcaption'>{THREADTITLE}</th>\n<th style='width:10%; text-align:center' class='fcaption'>{REPLYTITLE}</th>\n<th style='width:20%; text-align:center' class='fcaption'>{LASTPOSTITLE}</th>\n</tr>";
|
$FORUM_MAIN_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<th colspan='2' style='width:60%; text-align:center' class='fcaption'>{FORUMTITLE}</th>\n<th style='width:10%; text-align:center' class='fcaption'>{THREADTITLE}</th>\n<th style='width:10%; text-align:center' class='fcaption'>{REPLYTITLE}</th>\n<th style='width:20%; text-align:center' class='fcaption'>{LASTPOSTITLE}</th>\n</tr>";
|
||||||
}
|
}
|
||||||
if (!isset($FORUM_MAIN_PARENT))
|
if (!isset($FORUM_MAIN_PARENT))
|
||||||
@@ -25,11 +29,21 @@ if (!isset($FORUM_MAIN_FORUM))
|
|||||||
}
|
}
|
||||||
if (!isset($FORUM_MAIN_END))
|
if (!isset($FORUM_MAIN_END))
|
||||||
{
|
{
|
||||||
$FORUM_MAIN_END = "</table></div>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td colspan='2' style='width:60%' class='fcaption'>{INFOTITLE}</td>\n</tr>\n<tr>\n<td rowspan='4' style='width:5%; text-align:center' class='forumheader3'>{LOGO}</td>\n<td style='width:auto' class='forumheader3'>{USERINFO}</td>\n</tr>\n<tr>\n<td style='width:95%' class='forumheader3'>{INFO}</td>\n</tr><tr>\n<td style='width:95%' class='forumheader3'>{FORUMINFO}</td>\n</tr>\n<tr>\n<td style='width:95%' class='forumheader3'>{USERLIST}<br />{STATLINK}</td>\n</tr>\n</table>\n</div>\n<div class='spacer'>\n<table class='fborder table' style='".USER_WIDTH."'>\n<tr>\n<td class='forumheader3' style='text-align:center; width:33%'>{ICONKEY}</td>\n<td style='text-align:center; width:33%' class='forumheader3'>{SEARCH}</td>\n<td style='width:33%; text-align:center; vertical-align:middle' class='forumheader3'><span class='smallblacktext'>{PERMS}</span>\n</td>\n</tr>\n</table>\n</div>\n</div>";
|
// How it should be??? (LAN Shortcodes replaced by their outputed LANS...)
|
||||||
|
/*
|
||||||
|
$FORUM_MAIN_END = "</table></div>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td colspan='2' style='width:60%' class='fcaption'>".LAN_FORUM_0009."</td>\n</tr>\n<tr>\n<td rowspan='4' style='width:5%; text-align:center' class='forumheader3'>{LOGO}</td>\n<td style='width:auto' class='forumheader3'>{USERINFO}</td>\n</tr>\n<tr>\n<td style='width:95%' class='forumheader3'>{INFO}</td>\n</tr><tr>\n<td style='width:95%' class='forumheader3'>{FORUMINFO}</td>\n</tr>\n<tr>\n<td style='width:95%' class='forumheader3'>{USERLIST}<br />{STATLINK}</td>\n</tr>\n</table>\n</div>\n<div class='spacer'>\n<table class='fborder table' style='".USER_WIDTH."'>\n<tr>\n<td class='forumheader3' style='text-align:center; width:33%'>{ICONKEY}</td>\n<td style='text-align:center; width:33%' class='forumheader3'>{SEARCH}</td>\n<td style='width:33%; text-align:center; vertical-align:middle' class='forumheader3'><span class='smallblacktext'>{PERMS}</span>\n</td>\n</tr>\n</table>\n</div>\n</div>";
|
||||||
|
*/
|
||||||
|
// LEGACY definition with LAN Shortcodes ({INFOTITLE}).....
|
||||||
|
$FORUM_MAIN_END = "</table></div>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td colspan='2' style='width:60%' class='fcaption'>{INFOTITLE}</td>\n</tr>\n<tr>\n<td rowspan='4' style='width:5%; text-align:center' class='forumheader3'>{LOGO}</td>\n<td style='width:auto' class='forumheader3'>{USERINFO}</td>\n</tr>\n<tr>\n<td style='width:95%' class='forumheader3'>{INFO}</td>\n</tr><tr>\n<td style='width:95%' class='forumheader3'>{FORUMINFO}</td>\n</tr>\n<tr>\n<td style='width:95%' class='forumheader3'>{USERLIST}<br />{STATLINK}</td>\n</tr>\n</table>\n</div>\n<div class='spacer'>\n<table class='fborder table' style='".USER_WIDTH."'>\n<tr>\n<td class='forumheader3' style='text-align:center; width:33%'>{ICONKEY}</td>\n<td style='text-align:center; width:33%' class='forumheader3'>{SEARCH}</td>\n<td style='width:33%; text-align:center; vertical-align:middle' class='forumheader3'><span class='smallblacktext'>{PERMS}</span>\n</td>\n</tr>\n</table>\n</div>\n</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($FORUM_NEWPOSTS_START))
|
if (!isset($FORUM_NEWPOSTS_START))
|
||||||
{
|
{
|
||||||
|
// How it should be??? (LAN Shortcodes replaced by their outputed LANS...)
|
||||||
|
/*
|
||||||
|
$FORUM_NEWPOSTS_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td style='width:3%' class='fcaption'> </td>\n<td style='width:60%' class='fcaption'>".LAN_FORUM_0075."</td>\n<td style='width:27%; text-align:center' class='fcaption'>".LAN_FORUM_0074."</td>\n</tr>";
|
||||||
|
*/
|
||||||
|
// LEGACY definition with LAN Shortcodes ({NEWTHREADTITLE}, {POSTEDTITLE}).....
|
||||||
$FORUM_NEWPOSTS_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td style='width:3%' class='fcaption'> </td>\n<td style='width:60%' class='fcaption'>{NEWTHREADTITLE}</td>\n<td style='width:27%; text-align:center' class='fcaption'>{POSTEDTITLE}</td>\n</tr>";
|
$FORUM_NEWPOSTS_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td style='width:3%' class='fcaption'> </td>\n<td style='width:60%' class='fcaption'>{NEWTHREADTITLE}</td>\n<td style='width:27%; text-align:center' class='fcaption'>{POSTEDTITLE}</td>\n</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +59,12 @@ if (!isset($FORUM_NEWPOSTS_END))
|
|||||||
|
|
||||||
if (!isset($FORUM_TRACK_START))
|
if (!isset($FORUM_TRACK_START))
|
||||||
{
|
{
|
||||||
$FORUM_TRACK_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td colspan='3' style='width:60%' class='fcaption'>{TRACKTITLE}</td>\n</tr>\n";
|
// How it should be??? (LAN Shortcodes replaced by their outputed LANS...)
|
||||||
|
/*
|
||||||
|
$FORUM_TRACK_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td colspan='3' style='width:60%' class='fcaption'>".LAN_FORUM_0073."</td>\n</tr>\n";
|
||||||
|
*/
|
||||||
|
// LEGACY definition with LAN Shortcodes ({TRACKTITLE}).....
|
||||||
|
$FORUM_TRACK_START = "<div style='text-align:center'>\n<div class='spacer'>\n<table style='".USER_WIDTH."' class='fborder table'>\n<tr>\n<td colspan='3' style='width:60%' class='fcaption'>{TRACKTITLE}</td>\n</tr>\n";
|
||||||
|
|
||||||
if (!isset($FORUM_TRACK_MAIN))
|
if (!isset($FORUM_TRACK_MAIN))
|
||||||
{
|
{
|
||||||
@@ -166,16 +185,4 @@ $FORUM_TEMPLATE['main-end'] .= "
|
|||||||
<tr>\n<td style='width:95%' class='forumheader3'>{USERLIST}<br />{STATLINK}</td>\n</tr>\n</table>
|
<tr>\n<td style='width:95%' class='forumheader3'>{USERLIST}<br />{STATLINK}</td>\n</tr>\n</table>
|
||||||
";
|
";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
@@ -35,7 +35,7 @@ $NEWS_TEMPLATE['list']['item'] = '
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="span9 col-md-9">
|
<div class="span9 col-md-9">
|
||||||
<h3 class="media-heading">{NEWSTITLELINK}</h3>
|
<h3 class="media-heading">{NEWS_TITLE: link=1}</h3>
|
||||||
<p>
|
<p>
|
||||||
{NEWS_SUMMARY}
|
{NEWS_SUMMARY}
|
||||||
</p>
|
</p>
|
||||||
@@ -85,7 +85,7 @@ $NEWS_WRAPPER['default']['item']['NEWSIMAGE: item=1'] = '<span class="news-image
|
|||||||
$NEWS_TEMPLATE['default']['item'] = '
|
$NEWS_TEMPLATE['default']['item'] = '
|
||||||
{SETIMAGE: w=400&h=400}
|
{SETIMAGE: w=400&h=400}
|
||||||
<div class="default-item">
|
<div class="default-item">
|
||||||
<h2 class="news-title">{NEWSTITLELINK}</h2>
|
<h2 class="news-title">{NEWS_TITLE: link=1}</h2>
|
||||||
|
|
||||||
<hr class="news-heading-sep">
|
<hr class="news-heading-sep">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -95,11 +95,10 @@ $NEWS_TEMPLATE['default']['item'] = '
|
|||||||
<hr>
|
<hr>
|
||||||
{NEWSIMAGE: item=1}
|
{NEWSIMAGE: item=1}
|
||||||
|
|
||||||
|
|
||||||
<p class="lead">{NEWS_SUMMARY}</p>
|
<p class="lead">{NEWS_SUMMARY}</p>
|
||||||
{NEWSVIDEO: item=1}
|
{NEWSVIDEO: item=1}
|
||||||
<div class="text-justify">
|
<div class="text-justify">
|
||||||
{NEWSBODY}
|
{NEWS_BODY}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
{EXTENDED}
|
{EXTENDED}
|
||||||
@@ -125,7 +124,7 @@ $NEWS_WRAPPER['view']['item']['NEWSIMAGE: item=1'] = '<span class="news-images-m
|
|||||||
$NEWS_TEMPLATE['view']['item'] = '
|
$NEWS_TEMPLATE['view']['item'] = '
|
||||||
{SETIMAGE: w=900&h=600}
|
{SETIMAGE: w=900&h=600}
|
||||||
<div class="view-item">
|
<div class="view-item">
|
||||||
<h2 class="news-title">{NEWSTITLELINK}</h2>
|
<h2 class="news-title">{NEWS_TITLE: link=1}</h2>
|
||||||
|
|
||||||
<hr class="news-heading-sep">
|
<hr class="news-heading-sep">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -137,9 +136,9 @@ $NEWS_TEMPLATE['view']['item'] = '
|
|||||||
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
{NEWSIMAGE: item=1}
|
{NEWSIMAGE: item=1}
|
||||||
<p class="lead">{NEWSSUMMARY}</p>
|
<p class="lead">{NEWS_SUMMARY}</p>
|
||||||
<div class="text-justify">
|
<div class="text-justify">
|
||||||
{NEWSBODY=body}
|
{NEWS_BODY=body}
|
||||||
</div>
|
</div>
|
||||||
<div class="news-videos-1">
|
<div class="news-videos-1">
|
||||||
{NEWSVIDEO: item=1}
|
{NEWSVIDEO: item=1}
|
||||||
@@ -164,7 +163,7 @@ $NEWS_TEMPLATE['view']['item'] = '
|
|||||||
{NEWSVIDEO: item=5}
|
{NEWSVIDEO: item=5}
|
||||||
|
|
||||||
<div class="body-extended text-justify">
|
<div class="body-extended text-justify">
|
||||||
{NEWSBODY=extended}
|
{NEWS_BODY=extended}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
)]]></core>
|
)]]></core>
|
||||||
<core name="newsposts">3</core>
|
<core name="newsposts">3</core>
|
||||||
<core name="shortdate">%d %b %Y</core>
|
<core name="shortdate">%d %b %Y</core>
|
||||||
<core name="sitedisclaimer"><![CDATA[e107 Theme based on "The Voux" by [link=http://www.themexpose.com/]ThemeXpose[/link] which is realeased under the terms of the GNU General Public license.]]></core>
|
|
||||||
<core name="sitelogo">{e_THEME}voux/install/logo2B252832529.png</core>
|
<core name="sitelogo">{e_THEME}voux/install/logo2B252832529.png</core>
|
||||||
<core name="sitetheme_custompages"><![CDATA[array (
|
<core name="sitetheme_custompages"><![CDATA[array (
|
||||||
'jumbotron_full' =>
|
'jumbotron_full' =>
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Voux Blog Theme for e107 v2.x
|
* The Voux Blog Theme for e107 v2.x
|
||||||
|
* "The Voux" is Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||||
|
* Released under the terms and conditions of the
|
||||||
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
|
* All Rights Reserved
|
||||||
* @see : http://voux-with-out-slider-themexpose.blogspot.in/
|
* @see : http://voux-with-out-slider-themexpose.blogspot.in/
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -263,8 +267,9 @@ $LAYOUT['_footer_'] = '
|
|||||||
|
|
||||||
<div id="footer-copyright" class="container">
|
<div id="footer-copyright" class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="sitedisclaimer" class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<small>{SITEDISCLAIMER}</small>
|
<!-- Under the terms of the GNU GPL, this may not be removed or modified -->
|
||||||
|
<small>e107 Theme based on "Voux" by <a href="http://www.themexpose.com/">ThemeXpose</a> which is released under the terms of the GNU General Public license. </small>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
{BOOTSTRAP_USERNAV: placement=bottom&dir=up}
|
{BOOTSTRAP_USERNAV: placement=bottom&dir=up}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<e107Theme name="The Voux" version="1.0" date="2016-05-30" compatibility="2.0">
|
<e107Theme name="Voux" version="1.0" date="2016-05-30" compatibility="2.0">
|
||||||
<author name ="e107 Inc" email="e107inc@something.com" url="http://e107.org" />
|
<author name ="e107 Inc" email="e107inc@something.com" url="http://e107.org" />
|
||||||
<summary>Simple modern blog theme.</summary>
|
<summary>Simple modern blog theme.</summary>
|
||||||
<description>Based on the blogger theme by ThemeExpose</description>
|
<description>Ported from the blogger theme by ThemeExpose</description>
|
||||||
<category>blog</category>
|
<category>blog</category>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin name='rss_menu' url='core' />
|
<plugin name='rss_menu' url='core' />
|
||||||
|
@@ -327,3 +327,9 @@ optgroup.level-5 { padding-left:4em }
|
|||||||
img.e-emoticon { vertical-align:middle; border:0; width:24px }
|
img.e-emoticon { vertical-align:middle; border:0; width:24px }
|
||||||
|
|
||||||
.e-editable-front:hover { background-color:#FCF8E3 }
|
.e-editable-front:hover { background-color:#FCF8E3 }
|
||||||
|
.e-editable-front a:hover { background-color:#FCF8E3 }
|
||||||
|
.e-editable-front:hover:after { content: "\f044"; z-index:10000; position:relative; top:0; right:-5px; margin-right:4px; padding-right:5px; font-family:'FontAwesome'; font-size:0.8em }
|
||||||
|
|
||||||
|
|
||||||
|
#uiAlert { z-index: 10001 }
|
||||||
|
#uiAlert .alert { z-index:10000; box-shadow:1px 4px 5px rgba(0,0,0,0.4) }
|
@@ -66,6 +66,7 @@ class e107InlineEdit
|
|||||||
|
|
||||||
$srch = array("<!-- bbcode-html-start -->","<!-- bbcode-html-end -->","[html]","[/html]");
|
$srch = array("<!-- bbcode-html-start -->","<!-- bbcode-html-end -->","[html]","[/html]");
|
||||||
$content = str_replace($srch,'',$content);
|
$content = str_replace($srch,'',$content);
|
||||||
|
$content = trim($content);
|
||||||
|
|
||||||
if($type == 'html')
|
if($type == 'html')
|
||||||
{
|
{
|
||||||
@@ -89,10 +90,11 @@ class e107InlineEdit
|
|||||||
$ret['msg'] = "Saved"; // LAN_UPDATED; or LAN_SAVED
|
$ret['msg'] = "Saved"; // LAN_UPDATED; or LAN_SAVED
|
||||||
$ret['status'] = 'ok';
|
$ret['status'] = 'ok';
|
||||||
}
|
}
|
||||||
else
|
else //FIXME only display error when query fails..
|
||||||
{
|
{
|
||||||
$ret['msg'] = "Saving Failed"; // LAN_UPDATED_FAILED;
|
$ret['msg'] = "Saving Failed"; // LAN_UPDATED_FAILED;
|
||||||
$ret['status'] = 'error';
|
$ret['status'] = 'error';
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user