Dopple-As
(25)
PHP-Fusion: v7.02.07
Beiträge: 122
Registriert am: 08.03.2012
Geschlecht:
Alter: 32
Stimmung:
|
I need onlu status code to forum theart panel not panel code
Zusammengefügt am 22. August 2012 10:35:17:
i add here my forum theart list panel can you add status code?
Code <?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2007 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
/*---------------------------------------------------+
| Advanced Forum Threads List Panel - (AFTLP)
+----------------------------------------------------+
| Modder: Shedrock / Xandra - Fuzed Themes
| Special Credit: Xandra - Thank you for all your help
| Support: http://phpfusion-...
|----------------------------------------------------+
| Converted to PHP-Fusion v7 by Smokeman
| PHPFusion-Tips.dk
| Website: http://www.phpfus...
| Optimisation & Additional Love: moozaad
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (file_exists(INFUSIONS."forum_threads_list_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."forum_threads_list_panel/locale/".$settings['locale'].".php";
} else { include INFUSIONS."forum_threads_list_panel/locale/English.php"; }
require(LOCALE.LOCALESET."forum/main.php");
if (!isset($lastvisited) || !isnum($lastvisited)) $lastvisited = time();
$min = 5; // minimum visible posts in first level.
$max = 10; // maximum number of posts in second level (hidden).
echo "<script type='text/javascript' language='JavaScript' src='".INFUSIONS."forum_threads_list_panel/ft_boxover.js'></script>";
$imageold = get_image("folder",$locale['561'],"",$locale['561']);
$imagenew = get_image("foldernew",$locale['560'],"",$locale['560']);
//$imagelocked = get_image("folderlock",$locale['564'],"",$locale['564']);
//$imagehot = get_image("folderhot");//THEME."forum/folderhot.gif"; //DOESN'T EXIST ANYMORE
/*******************************************************************
* Start use with the BlueIce Theme for cellpic image
********************************************************************/
if (isset($userdata['user_theme']) && $userdata['user_theme'] != "Default" && file_exists(THEMES.$userdata['user_theme']."/theme.php")) {
$theme = $userdata['user_theme'];
} else { $theme = $settings['theme']; }
$class = $theme == "BlueIce" ? "td" : "tbl2";
/*******************************************************************
* End use with the BlueIce Theme for cellpic image
********************************************************************/
$result = dbquery(
"SELECT
tf.forum_name,tf.forum_id,
tt.thread_id,tt.thread_locked,tt.thread_subject,tt.thread_author,tt.thread_views,
tt.thread_lastpost,tt.thread_lastuser, tt.thread_postcount, tt.thread_lastpostid as last_id,
if(tt.thread_lastpost>$lastvisited,1,0) as new_post,
tu.user_id, tu.user_name as user_name,
tau.user_name as author,
tp.post_message, tp.post_smileys
FROM ".DB_THREADS." tt
INNER JOIN ".DB_FORUMS." tf USING(forum_id)
INNER JOIN ".DB_POSTS." tp USING(thread_id)
INNER JOIN ".DB_USERS." tu ON tt.thread_lastuser=tu.user_id
INNER JOIN ".DB_USERS." tau ON tt.thread_author=tau.user_id
WHERE ".groupaccess('forum_access')."
AND tt.thread_lastpostid = tp.post_id
ORDER BY tt.thread_lastpost DESC LIMIT ".($min + $max)
);
if (dbrows($result) != 0) {
$i = 0;
opentable("<img class='p-img' src='".THEME."images/title/forum_threads_list_panel.png' alt='' />".$locale['ftl100']."");
echo "<table style='width:100%; empty-cells:hide; border-spacing:1px;' class='tbl-border2 forum_table'>
<tr>
<td align='center' class='$class' height='24'> </td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl120']."</b></span></td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl124']."</b></span></td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl123']."</b></span></td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl107']."</b></span></td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl108']."</b></span></td>
</tr>\n";
while ($data = dbarray($result)) {
if ($i == $min) {
echo "</table><br />
<div align='left'>
<img src='".INFUSIONS."forum_threads_list_panel/images/icon_displaymore.gif' alt='' /> <a href=\"javascript:void(0)\" onclick=\"toggle_smt();\"><span id='show_more_threads_text'><b>".$locale['ftl113']."</b></span></a>
</div>
<div id='show_more_threads' style='display: none;'><br />
<table style='width:100%; empty-cells:hide; border-spacing:1px;' class='tbl-border2 forum_table'>
<tr>
<td align='center' class='tbl1' height='24'> </td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl120']."</b></span></td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl124']."</b></span></td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl123']."</b></span></td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl107']."</b></span></td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl108']."</b></span></td>
</tr>\n";
}
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
$post_message = trimlink($data['post_message'],250);
if($data['post_smileys'])$post_message=parsesmileys($post_message);
$post_message = phpentities(nl2br(parseubb($post_message)));
//.93|1234180289|8 - thread_id | time | forum_id
if ($data['new_post']){
$thread_match = $data['thread_id']."|".$data['thread_lastpost']."|".$data['forum_id'];
if (iMEMBER && strpos($userdata['user_threads'],$thread_match)!==FALSE){//preg_match("(^\.{$thread_match}$|\.{$thread_match}\.|\.{$thread_match}$)", $userdata['user_threads'])) {
$folder_image = $imageold;
}else $folder_image = $imagenew;
}else $folder_image = $imageold;
echo "<tr>
<td align='center' class='$row_color'>$folder_image</td>
<td width='35%' class='$row_color'>
<span class='small'><strong>".$data['forum_name']."</strong></span><br />
<span class='small forum_thread_title'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title=\"header=[ ".str_replace("]", "]]", str_replace("[", "[[", trimlink($data['thread_subject'], 30)))."] body=[".str_replace("]", "]]", str_replace("[", "[[", $post_message))."] delay=[0] fade=[on]\">".trimlink($data['thread_subject'], 30)."</a></span>
</td>
<td align='center' class='$row_color'><a href='".BASEDIR."profile.php?lookup=".$data['thread_author']."'>".$data['author']."</a></td>
<td align='center' width='40' class='$row_color'><span class='small'>".$data['thread_views']."</span></td>
<td align='center' width='45' class='$row_color'><span class='small'>".($data['thread_postcount']-1)."</span></td>
<td align='center' width='25%' class='$row_color'>
<span class='small'>".showdate("forumdate", $data['thread_lastpost'])."</span><br />
<span class='small'><a href='".BASEDIR."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_name']."</a></span><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$locale['ftl125']."'><img src='".INFUSIONS."forum_threads_list_panel/images/icon_minipost_new.gif' alt='' border='0' /></a>
</td>
</tr>\n";
$i ++;
}
if ($i > $min) { echo "</table><br /><script type='text/javascript'>
<!--
function toggle_smt() {
var smt = document.getElementById('show_more_threads');
var smttxt = document.getElementById('show_more_threads_text');
if (smt.style.display == 'none') {
smt.style.display = 'block';
smttxt.innerHTML = '".$locale['ftl114']."';
} else {
smt.style.display = 'none';
smttxt.innerHTML = '".$locale['ftl113']."';
}
}
//-->
</script></div>\n"; }
else { echo "</table><br />\n"; }
}
if (iMEMBER) {
echo "<hr /><p style='text-align:center; vertical-align:middle; margin-top: 6px;'>
<img src='".BASEDIR."infusions/forum_threads_list_panel/images/icon_threads.gif' alt='' border='0' /> <span class='small'><a href='".INFUSIONS."forum_threads_list_panel/my_threads.php'>".$locale['ftl110']."</a></span>
<img src='".BASEDIR."infusions/forum_threads_list_panel/images/icon_threads.gif' alt='' border='0' /> <span class='small'><a href='".INFUSIONS."forum_threads_list_panel/my_posts.php'>".$locale['ftl111']."</a></span>
<img src='".BASEDIR."infusions/forum_threads_list_panel/images/icon_threads.gif' alt='' border='0' /> <span class='small'><a href='".INFUSIONS."forum_threads_list_panel/newposts.php'>".$locale['ftl112']."</a></span></p>";
}
closetable();
?>
Zusammengefügt am 22. August 2012 10:35:49:
Code <?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2007 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
/*---------------------------------------------------+
| Advanced Forum Threads List Panel - (AFTLP)
+----------------------------------------------------+
| Modder: Shedrock / Xandra - Fuzed Themes
| Special Credit: Xandra - Thank you for all your help
| Support: http://phpfusion-...
|----------------------------------------------------+
| Converted to PHP-Fusion v7 by Smokeman
| PHPFusion-Tips.dk
| Website: http://www.phpfus...
| Optimisation & Additional Love: moozaad
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (file_exists(INFUSIONS."forum_threads_list_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."forum_threads_list_panel/locale/".$settings['locale'].".php";
} else { include INFUSIONS."forum_threads_list_panel/locale/English.php"; }
require(LOCALE.LOCALESET."forum/main.php");
if (!isset($lastvisited) || !isnum($lastvisited)) $lastvisited = time();
$min = 5; // minimum visible posts in first level.
$max = 10; // maximum number of posts in second level (hidden).
echo "<script type='text/javascript' language='JavaScript' src='".INFUSIONS."forum_threads_list_panel/ft_boxover.js'></script>";
$imageold = get_image("folder",$locale['561'],"",$locale['561']);
$imagenew = get_image("foldernew",$locale['560'],"",$locale['560']);
//$imagelocked = get_image("folderlock",$locale['564'],"",$locale['564']);
//$imagehot = get_image("folderhot");//THEME."forum/folderhot.gif"; //DOESN'T EXIST ANYMORE
/*******************************************************************
* Start use with the BlueIce Theme for cellpic image
********************************************************************/
if (isset($userdata['user_theme']) && $userdata['user_theme'] != "Default" && file_exists(THEMES.$userdata['user_theme']."/theme.php")) {
$theme = $userdata['user_theme'];
} else { $theme = $settings['theme']; }
$class = $theme == "BlueIce" ? "td" : "tbl2";
/*******************************************************************
* End use with the BlueIce Theme for cellpic image
********************************************************************/
$result = dbquery(
"SELECT
tf.forum_name,tf.forum_id,
tt.thread_id,tt.thread_locked,tt.thread_subject,tt.thread_author,tt.thread_views,
tt.thread_lastpost,tt.thread_lastuser, tt.thread_postcount, tt.thread_lastpostid as last_id,
if(tt.thread_lastpost>$lastvisited,1,0) as new_post,
tu.user_id, tu.user_name as user_name,
tau.user_name as author,
tp.post_message, tp.post_smileys
FROM ".DB_THREADS." tt
INNER JOIN ".DB_FORUMS." tf USING(forum_id)
INNER JOIN ".DB_POSTS." tp USING(thread_id)
INNER JOIN ".DB_USERS." tu ON tt.thread_lastuser=tu.user_id
INNER JOIN ".DB_USERS." tau ON tt.thread_author=tau.user_id
WHERE ".groupaccess('forum_access')."
AND tt.thread_lastpostid = tp.post_id
ORDER BY tt.thread_lastpost DESC LIMIT ".($min + $max)
);
if (dbrows($result) != 0) {
$i = 0;
opentable("<img class='p-img' src='".THEME."images/title/forum_threads_list_panel.png' alt='' />".$locale['ftl100']."");
echo "<table style='width:100%; empty-cells:hide; border-spacing:1px;' class='tbl-border2 forum_table'>
<tr>
<td align='center' class='$class' height='24'> </td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl120']."</b></span></td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl124']."</b></span></td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl123']."</b></span></td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl107']."</b></span></td>
<td align='center' class='$class'><span class='small'><b>".$locale['ftl108']."</b></span></td>
</tr>\n";
while ($data = dbarray($result)) {
if ($i == $min) {
echo "</table><br />
<div align='left'>
<img src='".INFUSIONS."forum_threads_list_panel/images/icon_displaymore.gif' alt='' /> <a href=\"javascript:void(0)\" onclick=\"toggle_smt();\"><span id='show_more_threads_text'><b>".$locale['ftl113']."</b></span></a>
</div>
<div id='show_more_threads' style='display: none;'><br />
<table style='width:100%; empty-cells:hide; border-spacing:1px;' class='tbl-border2 forum_table'>
<tr>
<td align='center' class='tbl1' height='24'> </td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl120']."</b></span></td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl124']."</b></span></td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl123']."</b></span></td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl107']."</b></span></td>
<td align='center' class='tbl1'><span class='small'><b>".$locale['ftl108']."</b></span></td>
</tr>\n";
}
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
$post_message = trimlink($data['post_message'],250);
if($data['post_smileys'])$post_message=parsesmileys($post_message);
$post_message = phpentities(nl2br(parseubb($post_message)));
//.93|1234180289|8 - thread_id | time | forum_id
if ($data['new_post']){
$thread_match = $data['thread_id']."|".$data['thread_lastpost']."|".$data['forum_id'];
if (iMEMBER && strpos($userdata['user_threads'],$thread_match)!==FALSE){//preg_match("(^\.{$thread_match}$|\.{$thread_match}\.|\.{$thread_match}$)", $userdata['user_threads'])) {
$folder_image = $imageold;
}else $folder_image = $imagenew;
}else $folder_image = $imageold;
echo "<tr>
<td align='center' class='$row_color'>$folder_image</td>
<td width='35%' class='$row_color'>
<span class='small'><strong>".$data['forum_name']."</strong></span><br />
<span class='small forum_thread_title'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title=\"header=[ ".str_replace("]", "]]", str_replace("[", "[[", trimlink($data['thread_subject'], 30)))."] body=[".str_replace("]", "]]", str_replace("[", "[[", $post_message))."] delay=[0] fade=[on]\">".trimlink($data['thread_subject'], 30)."</a></span>
</td>
<td align='center' class='$row_color'><a href='".BASEDIR."profile.php?lookup=".$data['thread_author']."'>".$data['author']."</a></td>
<td align='center' width='40' class='$row_color'><span class='small'>".$data['thread_views']."</span></td>
<td align='center' width='45' class='$row_color'><span class='small'>".($data['thread_postcount']-1)."</span></td>
<td align='center' width='25%' class='$row_color'>
<span class='small'>".showdate("forumdate", $data['thread_lastpost'])."</span><br />
<span class='small'><a href='".BASEDIR."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_name']."</a></span><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$locale['ftl125']."'><img src='".INFUSIONS."forum_threads_list_panel/images/icon_minipost_new.gif' alt='' border='0' /></a>
</td>
</tr>\n";
$i ++;
}
if ($i > $min) { echo "</table><br /><script type='text/javascript'>
<!--
function toggle_smt() {
var smt = document.getElementById('show_more_threads');
var smttxt = document.getElementById('show_more_threads_text');
if (smt.style.display == 'none') {
smt.style.display = 'block';
smttxt.innerHTML = '".$locale['ftl114']."';
} else {
smt.style.display = 'none';
smttxt.innerHTML = '".$locale['ftl113']."';
}
}
//-->
</script></div>\n"; }
else { echo "</table><br />\n"; }
}
if (iMEMBER) {
echo "<hr /><p style='text-align:center; vertical-align:middle; margin-top: 6px;'>
<img src='".BASEDIR."infusions/forum_threads_list_panel/images/icon_threads.gif' alt='' border='0' /> <span class='small'><a href='".INFUSIONS."forum_threads_list_panel/my_threads.php'>".$locale['ftl110']."</a></span>
<img src='".BASEDIR."infusions/forum_threads_list_panel/images/icon_threads.gif' alt='' border='0' /> <span class='small'><a href='".INFUSIONS."forum_threads_list_panel/my_posts.php'>".$locale['ftl111']."</a></span>
<img src='".BASEDIR."infusions/forum_threads_list_panel/images/icon_threads.gif' alt='' border='0' /> <span class='small'><a href='".INFUSIONS."forum_threads_list_panel/newposts.php'>".$locale['ftl112']."</a></span></p>";
}
closetable();
?>
Bearbeitet von DeeoNe am 22-08-2012 18:37
Best regards ilblud.
|