Początkujący
Postów: 105 Ostrzeżeń: 4
Data rejestracji: 20.02.2008 20:34
|
Jak zrobić aby w InfoPanel - " Najnowsze posty ° usunąć ilość czytań posta.
Teraz mam: nazwa_posta [5 / 30]
pogrubione chciałbym usunąć.
<?php
/*--------------------------------------------------------------------------+
| MOD: eXtreme InfoPanel dla PHP-Fusion v6
|---------------------------------------------
| author: eXtreme-fusion crew - (c) 2005
| web: http://extreme-fusion.pl
|---------------------------------------------
| Wycinanie kodu poza eXtreme-pack zabrionione.
| Jeśli po kopiowaniu coś nie działa - miej pretensje do siebie.
+--------------------------------------------------------------------------*/
@include "../../config.php";
include "../../maincore.php";
include BASEDIR."subheader.php";
include LOCALE.LOCALESET."forum/main.php";
include BASEDIR."side_left.php";
if (file_exists(INFUSIONS."info_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."info_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."info_panel/locale/English.php";
}
if (empty($lastvisited)) { $lastvisited = time(); }
$fcdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."forums WHERE forum_id='".$data['forum_cat']."'"));
$caption .= $fcdata['forum_name']."".$locale['XXX_015']."";
opentable($locale['450']);
echo "<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td class='smallalt'>
<a href='".FORUM."index.php'>".$settings['sitename']."</a> |
$caption</td>\n";
echo "</tr>
</table>\n";
$rows = dbrows(dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_sticky='0'"));
if (!$rowstart) $rowstart = 0;
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?forum_id=$forum_id&")."
</div>\n";
echo "<table cellspacing='0' cellpadding='0' border='0' width='100%' class='tbl-border'>
<tr>
<td>
<table border='0' cellspacing='1' cellpadding='0' width='100%'>
<tr>
<td width='20' class='tbl2'> </td>
<td class='tbl2'>".$locale['451']."</td>
<td width='100' class='tbl2'>".$locale['452']."</td>
<td align='center' width='50' class='tbl2'>".$locale['453']."</td>
<td align='center' width='50' class='tbl2'>".$locale['454']."</td>
<td width='120' class='tbl2'>".$locale['404']."</td>
</tr>\n";
if ($rowstart == 0) {
$result = dbquery(
"SELECT ".$db_prefix."threads.*, tu1.user_name as user_author, tu2.user_name as user_lastuser FROM ".$db_prefix."threads
LEFT JOIN ".$db_prefix."users tu1 ON ".$db_prefix."threads.thread_author = tu1.user_id
LEFT JOIN ".$db_prefix."users tu2 ON ".$db_prefix."threads.thread_lastuser = tu2.user_id
WHERE thread_sticky='1' ORDER BY thread_lastpost DESC"
);
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$new_posts = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."' and post_datestamp>'$lastvisited'");
$thread_replies = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'") - 1;
$forum_id = $data['forum_id'];
if ($data['thread_locked']) {
echo "<tr>\n<td align='center' width='25' class='tbl1'><img src='".THEME."forum/folderlock.gif'></td>";
} else {
if ($new_posts > 0) {
$folder = "<img src='".THEME."forum/foldernew.gif'>";
} else if ($new_posts > 19) {
$folder = "<img src='".THEME."forum/folderhot.gif'>";
} else {
$folder = "<img src='".THEME."forum/folder.gif'>";
}
echo "<tr>\n<td align='center' width='25' class='tbl2'>$folder</td>";
}
echo "<td class='tbl2'><img src='".THEME."forum/stickythread.gif'>
<a href='".FORUM."viewthread.php?forum_id=$forum_id&thread_id=".$data['thread_id']."'>".$data['thread_subject']."</a></td>
<td class='tbl2' align='right'><a href='".BASEDIR."profile.php?lookup=".$data['thread_author']."'>".$data['user_author']."</a></td>
<td align='center' class='tbl1'>".$data['thread_views']."</td><td class='tbl1' align='center'>".$thread_replies."</td>
<td class='tbl1'><span class='small_date'>".showdate("forumdate", $data['thread_lastpost'])."</span><br>
<span class='small'>".$locale['406']."<a href='".BASEDIR."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_lastuser']."</a></span></td>
</tr>\n";
}
} else {
$threadcount = 0;
}
}
if ($rows != 0) {
$result = dbquery(
"SELECT ".$db_prefix."threads.*, tu1.user_name as user_author, tu2.user_name as user_lastuser FROM ".$db_prefix."threads
LEFT JOIN ".$db_prefix."users tu1 ON ".$db_prefix."threads.thread_author = tu1.user_id
LEFT JOIN ".$db_prefix."users tu2 ON ".$db_prefix."threads.thread_lastuser = tu2.user_id
WHERE thread_sticky='0' ORDER BY thread_lastpost DESC LIMIT $rowstart,20"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$new_posts = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."' and post_datestamp>'$lastvisited'");
$thread_replies = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'") - 1;
$forum_id = $data['forum_id'];
if ($data['thread_locked']) {
echo "<tr>\n<td align='center' width='25' class='tbl2'><img src='".THEME."forum/folderlock.gif'></td>";
} else {
if ($new_posts > 0) {
$folder = "<img src='".THEME."forum/foldernew.gif'>";
} else if ($new_posts > 19) {
$folder = "<img src='".THEME."forum/folderhot.gif'>";
} else {
$folder = "<img src='".THEME."forum/folder.gif'>";
}
echo "<tr>
<td align='center' width='25' class='tbl2'>$folder</td>";
}
$reps = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'");
$reps = ceil($reps / 20);
$threadsubject = "<a href='".FORUM."viewthread.php?forum_id=$forum_id&thread_id=".$data['thread_id']."'>".$data['thread_subject']."</a>";
if ($reps > 1) {
$ctr = 0; $ctr2 = 1; $pages = "";
while ($ctr2 <= $reps) {
$pnum = "<a href='".FORUM."viewthread.php?forum_id=$forum_id&thread_id=".$data['thread_id']."&rowstart=$ctr'>$ctr2</a> ";
$pages = $pages.$pnum; $ctr = $ctr+20; $ctr2++;
}
$threadsubject .= " - (Page: ".trim($pages).")";
}
echo "<td class='tbl1'>$threadsubject</td>
<td class='tbl2' align='right'><a href='".BASEDIR."profile.php?lookup=".$data['thread_author']."'>".$data['user_author']."</a></td>
<td align='center' class='tbl1'>".$data['thread_views']."</td><td class='tbl1' align='center'>".$thread_replies."</td>
<td class='tbl1'><span class='small_date'>".showdate("forumdate", $data['thread_lastpost'])."</span><br>
<span class='small'>".$locale['406']."<a href='".BASEDIR."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_lastuser']."</a></span></td>
</tr>\n";
}
} else {
if ($threadcount == 0) {
echo "<tr>\n<td colspan='6' class='tbl1'>".$locale['455']."</td>\n</tr>\n";
}
}
echo "</table>
</td>
</tr>
</table>\n";
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?forum_id=$forum_id&")."
</div>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='tbl1'>
<img src='".THEME."forum/foldernew.gif'> - ".$locale['456']."(<img src='".THEME."forum/folderhot.gif'> - ".$locale['457'].")<br>
<img src='".THEME."forum/folder.gif'> - ".$locale['458']."<br>
<img src='".THEME."forum/folderlock.gif'> - ".$locale['459']."</td>
</tr>
</table>\n";
closetable();
include BASEDIR."side_right.php";
include BASEDIR."footer.php";
?>
Czy da radę to zrobić?
to chyba jednak ten kod:
<?
/*--------------------------------------------------------------------------+
| MOD: eXtreme InfoPanel dla PHP-Fusion v6
|---------------------------------------------
| author: eXtreme-fusion crew - (c) 2005
| web: http://extreme-fusion.pl
|---------------------------------------------
| Wycinanie kodu poza eXtreme-pack zabrionione.
| Jeśli po kopiowaniu coś nie działa - miej pretensje do siebie.
+--------------------------------------------------------------------------*/
echo "<script type='text/javascript' src='".INFUSIONS."info_panel/javascript/gpe.js' language='Javascript'></script>";
if (file_exists(INFUSIONS."info_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."info_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."info_panel/locale/English.php";
}
include LOCALE.LOCALESET."search.php";
opentable($locale['XXX_001']);
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr><td width='32%' valign='top'>";
echo "<div class='scapmain'>
<center><b> ° <a href='".INFUSIONS."info_panel/members.php'> ".$locale['XXX_002']."</a> ° </b></center>
</div>\n";
$result=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 0,9");
if(dbrows($result)!=0){
while($data=dbarray($result)){
$lastseen=time()-$data[user_lastvisit];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if($lastseen<60){
$lastseen="<nobr><font color='green'><b>OnLine</b></font></NOBR>";
}elseif($lastseen<360){
$lastseen="<nobr><font color='red'><b>OffLine</b></font></NOBR>";
}elseif($iW>0){
if($iW==1) $Text="".$locale['XXX_007']."";
elseif($iW==2 || $iW==3 || $iW==4) $Text="".$locale['XXX_011']."";
else $Text="".$locale['XXX_008']."";
$lastseen="<nobr>$iW $Text</NOBR>";
}elseif($iD>0){
if($iD==1) $Text="".$locale['XXX_009']."";
else $Text="".$locale['XXX_010']."";
$lastseen="<NOBR>$iD $Text</NOBR>";
}else{
$lastseen="$iH:$iM:$iS";
}
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>
<a href='".BASEDIR."profile.php?lookup=$data[user_id]'
onmouseover=\"gpe('text:<center><b>° ".$locale['XXX_017']." °</b></center><hr><b>".$locale['XXX_003'].":</b> ".$data['user_name']."<br><b>".$locale['XXX_004']."</b>: ".$data['user_location']."<br><b>".$locale['XXX_005'].":</b> ".$data['user_msn']."<br><b>".$locale['XXX_006'].":</b> ".$data['user_posts'].";')\">";
if ($data[user_level] == "103") {
$user = "<font color='#F75013'><b>@$data[user_name]</b></font>";
} else if ($data[user_level] == "102") {
$user = "<font color='#B5DE21'><b>^$data[user_name]</b></font>";
} else if ($data[user_level] == "101") {
$user = "~$data[user_name]";
}
echo "$user</a></td><td align=\"right\">".$lastseen."</td></tr></table>";
}
}
echo "</td><td width='2%' valign='top' align='left'></td><td width='32%' valign='top' align='left'><div class='scapmain'>
<center><b> ° <a href='".INFUSIONS."info_panel/newest_posts.php'>".$locale['XXX_015']."</a> ° </b></center>
</div>\n";
$result = dbquery(
"SELECT tf.*, tt.*, tu.user_id,user_name FROM ".$db_prefix."forums tf
INNER JOIN ".$db_prefix."threads tt USING(forum_id)
INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
".$usr_grps." ORDER BY thread_lastpost DESC LIMIT 0,8");
if (dbrows($result) != 0) {
$i=0;
if ($theme_width == "100%") echo "\n";
while ($data = dbarray($result)) {
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl1"; }
$new_posts = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."' and post_datestamp>'$lastvisited'");
$thread_replies = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'") - 1;
$forum_id = $data['forum_id'];
if ($new_posts > 0) {
$folder123 = "<img src='".THEME."forum/foldernew.gif' height='11'>";
} else if ($new_posts > 19) {
$folder123 = "<img src='".THEME."forum/folderhot.gif' height='11'>";
} else {
if ($data['thread_locked'] == 1) {
$folder123 = "<img src='".THEME."forum/folderlock.gif' height='11'>";
} else if ($data['thread_locked'] == 0) {
$folder123 = "<img src='".THEME."forum/folder.gif' height='11'>";
}
}
$reply_count = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'");
$data2 = dbarray(dbquery("SELECT post_id FROM ".$db_prefix."posts WHERE thread_id='".$data['thread_id']."' ORDER BY post_id DESC LIMIT 1"));
$threads_message = $data['thread_subject'];
$threads_message = strtr($threads_message, "'", "");
$rstart = ($reply_count > 20 ? "rowstart=".((ceil($reply_count / 20)-1)*20)."&" : "");
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"left\" width='65%'>";
if ($theme_width == "100%") {
echo "$folder123 <a href='".FORUM."viewthread.php?".$rstart."forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."#".$data2['post_id']."' onmouseover=\"gpe('text:<center><b>° ".$locale['XXX_017']." °</b></center><hr><b>".$locale['XXX_019']."</b>: ".$threads_message."<hr><b>".$locale['XXX_020']."</b> ".($reply_count - 1)."/".$data['thread_views']."<br><b>".$locale['XXX_021']."</b> ".$data['user_name']."<br><b>".$locale['XXX_022']."</b> ".showdate("forumdate", $data['thread_lastpost']).";')\"'>".trimlink($data['thread_subject'], 16)."</a><br></td>\n";
echo "<td align=\"right\" width='35%'>[".($reply_count - 1)." / ".$data['thread_views']."]</td>";
} else {
echo "$folder123 <a href='".FORUM."viewthread.php?".$rstart."forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."#".$data2['post_id']."' onmouseover=\"gpe('text:<center><b>° ".$locale['XXX_017']." °</b></center><hr><b>".$locale['XXX_019']."</b> ".trimlink($data['thread_subject'], 45)."<hr><b>".$locale['XXX_020']."</b> ".($reply_count - 1)."/".$data['thread_views']."<br><b>".$locale['XXX_021']."</b> ".$data['user_name']."<br><b>".$locale['XXX_022']."</b> ".showdate("forumdate", $data['thread_lastpost']).";')\" (".$data['forum_name'].")'>".trimlink($data['thread_subject'], 16)."</a><br></td>\n";
echo "<td align=\"right\" width='35%'>[".($reply_count - 1)." / ".$data['thread_views']."]</td>";
}
echo "</tr></table>";
$i++;
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo "</td><td width='2%' valign='top' align='left'></td><td width='32%' valign='top' align='right'>
<div class='scapmain'><center><b>° <a href='".INFUSIONS."info_panel/hottest_threads.php'>".$locale['022']."</a> °</b></center></div>\n";
$result = dbquery(
"SELECT tf.*, tt.*, tu.user_id,user_name FROM ".$db_prefix."forums tf
INNER JOIN ".$db_prefix."threads tt USING(forum_id)
INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
".$usr_grps." ORDER BY thread_views DESC LIMIT 0,8");
if (dbrows($result) != 0) {
$i=0;
if ($theme_width == "100%") echo "\n";
while ($data = dbarray($result)) {
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl1"; }
$new_posts = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."' and post_datestamp>'$lastvisited'");
$thread_replies = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'") - 1;
$forum_id = $data['forum_id'];
if ($new_posts > 0) {
$folder123 = "<img src='".THEME."forum/foldernew.gif' height='11'>";
} else if ($new_posts > 19) {
$folder123 = "<img src='".THEME."forum/folderhot.gif' height='11'>";
} else {
if ($data['thread_locked'] == 1) {
$folder123 = "<img src='".THEME."forum/folderlock.gif' height='11'>";
} else if ($data['thread_locked'] == 0) {
$folder123 = "<img src='".THEME."forum/folder.gif' height='11'>";
}
}
$reply_count = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'");
$data2 = dbarray(dbquery("SELECT post_id FROM ".$db_prefix."posts WHERE thread_id='".$data['thread_id']."' ORDER BY post_id DESC LIMIT 1"));
$rstart = ($reply_count > 20 ? "rowstart=".((ceil($reply_count / 20)-1)*20)."&" : "");
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"left\" width='75%'>";
if ($theme_width == "100%") {
echo "$folder123 <a href='".FORUM."viewthread.php?".$rstart."forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."#".$data2['post_id']."' onmouseover=\"gpe('text:<center><b>° ".$locale['XXX_017']." °</b></center><hr><b>".$locale['XXX_019']."</b>: ".trimlink($data['thread_subject'], 45)."<hr><b>".$locale['XXX_020']."</b> ".($reply_count - 1)."/".$data['thread_views']."<br><b>".$locale['XXX_021']."</b> ".$data['user_name']."<br><b>".$locale['XXX_022']."</b> ".showdate("forumdate", $data['thread_lastpost']).";')\"'>".trimlink($data['thread_subject'], 16)."</a><br></td>\n";
echo "<td align=\"right\" width='25%'>[".$data['thread_views']."]</td>";
} else {
echo "$folder123 <a href='".FORUM."viewthread.php?".$rstart."forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."#".$data2['post_id']."' onmouseover=\"gpe('text:<center><b>° ".$locale['XXX_017']." °</b></center><hr><b>".$locale['XXX_019']."</b> ".trimlink($data['thread_subject'], 45)."<hr><b>".$locale['XXX_020']."</b> ".($reply_count - 1)."/".$data['thread_views']."<br><b>".$locale['XXX_021']."</b> ".$data['user_name']."<br><b>".$locale['XXX_022']."</b> ".showdate("forumdate", $data['thread_lastpost']).";')\" (".$data['forum_name'].")'>".trimlink($data['thread_subject'], 16)."</a><br></td>\n";
echo "<td align=\"right\" width='25%'>[".$data['thread_views']."]</td>";
}
echo "</tr></table>";
$i++;
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo "</td></tr></table>";
closeside();
?>
proszę o odp
Edytowane przez Pieka dnia 15.04.2008 21:17:05
|