video stream modulunde block-HTTP_Video_Stream.php son eklenen 2 videoyu kayan liste seklınde anasayfada gosterıyor bunu son 2 degılde son 10 naıl yapabılırız.
Video stream blok kodu:
<?php
#######################################################################
# Block for PHP-Nuke
#-------------------------
# HTTP Video Stream Latest 10
#-------------------------
#
# Version 1.0
# Copyright (c) 2005 by:
# Brady
# http://www.scottswebsite.co.uk
#
#
# Shows Latest 10 videos posted to the module HTTP_Video_Stream
#
######################################################################
$thisfile = basename(__file__);
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
$mxblockcache = false;
global $db, $prefix, $currentlang;
if ($currentlang) {
if (file_exists("modules/Video_Stream/lang-block/lang-$currentlang.php")) {
include_once("modules/Video_Stream/lang-block/lang-$currentlang.php");
} else {
include_once("modules/Video_Stream/lang-block/lang-english.php");
}
} else {
include_once("modules/Video_Stream/lang-block/lang-english.php");
}
$settings = $db->sql_query("SELECT * FROM ".$prefix."_video_stream_settings WHERE id=1");
$srow = $db->sql_fetchrow($settings);
$ratingshow = $srow['ratingV'];
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY id DESC LIMIT 0,2");
$content = "<marquee behavior='scroll' direction='up' height='200'scrollamount='1' scrolldelay='20' onmouseover='this.stop()' onmouseout='this.start()'>";
while($row = $db->sql_fetchrow($result)) {
$content .= " <b><a href=\"modules.php?name=Video_Stream&page=watch&id=".$row['id']."\">".$row['vidname']."</a></b>";
$content .= "<div> "._BBY.": ".$row['user']."<br />";
$date = $row['date'];
$date = substr($date, 0);
$content .= " "._BBON.": ".$date."<br />";
$content .= " "._BVIEWS.": ".$row['views']."";
if ($ratingshow = 1) {
$content .= "<br> "._BRATING.": ".$row['rating']."<br /> "._BTVOTES.": ".$row['rates']."<hr>";
}
$content .= "</div>";
}
$content .= "</marquee>";
?>
2.cisi mp3(musiki) modulunu kurdum block-mp3.php dosyasını ansayfada aktif ettigimde.Aktif ettigim konumun altında kalan butun bloklar o blogun ıcıne giriyor ve kayan bır sekılde gorunuyorlar.
mp3 blok kodu:
<?php
if (eregi("block-mp3.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
get_lang($module_name=mp3);
$linkstoshow = 100;
$usemarquee = 1;
$scrolldirection = "Up";
$latest = "<center><b>"._BLOCKINTITLE."</b></center>";
// Make sure people don't try and access it directly
global $id,$prefix, $dbi,$module_name;
if ($usemarquee == 1) {
$content .= "<Marquee Behavior=\"Scroll\" Direction=\"$scrolldirection\" Height=\"140\" ScrollAmount=\"2\" ScrollDelay=\"100\" onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\"><br>";
}
?>
<script language="JavaScript">
function ok()
{
fenster2=window.open("","video", 'width=365,height=343,scrollbars=no,top=10,left=10');
fenster2.focus();
}
function op()
{
fenster2=window.open("","sound", 'width=293,height=50,scrollbars=no,top=10,left=10');
fenster2.focus();
}
</script>
<?php
// Latest added
$content .= $latest."<br>";
$a = 1;
$result = mysql_query("select id,song,player from ".$prefix."_mp3 order by id DESC limit 0,10", $dbi);
while(list($id, $song,$player) = sql_fetch_row($result, $dbi)) {
$title2 = ereg_replace("_", " ", $song);
if($player != 0){
$content .= "<strong><big>·</big></strong> $a:<a href=modules.php?name=mp3&op=player&id=$id onClick=ok() target=video>$title2</a><br>";
}else{
$content .= "<strong><big>·</big></strong> $a: <a href=modules.php?name=mp3&op=player&id=$id onClick=op() target=sound>$title2</a><br>";
}
$a++;
}
$blockfiletitle = "<b>"._BLOCKTITLE."</b>";
?>
tesekkur ederim.