Przedstawiam najczęściej szukane kody do extreme fusion:
_________________________________________________________________________
Użytkownicy online:
$result=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 0,13");
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<160){
$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";
}
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>++ Informacje ".$locale['XXX_017']." ++</b></center><hr><b>".$locale['XXX_003']."Nick</b>: ".$data['user_prefix'].$data['user_name']."<br><b>".$locale['XXX_004']."Pochodzenie</b>: ".$data['user_location']."<br><b>".$locale['XXX_005']."Gadu-Gadu</b>: ".$data['user_msn']."<br><b>".$locale['XXX_006']."Postów</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>";
}
}
Kliknij i zaczekaj na załadowanie kodu ...
_______________________________________________________________________________
Najnowsze posty:
if (!isset($usr_grps) || !isNum($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,7");
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 = $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'], 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(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'], 15)."</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";
}
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Najnowsze artykuły:
$result = dbquery("SELECT article_id, article_subject FROM ".$db_prefix."articles ORDER BY article_id DESC LIMIT 0,7");
while ($row = mysql_fetch_array($result))
{
echo '<img src="'.THEME.'images/bullet.gif" alt=""> <a href="'.BASEDIR.'readarticle.php?article_id=';
echo($row['article_id']);
echo '">';
echo($row['article_subject']);
echo '</a>';
echo '<br>';
}
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Najnowsze newsy:
$result = dbquery("SELECT news_id, news_subject FROM ".$db_prefix."news ORDER BY news_id DESC LIMIT 0,9");
while ($row = mysql_fetch_array($result))
{
echo '<img src="'.THEME.'images/bullet.gif" alt=""> <a href="'.BASEDIR.'news.php?readmore=';
echo($row['news_id']);
echo '">';
echo($row['news_subject']);
echo '</a>';
echo '<br>';
}
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Najczęściej pobierane pliki:
echo"<img src='".THEME."images/bulletb.gif'>Najcz__ciej pobierane:";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side' style=\"color: #F5F5F5\">".$data['download_title']."<td>\n
<td align='right'>Pobra_: ".$data['download_count']."<td>\n<tr>\n";
}
echo "</table>";
}else {
echo "<center>Brak plików w downloadzie</center>\n";
}
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Ostatnio dodane pliki:
echo"</br><img src='".THEME."images/bulletb.gif'>Ostatnio dodane:";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_id DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side' style=\"color: #F5F5F5\">".$data['download_title']."<td>\n
<td align='right'>Pobra_: ".$data['download_count']."<td>\n<tr>\n";
}
echo "</table>";
} else {
echo "<center>Brak plików w downloadzie</center>\n";
}
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Najnowszy uzytkownik:
$data = dbarray(dbquery("SELECT user_id,user_name,user_color,user_prefix FROM ".$db_prefix."users WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));
echo "".$locale['016']." <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side' style='color:#".$data['user_color']."'><b>".$data['user_prefix'].$data['user_name']."</b></a>";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Napisanych newsów:
echo" </br>Napisanych newsów: <b>".number_format(dbcount("(news_id)", "news"))."";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Napisanych artykułów:
echo" </br>Napisanych artyku_ów: <b>".number_format(dbcount("(article_id)", "articles"))."";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Wiadomości w shoutbox:
echo" </br>Wiadomo_ci w shoutbox: <b>".number_format(dbcount("(shout_id)", "shoutbox"))."";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Napisanych komentarzy:
echo" </br>Napisanych komentarzy: <b>".number_format(dbcount("(comment_id)", "comments"))."";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Napisanych postów:
echo" </br>Napisanych postów: <b>".number_format(dbcount("(post_id)", "posts"))."";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Liczba grafik w galerii:
echo" </br>Grafik w galerii: <b>".number_format(dbcount("(photo_id)", "photos"))."";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Licznik ile strona istnieje:
$datetime=strtotime( "data w formacje rrrr-mm-dd" );
$date2=strtotime("NOW");
$holdtotday=intval(($datetime-$date2)/-86400);
echo " </br>Istniejemy ju_ <b>".$holdtotday. "</b> dni.";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Zarejestrowanych użytkowników:
echo "</br>Zarejestrowanych: <b>".number_format(dbcount("(user_id)", "users", "user_status<='1'"))."";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Gości Online:
echo "</br>Gości Online: <b>".dbrows($result)."\n";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Dzisiaj:
$result = dbquery("SELECT user_id,user_name, user_joined FROM ".$db_prefix."users ORDER BY user_joined DESC");
$time = time(); $today=0;
while($data = dbarray($result)){
$data1 = showdate('%D', $data[user_joined]);
$data2 = showdate('%D', $time);
if($data1 == $data2) $today++;
}
echo"<b>Dzisaj: ".$today."<br>";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Wczoraj:
$time1 = time()-86400*1;
$yday = dbcount("(user_id)", "users", "user_joined >= $time1");
echo"<b>Wczoraj: ".$yday."<br>";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
W tym tygodniu:
$time7 = time()-86400*7;
$week = dbcount("(user_id)", "users", "user_joined >= $time7");
echo "<b>W tym tygodniu: </b>".$week."<br>";
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Losowa fotka:
$result=dbquery(
"SELECT tp.*, ta.* FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."photo_albums ta USING(album_id)
WHERE ".groupaccess('album_access')." ORDER BY RAND() LIMIT 1"
);
if(dbrows($result)==1){
$data=dbarray($result);
$randphotodir = PHOTOS.(!@ini_get("safe_mode") ? "album_".$data['album_id']."/" : "");
if(!file_exists($filename)) $filename=$image_url.'/imagenotfound.jpg';
echo "<center>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".$randphotodir.$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."' border='0'>
</a><br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'>".$data['photo_title']."</a>
<br>
<a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."' class='side'>".$data['album_title']."
</center></a>";
}
Kliknij i zaczekaj na załadowanie kodu ...
________________________________________________________________________________
Ostatnia fotka:
$result = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY photo_id DESC LIMIT 0,1");
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['photo_id'], 23);
$itemdescription = trimlink($data['photo_title'], 23);
echo "<center> <a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
<a><br>
</center><a>\n";
}
} else {
echo $locale['004'];
}
Kliknij i zaczekaj na załadowanie kodu ...
Z góry sorka z błędy ortograficzne. Wszystkie kody został sprawdzone i działają w stylach w panelach nie próbowałem ich odpalać jak ktoś będzie miał czas to bym był bardzo wdzięczne za ewentualne poprawki.
W załączniku wstawiam plik z kodami w formacie txt.
P.S.
Jeśli administracja stwierdzi że jest zbędny taki temat proszę o usunięcie go.
Wiadomość doklejona:
Dziękuję za przyklejenie tego tematu :)
Edytowane przez migo dnia 10.07.2009 13:48:37
|