pragmaMx Support Forum

pragmaMx => Language Specific Support => Türkçe (Turkish) => Thema gestartet von: ozeraksu am 16 September 2007, 11:40:39

Titel: siir bloku uyarlamak
Beitrag von: ozeraksu am 16 September 2007, 11:40:39
Atahan bey merhaba bir sitede siirler modulunun kayan seklinde bir blogunu gordum download modulunden uyarlanmis yapilmis bende yapmaya calistim ama basaramadim acaba yardimci olabilirmisin blogun resmini ve kodlarini veriyorum simdiden tesekkurler

(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fimg251.imageshack.us%2Fimg251%2F6731%2Fadszsz9ya4.gif&hash=66b7e180ece5ae6e5bdbe4827c54b3f4a069e897)

<?php
/*=======================================================================
 Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
 =======================================================================*/

/************************************************************************/
/* Simple Downloads Block                                             */
/* ===========================                                          */
/*                                                                      */
/* This is basically just an edit of the original block by Francisco.   */
/* Even though this is heavly edited, I think he deserves credit, so:   */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

/******************************************************************************************/
/*      To edit 2 first two variables according to your requirements
/*      $maxshow =5; IS INDICATING  how many files to be listed in latest downloads section                 */
/*      $downloadstoshow = 20; IS INDICATING  how many files to be listed in most downloads section          */
/*      $usemarquee = 1;   IS INDICATING     0=SCROLLING OFF  1=SCROLLING ON;                               */

/******************************************************************************************/
$maxshow =5;
$downloadstoshow 20;
$usemarquee 1;
$scrolldirection "Up";
$most "Most downloaded";
$latest "Latest in downloads";
$totalfiles "Files";
$totalcategories "Categories";
$totaldownloads "Downloads";

/************************/
/*     End Variables    */
/************************/

if(!defined('BLOCK_FILE')) {
    
Header("Location: index.php");
    die();
}

global 
$prefix$db;

// Total Files
$result $db->sql_query("select * from ".$prefix."_siir");
$files $db->sql_numrows($result);

// Total Categories
$result $db->sql_query("select * from ".$prefix."siir");
$cats $db->sql_numrows($result);

// Total Downloads
$result $db->sql_query("select lid, title,hits from ".$prefix."siir");
while(list(
$lid$title$hits) = $db->sql_fetchrow($result)) {
   
$title2 ereg_replace("_"" "$title);
$a 1;
$total_hits $total_hits $hits;
$a++;
}
$result=$db->sql_query("select * from $prefix".siir."");
    
$numrows $db->sql_numrows($result);
    
$result=$db->sql_query("select sum(filesize*hits) as serv from $prefix".siir."");
    while(list(
$serv) = $db->sql_fetchrow($result)) {
        
$served $serv;
    }
    
$gb 1024*1024*1024;
    
$mb 1024*1024;
    
$kb 1024;
    if (
$served >= $gb){
        
$mysizes sprintf ("%01.2f",$served/$gb) . " Gb ";
    } elseif (
$served >= $mb) {
        
$mysizes sprintf ("%01.2f",$served/$mb) . " Mb ";
    } elseif (
$served >= $kb) {
        
$mysizes sprintf ("%01.2f",$served/$kb) . " Kb ";
    } else{
        
$mysizes $served " B ";
    }
$content .= "&nbsp;&nbsp;$totalfiles: <b>$files</b><br>&nbsp;&nbsp;$totalcategories: <b>$cats</b><br>&nbsp;&nbsp;$totaldownloads: <b>$total_hits</b><br>&nbsp;&nbsp;Served&nbsp;&nbsp;<b>$mysizes</b><br><br>";

if (
$usemarquee == 1) {
$content .= "<Marquee Behavior=\"Scroll\" Direction=\"$scrolldirection\" Height=\"140\" ScrollAmount=\"2\" ScrollDelay=\"100\" onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\"><br>";
}

// Latest added
$content .= "<center><b>".$latest."</b></center>";
$a 1;
$result $db->sql_query("select lid, title, hits from ".$prefix."siir order by date DESC limit 0,$maxshow");

while(list(
$lid$title$hits) = $db->sql_fetchrow($result)) {
$title2 ereg_replace("_"" "$title);
  $content .= "&nbsp;&nbsp;$a- <a href=\"modules.php?name=Siir&op=showcontent&id=$id\">$title2</a><img src=\"/modules/Downloads/images/new_1.gif\"><br>";
$a++;
}

// Most downloaded
$content .= "<br><center><b>".$most."</b></center>";
$a 1;
$result $db->sql_query("select lid, title, hits from ".$prefix."siir order by hits DESC limit 0,$downloadstoshow");

while(list(
$lid$title$hits) = $db->sql_fetchrow($result)) {
    
$title2 ereg_replace("_"" "$title);
    
$content .= "&nbsp;&nbsp;$a- <a href=\"modules.php?name=Siir&op=showcontent&id=$id\">$title2</a><br>[Downloads: <b>$hits x</b>]<br>";
    
$a++;
}

?>

Titel: Re: siir bloku uyarlamak
Beitrag von: Sitki am 16 September 2007, 12:17:57
Merhaba :),

kusura bakma ama, burası pragmaMX ortamı ve şiir diye bir modül standart olarak sunulmamaktadır. Göstermiş olduğun blok phpnuke dahi değil yine bundan türemiş Nuke-Evolution Basic sisteminden gelen bir bloktur. Bu bloğu denemek için ayrıca kullandığın şiir modülünü yüklemek gerekiyor, ki bu da pragmaMX ile uyumlu değildir muhtemelen. Lütfen pragmaMx dışında kullanılan sistemleri kullanıldığı ortamlardan yardım talep etmeni rica ediyorum. Teşekkürler...

Ayrıca buradaki Türkçe bölümünün başlığındaki bu notu da dikkate almanı rica ediyorum.
ZitatFakat burada sistem ve somut sorunlar ile ilgili konulara öncelik verilecektir. Bu yüzden şimdilik bireysel kodlama soruları, değişiklik istemleri veya benzeri Almanca veya İngilizce olarak diğer forum köşelerine yazmanızı rica ediyoruz.