mirror of
https://github.com/e107inc/e107.git
synced 2025-07-23 16:01:39 +02:00
Fixes #1056 - Forum rules and statistics links added back to template and reworked for bootstrap. thread_sef removed from forum_thread database table and now generated on the fly. More testing required.
This commit is contained in:
@@ -25,6 +25,18 @@ class forum_url // plugin-folder + '_url'
|
||||
{
|
||||
$config = array();
|
||||
|
||||
$config['rules'] = array(
|
||||
'regex' => '^forum/rules/?',
|
||||
'sef' => 'forum/rules',
|
||||
'redirect' => '{e_PLUGIN}forum/forum.php?f=rules',
|
||||
);
|
||||
|
||||
$config['stats'] = array(
|
||||
'regex' => '^forum/stats/?',
|
||||
'sef' => 'forum/stats',
|
||||
'redirect' => '{e_PLUGIN}forum/forum_stats.php',
|
||||
);
|
||||
|
||||
$config['post'] = array(
|
||||
'regex' => '^forum/post/?',
|
||||
'sef' => 'forum/post/',
|
||||
|
@@ -9,7 +9,7 @@
|
||||
#forum-viewtopic li.forum-viewtopic-post:nth-child(odd) { background: #F5F5F5 }
|
||||
#forum-viewtopic li ul.thumbnails { margin-top:15px }
|
||||
#forum-viewtopic li img.user-avatar { margin-bottom:10px; display:inline-block }
|
||||
|
||||
#forum, #forum-stats, #forum-rules { min-height: 500px; }
|
||||
|
||||
.forum-attachment-file { margin-top:15px; }
|
||||
.forum-user-combo { padding-bottom:5px }
|
@@ -53,6 +53,7 @@ if(isset($_GET['f']))
|
||||
|
||||
case 'rules':
|
||||
include_once(HEADERF);
|
||||
|
||||
forum_rules('show');
|
||||
include_once(FOOTERF);
|
||||
exit;
|
||||
@@ -74,6 +75,7 @@ $fVars->NEWIMAGE = IMAGE_new_small;
|
||||
$fVars->TRACKTITLE = LAN_FORUM_0073;
|
||||
|
||||
$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>";
|
||||
if(USER)
|
||||
{
|
||||
@@ -83,10 +85,27 @@ if(USER)
|
||||
$fVars->USERINFO .= " | <a href='".e_PLUGIN."forum/forum_uploads.php'>".LAN_FORUM_0015."</a>";
|
||||
}
|
||||
}
|
||||
if($rules_text != '')
|
||||
if(!empty($rules_text))
|
||||
{
|
||||
$fVars->USERINFO .= " | <a href='".$e107->url->create('forum/forum/rules')."'>".LAN_FORUM_0016.'</a>';
|
||||
$fVars->USERINFO .= " | <a href='".e107::url('forum','rules')."'>".LAN_FORUM_0016.'</a>';
|
||||
}
|
||||
|
||||
|
||||
// v2.x --------------------
|
||||
$uInfo = array();
|
||||
$uInfo[0] = "<a href='".e107::url('forum','stats')."'>".LAN_FORUM_6013.'</a>';
|
||||
|
||||
if(!empty($rules_text))
|
||||
{
|
||||
$uInfo[1] = "<a href='".e107::url('forum','rules')."'>".LAN_FORUM_0016.'</a>';
|
||||
}
|
||||
|
||||
$fVars->USERINFOX = implode(" | ",$uInfo);
|
||||
// -----------
|
||||
|
||||
|
||||
|
||||
|
||||
$total_topics = $sql->count("forum_thread", "(*)");
|
||||
$total_replies = $sql->count("forum_post", "(*)");
|
||||
$total_members = $sql->count("user");
|
||||
@@ -562,7 +581,23 @@ function forum_rules($action = 'check')
|
||||
{
|
||||
$rules_text = LAN_FORUM_0072;
|
||||
}
|
||||
e107::getRender()->tablerender(LAN_FORUM_0016, "<div style='text-align:center'>{$rules_text}</div>", array('forum', 'forum_rules'));
|
||||
|
||||
$text = '';
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$breadarray = array(
|
||||
array('text'=> e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME), 'url' => e107::url('forum','index') ),
|
||||
array('text'=>LAN_FORUM_0016, 'url'=>null)
|
||||
);
|
||||
|
||||
$text = e107::getForm()->breadcrumb($breadarray);
|
||||
}
|
||||
|
||||
$text .= "<div id='forum-rules'>".$rules_text."</div>";
|
||||
$text .= "<div class='center'>".e107::getForm()->pagination(e107::url('forum','index'), LAN_BACK)."</div>";
|
||||
|
||||
e107::getRender()->tablerender(LAN_FORUM_0016, $text, array('forum', 'forum_rules'));
|
||||
}
|
||||
|
||||
?>
|
@@ -375,7 +375,7 @@ if(!deftrue('OLD_FORUMADMIN'))
|
||||
|
||||
public function beforeUpdate($new_data, $old_data, $id)
|
||||
{
|
||||
if(empty($new_data['forum_sef']))
|
||||
if(empty($new_data['forum_sef']) && !empty($new_data['forum_name']))
|
||||
{
|
||||
$new_data['forum_sef'] = eHelper::title2sef($new_data['forum_name']);
|
||||
}
|
||||
|
@@ -747,7 +747,7 @@ class e107forum
|
||||
$info = array();
|
||||
// $info['_FIELD_TYPES'] = $this->fieldTypes['forum_thread'];
|
||||
|
||||
$threadInfo['thread_sef'] = eHelper::title2sef($threadInfo['thread_name']);
|
||||
// $threadInfo['thread_sef'] = eHelper::title2sef($threadInfo['thread_name'],'dashl');
|
||||
|
||||
$info['data'] = $threadInfo;
|
||||
|
||||
@@ -758,6 +758,8 @@ class e107forum
|
||||
$postInfo['post_thread'] = $newThreadId;
|
||||
$newPostId = $this->postAdd($postInfo, false);
|
||||
$this->threadMarkAsRead($newThreadId);
|
||||
$threadInfo['thread_sef'] = eHelper::title2sef($threadInfo['thread_name'],'dashl');
|
||||
|
||||
return array('postid' => $newPostId, 'threadid' => $newThreadId, 'threadsef'=>$threadInfo['thread_sef']);
|
||||
}
|
||||
return false;
|
||||
@@ -783,7 +785,7 @@ class e107forum
|
||||
else
|
||||
{
|
||||
//Replace title
|
||||
$threadTitle = ", thread_name = '{$threadTitle}', thread_sef='".eHelper::title2sef($threadTitle,'dashl')."' ";
|
||||
$threadTitle = ", thread_name = '{$threadTitle}' "; // , thread_sef='".eHelper::title2sef($threadTitle,'dashl')."' ";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -808,7 +810,7 @@ class e107forum
|
||||
function threadUpdate($threadId, $threadInfo)
|
||||
{
|
||||
$info = array();
|
||||
$threadInfo['thread_sef'] = eHelper::title2sef($threadInfo['thread_name']);
|
||||
// $threadInfo['thread_sef'] = eHelper::title2sef($threadInfo['thread_name'],'dashl');
|
||||
|
||||
$info['data'] = $threadInfo;
|
||||
// $info['_FIELD_TYPES'] = $this->fieldTypes['forum_thread'];
|
||||
@@ -878,6 +880,9 @@ class e107forum
|
||||
{
|
||||
$tmp['thread_options'] = unserialize($tmp['thread_options']);
|
||||
}
|
||||
|
||||
$tmp['thread_sef'] = eHelper::title2sef($tmp['thread_name'],'dashl');
|
||||
|
||||
return $tmp;
|
||||
}
|
||||
}
|
||||
@@ -898,7 +903,7 @@ class e107forum
|
||||
if('post' === $start)
|
||||
{
|
||||
$qry = '
|
||||
SELECT u.user_name, t.thread_active, t.thread_datestamp, t.thread_name, t.thread_sef, t.thread_user, t.thread_id, p.* FROM `#forum_post` AS p
|
||||
SELECT u.user_name, t.thread_active, t.thread_datestamp, t.thread_name, t.thread_user, t.thread_id, p.* FROM `#forum_post` AS p
|
||||
LEFT JOIN `#forum_thread` AS t ON t.thread_id = p.post_thread
|
||||
LEFT JOIN `#user` AS u ON u.user_id = p.post_user
|
||||
WHERE p.post_id = '.$id;
|
||||
@@ -926,6 +931,7 @@ class e107forum
|
||||
$ret = array();
|
||||
while($row = $sql->fetch(MYSQL_ASSOC))
|
||||
{
|
||||
$row['thread_sef'] = eHelper::title2sef($row['thread_name'],'dashl');
|
||||
$ret[] = $row;
|
||||
}
|
||||
}
|
||||
@@ -1591,6 +1597,7 @@ class e107forum
|
||||
{
|
||||
while ($row = $sql->fetch(MYSQL_ASSOC))
|
||||
{
|
||||
// $row['thread_sef'] = eHelper::title2sef($row['thread_name']);
|
||||
$ret[] = $row;
|
||||
}
|
||||
}
|
||||
@@ -1604,7 +1611,7 @@ class e107forum
|
||||
$sql = e107::getDb();
|
||||
$id = (int)$id;
|
||||
$qry = "
|
||||
SELECT p.post_user, p.post_id, p.post_user_anon, p.post_datestamp, p.post_thread, t.thread_sef, u.user_name FROM `#forum_post` AS p
|
||||
SELECT p.post_user, p.post_id, p.post_user_anon, p.post_datestamp, p.post_thread, t.thread_name, u.user_name FROM `#forum_post` AS p
|
||||
LEFT JOIN `#forum_thread` AS t ON p.post_thread = t.thread_id
|
||||
LEFT JOIN `#user` AS u ON u.user_id = p.post_user
|
||||
WHERE p.post_thread = {$id}
|
||||
@@ -1612,7 +1619,9 @@ class e107forum
|
||||
";
|
||||
if ($sql->gen($qry))
|
||||
{
|
||||
return $sql->fetch(MYSQL_ASSOC);
|
||||
$row = $sql->fetch(MYSQL_ASSOC);
|
||||
$row['thread_sef'] = eHelper::title2sef($row['thread_name'],'dashl');
|
||||
return $row;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1635,7 +1644,7 @@ class e107forum
|
||||
|
||||
|
||||
$qry = "
|
||||
SELECT t.thread_id, t.thread_sef, f.forum_id, f.forum_sef FROM `#forum_thread` AS t
|
||||
SELECT t.thread_id, t.thread_name, f.forum_id, f.forum_sef FROM `#forum_thread` AS t
|
||||
LEFT JOIN `#forum` AS f ON t.thread_forum_id = f.forum_id
|
||||
WHERE t.thread_forum_id = $forumId
|
||||
AND t.thread_lastpost {$dir} $lastpost
|
||||
@@ -1649,6 +1658,7 @@ class e107forum
|
||||
if ($sql->gen($qry))
|
||||
{
|
||||
$row = $sql->fetch();
|
||||
$row['thread_sef'] = eHelper::title2sef($row['thread_name'],'dashl');
|
||||
// e107::getMessage()->addInfo(ucfirst($which).print_a($row,true));
|
||||
return $row;
|
||||
// return $row['thread_id'];
|
||||
|
@@ -824,7 +824,9 @@ class forum_post_handler
|
||||
$newThreadId = $postResult['threadid'];
|
||||
|
||||
$this->data['thread_id'] = $newThreadId;
|
||||
$this->data['thread_sef'] = $postResult['threadsef'];
|
||||
// $this->data['thread_sef'] = $postResult['threadsef'];
|
||||
$this->data['thread_sef'] = eHelper::title2sef($threadInfo['thread_name'],'dashl');
|
||||
|
||||
|
||||
|
||||
if($_POST['email_notify'])
|
||||
|
@@ -60,6 +60,11 @@ class forum_setup
|
||||
return true; // true to trigger an upgrade alert, and false to not.
|
||||
}
|
||||
|
||||
if(e107::getDb()->field('forum_thread', 'thread_sef'))
|
||||
{
|
||||
e107::getDb()->gen("ALTER TABLE `#forum_thread` DROP `thread_sef` ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -37,7 +37,6 @@ CREATE TABLE forum_thread (
|
||||
`thread_lastuser_anon` varchar(30) default NULL,
|
||||
`thread_total_replies` int(10) unsigned NOT NULL default '0',
|
||||
`thread_options` text,
|
||||
`thread_sef` varchar(250) default NULL,
|
||||
PRIMARY KEY (`thread_id`),
|
||||
KEY `thread_forum_id` (`thread_forum_id`),
|
||||
KEY `thread_sticky` (`thread_sticky`),
|
||||
|
@@ -8,37 +8,53 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if(!defined('e107_INIT'))
|
||||
{
|
||||
require_once('../../class2.php');
|
||||
}
|
||||
|
||||
$e107 = e107::getInstance();
|
||||
$sql = e107::getDb();
|
||||
|
||||
if (!$e107->isInstalled('forum'))
|
||||
if (!e107::isInstalled('forum'))
|
||||
{
|
||||
header('Location: '.e_BASE.'index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//TODO: Investigate the queries used here
|
||||
|
||||
class forumStats
|
||||
{
|
||||
|
||||
private $from = 0;
|
||||
private $view = 20;
|
||||
|
||||
|
||||
|
||||
function __construct()
|
||||
{
|
||||
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_stats.php');
|
||||
e107::lan('forum','front');
|
||||
e107::css('forum', 'forum.css');
|
||||
}
|
||||
|
||||
|
||||
function init()
|
||||
{
|
||||
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
$ns = e107::getRender();
|
||||
$frm = e107::getForm();
|
||||
|
||||
|
||||
require_once(e_PLUGIN.'forum/forum_class.php');
|
||||
$gen = new convert;
|
||||
$gen = e107::getDate();
|
||||
|
||||
$forum = new e107forum;
|
||||
|
||||
$barl = (file_exists(THEME.'images/barl.png') ? THEME.'images/barl.png' : e_PLUGIN.'poll/images/barl.png');
|
||||
$barr = (file_exists(THEME.'images/barr.png') ? THEME.'images/barr.png' : e_PLUGIN.'poll/images/barr.png');
|
||||
$bar = (file_exists(THEME.'images/bar.png') ? THEME.'images/bar.png' : e_PLUGIN.'poll/images/bar.png');
|
||||
|
||||
require_once(HEADERF);
|
||||
|
||||
$total_posts = $sql->count('forum_post');
|
||||
$total_topics = $sql->count('forum_thread');
|
||||
$total_replies = $total_posts - $total_topics;
|
||||
$total_views = 0;
|
||||
|
||||
$query = 'SELECT sum(thread_views) AS total FROM `#forum_thread` ';
|
||||
if ($sql->gen($query))
|
||||
{
|
||||
@@ -55,6 +71,7 @@ $open_since = $gen -> computeLapse($open_ds);
|
||||
$open_days = floor((time()-$open_ds) / 86400);
|
||||
$postsperday = ($open_days < 1 ? $total_posts : round($total_posts / $open_days));
|
||||
|
||||
global $mySQLdefaultdb;
|
||||
|
||||
$query = "SHOW TABLE STATUS FROM `{$mySQLdefaultdb}`";
|
||||
$sql->gen($query);
|
||||
@@ -63,24 +80,25 @@ foreach($array as $table)
|
||||
{
|
||||
if($table['Name'] == MPREFIX.'forum_post')
|
||||
{
|
||||
$db_size = $e107->parseMemorySize($table['Data_length']);
|
||||
$avg_row_len = $e107->parseMemorySize($table['Avg_row_length']);
|
||||
$db_size = eHelper::parseMemorySize($table['Data_length']);
|
||||
$avg_row_len = eHelper::parseMemorySize($table['Avg_row_length']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$query = "
|
||||
SELECT ft.thread_id, ft.thread_user, ft.thread_name, ft.thread_total_replies, ft.thread_datestamp, f.forum_class, u.user_name, u.user_id FROM #forum_thread as ft
|
||||
SELECT ft.thread_id, ft.thread_user, ft.thread_name, ft.thread_total_replies, ft.thread_datestamp, f.forum_sef, f.forum_class, u.user_name, u.user_id FROM #forum_thread as ft
|
||||
LEFT JOIN #user AS u ON ft.thread_user = u.user_id
|
||||
LEFT JOIN #forum AS f ON f.forum_id = ft.thread_forum_id
|
||||
WHERE ft.thread_active > 0
|
||||
AND f.forum_class IN (".USERCLASS_LIST.")
|
||||
ORDER BY ft.thread_total_replies DESC LIMIT 0,10";
|
||||
|
||||
$sql->gen($query);
|
||||
$most_activeArray = $sql->db_getList();
|
||||
|
||||
$query = "
|
||||
SELECT ft.*, f.forum_class, u.user_name, u.user_id FROM #forum_thread as ft
|
||||
SELECT ft.*, f.forum_class, f.forum_sef, u.user_name, u.user_id FROM #forum_thread as ft
|
||||
LEFT JOIN #user AS u ON ft.thread_user = u.user_id
|
||||
LEFT JOIN #forum AS f ON f.forum_id = ft.thread_forum_id
|
||||
WHERE f.forum_class IN (".USERCLASS_LIST.")
|
||||
@@ -98,12 +116,15 @@ foreach($posters as $poster)
|
||||
$top_posters[] = array("user_id" => $poster['user_id'], "user_name" => $poster['user_name'], "user_forums" => $poster['user_forums'], "percentage" => $percen);
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
// get all replies
|
||||
$query = "
|
||||
SELECT COUNT(fp.post_id) AS post_count, u.user_name, u.user_id, fp.post_thread FROM #forum_post as fp
|
||||
LEFT JOIN #user AS u ON fp.post_user = u.user_id
|
||||
GROUP BY fp.post_user
|
||||
ORDER BY post_count DESC LIMIT 0,10";
|
||||
|
||||
$sql->gen($query);
|
||||
$top_repliers_data = $sql->db_getList('ALL', false, false, 'user_id');
|
||||
|
||||
@@ -124,6 +145,7 @@ SELECT COUNT(ft.thread_id) AS thread_count, u.user_id FROM #forum_thread as ft
|
||||
LEFT JOIN #user AS u ON ft.thread_user = u.user_id
|
||||
WHERE u.user_id IN ({$ids})
|
||||
GROUP BY ft.thread_user";
|
||||
|
||||
$sql->gen($query);
|
||||
$top_repliers_data_c = $sql->db_getList('ALL', false, false, 'user_id');
|
||||
|
||||
@@ -138,8 +160,11 @@ foreach($top_repliers_data as $uid => $poster)
|
||||
$top_repliers_data[$uid]['percentage'] = $percent;
|
||||
//$top_repliers_data[$uid] = array("user_id" => $poster['user_id'], "user_name" => $poster['user_name'], "user_forums" => $poster['post_count'], "percentage" => $percent);
|
||||
}
|
||||
|
||||
// sort
|
||||
|
||||
arsort($top_repliers_sort, SORT_NUMERIC);
|
||||
|
||||
// build top repliers
|
||||
foreach ($top_repliers_sort as $uid => $c)
|
||||
{
|
||||
@@ -152,9 +177,11 @@ SELECT COUNT(ft.thread_id) AS thread_count, u.user_name, u.user_id FROM #forum_t
|
||||
LEFT JOIN #user AS u ON ft.thread_user = u.user_id
|
||||
GROUP BY ft.thread_user
|
||||
ORDER BY thread_count DESC LIMIT 0,10";
|
||||
|
||||
$sql->gen($query);
|
||||
$top_topic_starters_data = $sql->db_getList();
|
||||
$top_topic_starters = array();
|
||||
|
||||
foreach($top_topic_starters_data as $poster)
|
||||
{
|
||||
$percent = round(($poster['thread_count'] / $total_topics) * 100, 2);
|
||||
@@ -198,27 +225,11 @@ foreach($posters as $poster)
|
||||
*/
|
||||
|
||||
|
||||
function showBar($perc)
|
||||
{
|
||||
|
||||
return "<div class='progress'>
|
||||
<div class='bar' style='width: ".intval($perc)."%;'></div>
|
||||
</div>";
|
||||
|
||||
// <div style='background-image: url($barl); width: 5px; height: 14px; float: left;'></div>
|
||||
// <div style='background-image: url($bar); width: ".intval($percentage)."%; height: 14px; float: left;'></div>
|
||||
// <div style='background-image: url($barr); width: 5px; height: 14px; float: left;'></div>
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$text = "
|
||||
<div class='spacer'>
|
||||
$text_0 = "
|
||||
<table style='width: 100%;' class='fborder table'>
|
||||
<tr>
|
||||
<th class='forumheader' colspan='2'>".LAN_FORUM_6000."</th>
|
||||
</tr>
|
||||
<tr><td style='width: 50%; text-align: right;'><b>".LAN_FORUM_6001.":</b> </td><td style='width: 50%;'>{$open_date}</td></tr>
|
||||
<tr><td style='width: 50%; text-align: right;'><b>".LAN_FORUM_6002.":</b> </td><td style='width: 50%;'>{$open_since}</td></tr>
|
||||
<tr><td style='width: 50%; text-align: right;'><b>".LAN_FORUM_6003.":</b> </td><td style='width: 50%;'>{$total_posts}</td></tr>
|
||||
@@ -228,14 +239,14 @@ $text = "
|
||||
<tr><td style='width: 50%; text-align: right;'><b>".LAN_FORUM_6014.":</b> </td><td style='width: 50%;'>{$postsperday}</td></tr>
|
||||
<tr><td style='width: 50%; text-align: right;'><b>".LAN_FORUM_6006.":</b> </td><td style='width: 50%;'>{$db_size}</td></tr>
|
||||
<tr><td style='width: 50%; text-align: right;'><b>".LAN_FORUM_6007.":</b> </td><td style='width: 50%;'>{$avg_row_len}</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</table>";
|
||||
|
||||
<div class='spacer'>
|
||||
|
||||
|
||||
|
||||
$text_1 = "
|
||||
<table style='width: 100%;' class='fborder table'>
|
||||
<tr>
|
||||
<td class='forumheader' colspan='5'>".LAN_FORUM_0011."</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='width: 10%; text-align: center;' class='fcaption'>".LAN_FORUM_6008."</th>
|
||||
<th style='width: 40%;' class='fcaption'>".LAN_FORUM_1003."</th>
|
||||
@@ -243,14 +254,16 @@ $text = "
|
||||
<th style='width: 20%; text-align: center;' class='fcaption'>".LAN_FORUM_6009."</th>
|
||||
<th style='width: 20%; text-align: center;' class='fcaption'>".LAN_DATE."</th>
|
||||
</tr>
|
||||
</thead>
|
||||
";
|
||||
|
||||
$count=1;
|
||||
|
||||
foreach($most_activeArray as $ma)
|
||||
{
|
||||
if($ma['user_name'])
|
||||
{
|
||||
$uinfo = "<a href='".e_BASE."user.php?id.{$ma['user_id']}'>{$ma['user_name']}</a>";
|
||||
$uinfo = "<a href='".e_BASE."user.php?id.{$ma['user_id']}'>{$ma['user_name']}</a>"; //TODO SEf Url .
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -258,25 +271,28 @@ foreach($most_activeArray as $ma)
|
||||
$uinfo = $tp->toHTML($tmp[0]);
|
||||
}
|
||||
|
||||
$text .= "
|
||||
$ma['thread_sef'] = eHelper::title2sef($ma['thread_name'],'dashl');
|
||||
$url = e107::url('forum','topic', $ma);
|
||||
|
||||
$text_1 .= "
|
||||
<tr>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$count</td>
|
||||
<td style='width: 40%;' class='forumheader3'><a href='".e_PLUGIN."forum/forum_viewtopic.php?{$ma['thread_id']}'>{$ma['thread_name']}</a></td>
|
||||
<td style='width: 40%;' class='forumheader3'><a href='".$url."'>{$ma['thread_name']}</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>{$ma['thread_total_replies']}</td>
|
||||
<td style='width: 20%; text-align: center;' class='forumheader3'>{$uinfo}</td>
|
||||
<td style='width: 20%; text-align: center;' class='forumheader3'>".$gen->convert_date($ma['thread_datestamp'], "forum")."</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$count++;
|
||||
}
|
||||
$text .= "</table>
|
||||
</div>
|
||||
|
||||
<div class='spacer'>
|
||||
$text_1 .= "</table>";
|
||||
|
||||
|
||||
$text_2 = "
|
||||
<table style='width: 100%;' class='fborder table'>
|
||||
<tr>
|
||||
<td class='forumheader' colspan='5'>".LAN_FORUM_6010."</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='width: 10%; text-align: center;' class='fcaption'>".LAN_FORUM_6008."</th>
|
||||
<th style='width: 40%;' class='fcaption'>".LAN_FORUM_1003."</th>
|
||||
@@ -284,14 +300,16 @@ $text .= "</table>
|
||||
<th style='width: 20%; text-align: center;' class='fcaption'>".LAN_FORUM_6009."</th>
|
||||
<th style='width: 20%; text-align: center;' class='fcaption'>".LAN_DATE."</th>
|
||||
</tr>
|
||||
</thead>
|
||||
";
|
||||
|
||||
$count=1;
|
||||
|
||||
foreach($most_viewedArray as $ma)
|
||||
{
|
||||
if($ma['user_name'])
|
||||
{
|
||||
$uinfo = "<a href='".e_BASE."user.php?id.{$ma['user_id']}'>{$ma['user_name']}</a>";
|
||||
$uinfo = "<a href='".e_BASE."user.php?id.{$ma['user_id']}'>".$ma['user_name']."</a>"; //TODO SEf Url .
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -299,25 +317,28 @@ foreach($most_viewedArray as $ma)
|
||||
$uinfo = $tp->toHTML($tmp[0]);
|
||||
}
|
||||
|
||||
$text .= "
|
||||
$ma['thread_sef'] = eHelper::title2sef($ma['thread_name'],'dashl');
|
||||
$url = e107::url('forum','topic', $ma);
|
||||
|
||||
$text_2 .= "
|
||||
<tr>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$count</td>
|
||||
<td style='width: 40%;' class='forumheader3'><a href='".e_PLUGIN."forum/forum_viewtopic.php?{$ma['thread_id']}'>{$ma['thread_name']}</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>{$ma['thread_views']}</td>
|
||||
<td style='width: 20%; text-align: center;' class='forumheader3'>{$uinfo}</td>
|
||||
<td style='width: 40%;' class='forumheader3'><a href='".$url."'>".$ma['thread_name']."</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>".$ma['thread_views']."</td>
|
||||
<td style='width: 20%; text-align: center;' class='forumheader3'>".$uinfo."</td>
|
||||
<td style='width: 20%; text-align: center;' class='forumheader3'>".$gen->convert_date($ma['thread_datestamp'], "forum")."</td>
|
||||
</tr>
|
||||
";
|
||||
$count++;
|
||||
}
|
||||
$text .= "</table>
|
||||
</div>
|
||||
|
||||
<div class='spacer'>
|
||||
$text_2 .= "</table>";
|
||||
|
||||
|
||||
|
||||
|
||||
$text_3 = "
|
||||
<table style='width: 100%;' class='fborder table'>
|
||||
<tr>
|
||||
<td class='forumheader' colspan='5'>".LAN_FORUM_0010."</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='width: 10%; text-align: center;' class='fcaption'>".LAN_FORUM_6008."</th>
|
||||
@@ -333,27 +354,30 @@ $text .= "</table>
|
||||
$count=1;
|
||||
foreach($top_posters as $ma)
|
||||
{
|
||||
extract($ma);
|
||||
$text .= "<tr>
|
||||
extract($ma); // TODO Remove me.
|
||||
|
||||
//TODO SEf Url .
|
||||
$text_3 .= "<tr>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$count</td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e_BASE."user.php?id.$user_id'>$user_name</a></td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e_BASE."user.php?id.".$ma['user_id']."'>".$ma['user_name']."</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$user_forums</td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$percentage%</td>
|
||||
<td style='width: 50%;' class='forumheader3'>".showBar($percentage)."
|
||||
<td style='width: 50%;' class='forumheader3'>".$this->showBar($percentage)."
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$count++;
|
||||
}
|
||||
$text .= "</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class='spacer'>
|
||||
$text_3 .= "</tbody>
|
||||
</table>
|
||||
";
|
||||
|
||||
|
||||
$text_4 = "
|
||||
<table style='width: 100%;' class='fborder table'>
|
||||
<tr>
|
||||
<td class='forumheader' colspan='5'>".LAN_FORUM_6011."</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='width: 10%; text-align: center;' class='fcaption'>".LAN_FORUM_6008."</th>
|
||||
<th style='width: 20%;' class='fcaption'>".LAN_NAME."</th>
|
||||
@@ -361,31 +385,33 @@ $text .= "</tbody>
|
||||
<th style='width: 10%; text-align: center;' class='fcaption'>%</th>
|
||||
<th style='width: 50%; text-align: center;' class='fcaption'> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
";
|
||||
|
||||
$count=1;
|
||||
foreach($top_topic_starters as $ma)
|
||||
{
|
||||
extract($ma);
|
||||
$text .= "<tr>
|
||||
extract($ma); // TODO Remove me.
|
||||
//TODO SEf Url .
|
||||
|
||||
|
||||
$text_4 .= "<tr>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$count</td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e_BASE."user.php?id.$user_id'>$user_name</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$user_forums</td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$percentage%</td>
|
||||
<td style='width: 50%; text-align: center;' class='forumheader3'>".showBar($percentage)."</td>
|
||||
<td style='width: 50%; text-align: center;' class='forumheader3'>".$this->showBar($percentage)."</td>
|
||||
</tr>
|
||||
";
|
||||
$count++;
|
||||
}
|
||||
$text .= "</table>
|
||||
</div>
|
||||
|
||||
$text_4 .= "</table>";
|
||||
|
||||
|
||||
<div class='spacer'>
|
||||
$text_5 = "
|
||||
<table style='width: 100%;' class='fborder table'>
|
||||
<tr>
|
||||
<td class='forumheader' colspan='5'>".LAN_FORUM_6012."</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='width: 10%; text-align: center;' class='fcaption'>".LAN_FORUM_6008."</th>
|
||||
<th style='width: 20%;' class='fcaption'>".LAN_NAME."</th>
|
||||
@@ -393,27 +419,257 @@ $text .= "</table>
|
||||
<th style='width: 10%; text-align: center;' class='fcaption'>%</th>
|
||||
<th style='width: 50%; text-align: center;' class='fcaption'> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
";
|
||||
|
||||
$count=1;
|
||||
foreach($top_repliers as $ma)
|
||||
{
|
||||
extract($ma);
|
||||
$text .= "<tr>
|
||||
extract($ma); // TODO Remove me.
|
||||
//TODO SEf Url .
|
||||
|
||||
$text_5 .= "
|
||||
<tr>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$count</td>
|
||||
<td style='width: 20%;' class='forumheader3'><a href='".e_BASE."user.php?id.$user_id'>$user_name</a></td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$user_forums</td>
|
||||
<td style='width: 10%; text-align: center;' class='forumheader3'>$percentage%</td>
|
||||
<td style='width: 50%; text-align: center;' class='forumheader3'>".showBar($percentage)."</td>
|
||||
<td style='width: 50%; text-align: center;' class='forumheader3'>".$this->showBar($percentage)."</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$count++;
|
||||
}
|
||||
$text .= '</table>
|
||||
</div>
|
||||
';
|
||||
|
||||
$text_5 .= '</table>';
|
||||
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$tabs = array();
|
||||
|
||||
$tabs[0] = array('caption'=>LAN_FORUM_6000, 'text'=>$text_0);
|
||||
$tabs[1] = array('caption'=>LAN_FORUM_0011, 'text'=>$text_1);
|
||||
$tabs[2] = array('caption'=>LAN_FORUM_6010, 'text'=>$text_2);
|
||||
$tabs[3] = array('caption'=>LAN_FORUM_0010, 'text'=>$text_3);
|
||||
$tabs[4] = array('caption'=>LAN_FORUM_6011, 'text'=>$text_4);
|
||||
$tabs[5] = array('caption'=>LAN_FORUM_6012, 'text'=>$text_5);
|
||||
|
||||
$frm = e107::getForm();
|
||||
|
||||
$breadarray = array(
|
||||
array('text'=> e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME), 'url' => e107::url('forum','index') ),
|
||||
array('text'=>LAN_FORUM_6013, 'url'=>null)
|
||||
);
|
||||
|
||||
$text = $frm->breadcrumb($breadarray);
|
||||
|
||||
|
||||
$text = "<div id='forum-stats'>". $text . e107::getForm()->tabs($tabs)."</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$text ="
|
||||
<h3>".LAN_FORUM_6000."</h3>". $text_0 .
|
||||
"<h3>".LAN_FORUM_0011."</h3>". $text_1 .
|
||||
"<h3>".LAN_FORUM_6010."</h3>". $text_2 .
|
||||
"<h3>".LAN_FORUM_0010."</h3>".$text_3 .
|
||||
"<h3>".LAN_FORUM_6011."</h3>". $text_4 .
|
||||
"<h3>".LAN_FORUM_6012."</h3>". $text_5;
|
||||
}
|
||||
|
||||
$text .= "<div class='center'>".e107::getForm()->pagination(e107::url('forum','index'), LAN_BACK)."</div>";
|
||||
|
||||
$ns -> tablerender(LAN_FORUM_6013, $text);
|
||||
|
||||
}
|
||||
|
||||
function showBar($perc)
|
||||
{
|
||||
return e107::getForm()->progressBar('prog',$perc);
|
||||
}
|
||||
|
||||
|
||||
function topPosters() // from top.php - unused.
|
||||
{
|
||||
$pref = e107::pref('core');
|
||||
$rank = e107::getRank();
|
||||
$sql = e107::getDb();
|
||||
$sql2 = e107::getDb('sql2');
|
||||
$ns = e107::getRender();
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
||||
define('IMAGE_rank_main_admin_image', ($pref['rank_main_admin_image'] && file_exists(THEME."forum/".$pref['rank_main_admin_image']) ? "<img src='".THEME_ABS."forum/".$pref['rank_main_admin_image']."' alt='' />" : "<img src='".e_PLUGIN_ABS."forum/images/".IMODE."/main_admin.png' alt='' />"));
|
||||
define('IMAGE_rank_admin_image', ($pref['rank_admin_image'] && file_exists(THEME."forum/".$pref['rank_admin_image']) ? "<img src='".THEME_ABS."forum/".$pref['rank_admin_image']."' alt='' />" : "<img src='".e_PLUGIN_ABS."forum/images/".IMODE."/admin.png' alt='' />"));
|
||||
define('IMAGE_rank_moderator_image', ($pref['rank_moderator_image'] && file_exists(THEME."forum/".$pref['rank_moderator_image']) ? "<img src='".THEME_ABS."forum/".$pref['rank_moderator_image']."' alt='' />" : "<img src='".e_PLUGIN_ABS."forum/images/".IMODE."/moderator.png' alt='' />"));
|
||||
|
||||
if ($this->subaction == 'forum' || $this->subaction == 'all')
|
||||
{
|
||||
require_once (e_PLUGIN.'forum/forum_class.php');
|
||||
$forum = new e107forum();
|
||||
|
||||
$qry = "
|
||||
SELECT ue.*, u.* FROM `#user_extended` AS ue
|
||||
LEFT JOIN `#user` AS u ON u.user_id = ue.user_extended_id
|
||||
WHERE ue.user_plugin_forum_posts > 0
|
||||
ORDER BY ue.user_plugin_forum_posts DESC LIMIT {$this->from}, {$this->view}
|
||||
";
|
||||
|
||||
// $top_forum_posters = $sql->db_Select("user", "*", "`user_forums` > 0 ORDER BY user_forums DESC LIMIT ".$from.", ".$view."");
|
||||
$text = "
|
||||
<div>
|
||||
<table style='width:95%' class='table table-striped fborder'>
|
||||
<tr>
|
||||
<th style='width:10%; text-align:center' class='forumheader3'> </th>
|
||||
<th style='width:50%' class='forumheader3'>".TOP_LAN_1."</th>
|
||||
<th style='width:10%; text-align:center' class='forumheader3'>".TOP_LAN_2."</th>
|
||||
<th style='width:30%; text-align:center' class='forumheader3'>".TOP_LAN_6."</th>
|
||||
</tr>\n";
|
||||
|
||||
$counter = 1 + $this->from;
|
||||
|
||||
if ($sql2->gen($qry))
|
||||
{
|
||||
while ($row = $sql2->fetch())
|
||||
{
|
||||
//$ldata = get_level($row['user_id'], $row['user_plugin_forum_posts'], $row['user_comments'], $row['user_chats'], $row['user_visits'], $row['user_join'], $row['user_admin'], $row['user_perms'], $pref);
|
||||
$ldata = $rank->getRanks($row, (USER && $forum->isModerator(USERID)));
|
||||
|
||||
if(vartrue($ldata['special']))
|
||||
{
|
||||
$r = $ldata['special'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$r = $ldata['pic'] ? $ldata['pic'] : defset($ldata['name'], $ldata['name']);
|
||||
}
|
||||
|
||||
if(!$r) $r = 'n/a';
|
||||
|
||||
$text .= "<tr>
|
||||
<td style='width:10%; text-align:center' class='forumheader3'>{$counter}</td>
|
||||
<td style='width:50%' class='forumheader3'><a href='".e107::getUrl()->create('user/profile/view', 'id='.$row['user_id'].'&name='.$row['user_name'])."'>{$row['user_name']}</a></td>
|
||||
<td style='width:10%; text-align:center' class='forumheader3'>{$row['user_plugin_forum_posts']}</td>
|
||||
<td style='width:30%; text-align:center' class='forumheader3'>{$r}</td>
|
||||
</tr>";
|
||||
|
||||
$counter++;
|
||||
}
|
||||
}
|
||||
|
||||
$text .= "</table>\n</div>";
|
||||
|
||||
if ($this->subaction == 'forum')
|
||||
{
|
||||
$ftotal = $sql->count('user', '(*)', 'WHERE `user_forums` > 0');
|
||||
$parms = "{$ftotal},{$this->view},{$this->from},".e_SELF.'?[FROM].top.forum.'.$this->view;
|
||||
$text .= "<div class='nextprev'>".$tp->parseTemplate("{NEXTPREV={$parms}}").'</div>';
|
||||
}
|
||||
|
||||
$ns->tablerender(TOP_LAN_0, $text);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function mostActiveTopics() // from top.php - unused.
|
||||
{
|
||||
//require_once (e_HANDLER.'userclass_class.php');
|
||||
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
$ns = e107::getRender();
|
||||
|
||||
require_once (e_PLUGIN.'forum/forum_class.php');
|
||||
$forum = new e107forum();
|
||||
|
||||
$forumList = implode(',', $forum->getForumPermList('view'));
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
t.*, u.user_name, ul.user_name AS user_last, f.forum_name
|
||||
FROM `#forum_thread` as t
|
||||
LEFT JOIN `#forum` AS f ON f.forum_id = t.thread_forum_id
|
||||
LEFT JOIN `#user` AS u ON u.user_id = t.thread_user
|
||||
LEFT JOIN `#user` AS ul ON ul.user_id = t.thread_lastuser
|
||||
WHERE t.thread_forum_id IN ({$forumList})
|
||||
ORDER BY t.thread_views DESC
|
||||
LIMIT
|
||||
{$this->from}, {$this->view}
|
||||
";
|
||||
|
||||
if ($sql->gen($qry))
|
||||
{
|
||||
$text = "<div>\n<table style='width:auto' class='table fborder'>\n";
|
||||
$gen = e107::getDate();
|
||||
|
||||
$text .= "<tr>
|
||||
<th style='width:5%' class='forumheader'> </th>
|
||||
<th style='width:45%' class='forumheader'>".LAN_1."</th>
|
||||
<th style='width:15%; text-align:center' class='forumheader'>".LAN_2."</th>
|
||||
<th style='width:5%; text-align:center' class='forumheader'>".LAN_3."</th>
|
||||
<th style='width:5%; text-align:center' class='forumheader'>".LAN_4."</th>
|
||||
<th style='width:25%; text-align:center' class='forumheader'>".LAN_5."</th>
|
||||
</tr>\n";
|
||||
|
||||
while ($row = $sql->fetch(MYSQL_ASSOC))
|
||||
{
|
||||
if ($row['user_name'])
|
||||
{
|
||||
$POSTER = "<a href='".e107::getUrl()->create('user/profile/view', "name={$row['user_name']}&id={$row['thread_user']}")."'>{$row['user_name']}</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$POSTER = $row['thread_user_anon'];
|
||||
}
|
||||
|
||||
$LINKTOTHREAD = e107::getUrl()->create('forum/thread/view', array('id' =>$row['thread_id'])); //$e107->url->getUrl('forum', 'thread', "func=view&id={$row['thread_id']}");
|
||||
$LINKTOFORUM = e107::getUrl()->create('forum/forum/view', array('id' => $row['thread_forum_id'])); //$e107->url->getUrl('forum', 'forum', "func=view&id={$row['thread_forum_id']}");
|
||||
|
||||
$lastpost_datestamp = $gen->convert_date($row['thread_lastpost'], 'forum');
|
||||
|
||||
if ($row['user_last'])
|
||||
{
|
||||
$LASTPOST = "<a href='".e107::getUrl()->create('user/profile/view', "name={$row['user_last']}&id={$row['thread_lastuser']}")."'>{$row['user_last']}</a><br />".$lastpost_datestamp;
|
||||
}
|
||||
else
|
||||
{
|
||||
$LASTPOST = $row['thread_lastuser_anon'].'<br />'.$lastpost_datestamp;
|
||||
}
|
||||
|
||||
$text .= "<tr>
|
||||
<td style='width:5%; text-align:center' class='forumheader3'><img src='".e_PLUGIN_ABS."forum/images/".IMODE."/new_small.png' alt='' /></td>
|
||||
<td style='width:45%' class='forumheader3'><b><a href='{$LINKTOTHREAD}'>{$row['thread_name']}</a></b> <span class='smalltext'>(<a href='{$LINKTOFORUM}'>{$row['forum_name']}</a>)</span></td>
|
||||
<td style='width:15%; text-align:center' class='forumheader3'>{$POSTER}</td>
|
||||
<td style='width:5%; text-align:center' class='forumheader3'>{$row['thread_views']}</td>
|
||||
<td style='width:5%; text-align:center' class='forumheader3'>{$row['thread_total_replies']}</td>
|
||||
<td style='width:25%; text-align:center' class='forumheader3'>{$LASTPOST}</td>
|
||||
</tr>\n";
|
||||
}
|
||||
|
||||
$text .= "</table>\n</div>";
|
||||
|
||||
$ftotal = $sql->count('forum_thread', '(*)', 'WHERE `thread_parent` = 0');
|
||||
$parms = "{$ftotal},{$this->view},{$this->from},".e_SELF.'?[FROM].active.forum.'.$this->view;
|
||||
$text .= "<div class='nextprev'>".$tp->parseTemplate("{NEXTPREV={$parms}}").'</div>';
|
||||
|
||||
$ns->tablerender(LAN_7, $text, 'nfp');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$frmStats = new forumStats;
|
||||
require_once(HEADERF);
|
||||
$frmStats->init();
|
||||
|
||||
require_once(FOOTERF);
|
||||
?>
|
@@ -469,6 +469,8 @@ function parse_thread($thread_info)
|
||||
|
||||
$tVars->LASTPOSTUSER = $thread_info['lastpost_username']; // $lastpost_name;
|
||||
|
||||
$thread_info['thread_sef'] = eHelper::title2sef($thread_info['thread_name'],'dashl');
|
||||
|
||||
$urlData = array('forum_sef'=>$thread_info['forum_sef'], 'thread_id'=>$thread_info['thread_id'],'thread_sef'=>$thread_info['thread_sef']);
|
||||
$url = e107::url('forum', 'topic', $urlData);
|
||||
$url .= (strpos($url,'?')!==false) ? '&' : '?';
|
||||
@@ -534,6 +536,7 @@ function parse_thread($thread_info)
|
||||
|
||||
// $url = e107::getUrl()->create('forum/thread/view', array('id' => $threadId, 'name' => $thread_name));
|
||||
|
||||
$thread_info['thread_sef'] = eHelper::title2sef($thread_info['thread_name'],'dashl');
|
||||
$url = e107::url('forum','topic', $thread_info);
|
||||
$tVars->THREADNAME = "<a {$title} href='".$url."'>{$thread_name}</a>";
|
||||
|
||||
@@ -793,6 +796,7 @@ function fpages($thread_info, $replies)
|
||||
global $forum;
|
||||
|
||||
$pages = ceil(($replies)/$forum->prefs->get('postspage'));
|
||||
$thread_info['thread_sef'] = eHelper::title2sef($thread_info['thread_name'],'dashl');
|
||||
$urlparms = $thread_info;
|
||||
|
||||
if ($pages > 1)
|
||||
|
@@ -86,7 +86,7 @@ $FORUM_TEMPLATE['main-start'] = "{FORUM_BREADCRUMB}
|
||||
{SEARCH}
|
||||
</div>
|
||||
</div>
|
||||
<div >
|
||||
<div id='forum' >
|
||||
<table class='table table-striped table-bordered table-hover'>
|
||||
<colgroup>
|
||||
<col style='width:3%' />
|
||||
@@ -115,7 +115,8 @@ $FORUM_TEMPLATE['main-forum'] = "<tr>
|
||||
<td class='hidden-xs'><small>{LASTPOSTUSER} {LASTPOSTDATE}</small></td>
|
||||
</tr>";
|
||||
|
||||
$FORUM_TEMPLATE['main-end'] = "</table></div>";
|
||||
$FORUM_TEMPLATE['main-end'] = "</table><div class='center'><small>{USERINFOX}</small></div></div>";
|
||||
|
||||
/*
|
||||
$FORUM_TEMPLATE['main-end'] .= "
|
||||
|
||||
|
32
top.php
32
top.php
@@ -72,18 +72,18 @@ if ($action == 'active')
|
||||
{$from}, {$view}
|
||||
";
|
||||
|
||||
if ($sql->db_Select_gen($qry))
|
||||
if ($sql->gen($qry))
|
||||
{
|
||||
$text = "<div style='text-align:center'>\n<table style='width:auto' class='fborder'>\n";
|
||||
$gen = e107::getDateConvert();
|
||||
$text = "<div>\n<table style='width:auto' class='table fborder'>\n";
|
||||
$gen = e107::gethateConvert();
|
||||
|
||||
$text .= "<tr>
|
||||
<td style='width:5%' class='forumheader'> </td>
|
||||
<td style='width:45%' class='forumheader'>".LAN_1."</td>
|
||||
<td style='width:15%; text-align:center' class='forumheader'>".LAN_2."</td>
|
||||
<td style='width:5%; text-align:center' class='forumheader'>".LAN_3."</td>
|
||||
<td style='width:5%; text-align:center' class='forumheader'>".LAN_4."</td>
|
||||
<td style='width:25%; text-align:center' class='forumheader'>".LAN_5."</td>
|
||||
<th style='width:5%' class='forumheader'> </th>
|
||||
<th style='width:45%' class='forumheader'>".LAN_1."</th>
|
||||
<th style='width:15%; text-align:center' class='forumheader'>".LAN_2."</th>
|
||||
<th style='width:5%; text-align:center' class='forumheader'>".LAN_3."</th>
|
||||
<th style='width:5%; text-align:center' class='forumheader'>".LAN_4."</th>
|
||||
<th style='width:25%; text-align:center' class='forumheader'>".LAN_5."</th>
|
||||
</tr>\n";
|
||||
|
||||
while ($row = $sql->db_Fetch(MYSQL_ASSOC))
|
||||
@@ -155,17 +155,17 @@ if ($action == 'top')
|
||||
";
|
||||
// $top_forum_posters = $sql->db_Select("user", "*", "`user_forums` > 0 ORDER BY user_forums DESC LIMIT ".$from.", ".$view."");
|
||||
$text = "
|
||||
<div style='text-align:center'>
|
||||
<table style='width:95%' class='fborder'>
|
||||
<div>
|
||||
<table style='width:95%' class='table table-striped fborder'>
|
||||
<tr>
|
||||
<td style='width:10%; text-align:center' class='forumheader3'> </td>
|
||||
<td style='width:50%' class='forumheader3'>".TOP_LAN_1."</td>
|
||||
<td style='width:10%; text-align:center' class='forumheader3'>".TOP_LAN_2."</td>
|
||||
<td style='width:30%; text-align:center' class='forumheader3'>".TOP_LAN_6."</td>
|
||||
<th style='width:10%; text-align:center' class='forumheader3'> </th>
|
||||
<th style='width:50%' class='forumheader3'>".TOP_LAN_1."</th>
|
||||
<th style='width:10%; text-align:center' class='forumheader3'>".TOP_LAN_2."</th>
|
||||
<th style='width:30%; text-align:center' class='forumheader3'>".TOP_LAN_6."</th>
|
||||
</tr>\n";
|
||||
$counter = 1 + $from;
|
||||
$sql2 = e107::getDb('sql2');
|
||||
if ($sql2->db_Select_gen($qry))
|
||||
if ($sql2->gen($qry))
|
||||
{
|
||||
while ($row = $sql2->db_Fetch(MYSQL_ASSOC))
|
||||
{
|
||||
|
Reference in New Issue
Block a user