Modyfikajca infopanel w połączeniu z pro download panel ....
Proszę o wstawienie zmodyfikowanego infopanelu , nizej załączam ptrzbne informacje do zmodyfikowania.
Prosił bym o to by zamiast Najnowsze posty wyswietlalo ostatnio dodane pliki z kategori .
Dziękuję serdecznie za pomoc. Jezeli sie nie wyrazilem dość jasno to prosze pisać , postaram się bardziej precyzyjnie to opisac.
InfoPanel :
<?
/*--------------------------------------------------------------------------+
| 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.
+--------------------------------------------------------------------------*/
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 INCLUDES."theme.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 "<FIELDSET><LEGEND><a href='".INFUSIONS."info_panel/members.php'> ".$locale['XXX_002']."</a></LEGEND>\n";
$result=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 0,5");
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='#1d4e0c'><b>OnLine</b></font></NOBR>";
}elseif($lastseen<360){
$lastseen="<nobr><font color='#9c0000'><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";
}
if (!isset($start)) $start="";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td class='small'>
<a href='".BASEDIR."profile.php?lookup=$data[user_id]'
onmouseover=\"ddrivetip('$start<center><b>° ".$locale['XXX_017']." °</b></center><hr><b>".$locale['XXX_003']."</b>: ".$data['user_prefix'].$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']."$end')\" style='color:#".$data['user_color']."' onMouseout=\"hideddrivetip()\">";
echo $data['user_prefix'].$data['user_name']."</a></td><td align=\"right\" class='small'>".$lastseen."</td></tr></table>";
}
}
echo "</FIELDSET></td><td width='2%' valign='top' align='right'></td><td width='32%' valign='top' align='right'><FIELDSET><LEGEND align='right'><a href='".INFUSIONS."info_panel/newest_posts.php'>".$locale['XXX_015']."</a></LEGEND>\n";
if (!isset($usr_grps)) $usr_grps="";
$result = dbquery(
"SELECT tf.*, tt.*, tu.user_id,user_name,user_color,user_prefix 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,5");
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>'".(isset($lastvisited) ? $lastvisited : 0)."'");
//$thread_replies = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'") - 1;
$thread_replies = $data['thread_replies'];
$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']."'");
$reply_count = $data['thread_replies']+1;
$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 = str_replace("'", "", $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%' class='small'>";
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=\"ddrivetip('$start<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_prefix'].$data['user_name']."<br><b>".$locale['XXX_022']."</b>: ".showdate("forumdate", $data['thread_lastpost'])."$end')\"' onMouseout=\"hideddrivetip()\" >".trimlink($data['thread_subject'], 22)."</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(str_replace("'", "", $data['thread_subject']), 45)."<hr><b>".$locale['XXX_020']."</b>: ".($reply_count - 1)."/".$data['thread_views']."<br><b>".$locale['XXX_021']."</b>: ".$data['user_prefix'].$data['user_name']."<br><b>".$locale['XXX_022']."</b>: ".showdate("forumdate", $data['thread_lastpost']).";')\" (".$data['forum_name'].")'>".trimlink($data['thread_subject'], 22)."</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 "</FIELDSET></td></tr></table>";
closetable();
?>
Pro Download Panel :
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Orginal von: pirdani
| eMail: pirdani@
| Web: http://www.lucky-garden-geithain.de
| ---------------------------------------------------+
| Angepasst für V.6 - 2005 EdEdster (Stefan Noss)
| http://www.edsterathome.de/
| ---------------------------------------------------+
| 2006 Artur Wiebe <>
| http://wibix.de/
| ---------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| 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
+----------------------------------------------------*/
if(!defined("IN_FUSION")) {
header("Location:../../index.php");
exit;
}
// LOKALE SPRACHDATEI PRÜFEN
if (file_exists(INFUSIONS."pro_download_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."pro_download_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."pro_download_panel/locale/German.php";
}
openside($locale['PDP_124']);
$sql1 = dbquery("SELECT id, name, cat FROM ".DB_PREFIX."prodownloads"
." ORDER BY datestamp DESC LIMIT 10");
echo "<div class='side-label'><b>".$locale['PDP_125']."</b></div>
<table width='100%' cellspacing='0' cellpadding='0'>\n";
while($data = dbarray($sql1)) {
echo "<tr>
<td><img src='".THEME."images/bullet.gif' alt=''> <a href='".INFUSIONS
."pro_download_panel/download.php?catid=".$data['cat']
."&did=".$data['id']."' title='".$data['name']
."' class='side'>".trimlink($data['name'], 25)."</a></td>";
}
echo "</table>";
$sql1 = dbquery("SELECT id, name, cat, downloads FROM ".DB_PREFIX."prodownloads"
." ORDER BY downloads DESC LIMIT 10");
echo "<p><div class='side-label'><b>".$locale['PDP_126']."</b></div>
<table width='100%' cellspacing='0' cellpadding='0'>\n";
while($data = dbarray($sql1)) {
echo "<tr>
<td><img src='".THEME."images/bullet.gif' alt=''> <a href='".INFUSIONS
."pro_download_panel/download.php?catid=".$data['cat']."&did="
.$data['id']."' title='".$data['name']."' class='side'>"
.trimlink($data[name], 25)."</a></td>
<td align='right'>[".$data['downloads']."]</td>
</tr>\n";
}
echo "</table>";
closeside();
?>
Po pierwsze nie wylaczyles emotek!
Po drugie wstawiles do zlego dzialu.
Po trzecie sa swieta, wiec poprawiam i przenosze ;) /Pieka
Edytowane przez Pieka dnia 15.04.2006 21:33:31
|