Please help ! How to make new block ?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Please help ! How to make new block ?
Misho
CZ Newbie
Misho has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Apr 13, 2005
0.00 posts per day
Posts: 1
Points: 302
   
Hi !
I'm stil lerning Nuke so please if somebody can help me make some custom block ...

I have made new module for some RSS feed and here is full source :
<?php

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
        die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._GAMES."";
$index = 0;

    include ("header.php");
title("$sitename: "._GAMES."");

    OpenTable();
//u XML varijablu stavite SVOJ LINK
$XML="http://www.crovortex.com/affiliate.php?op=xmlfeed&xfpid=52&xfkom=15&xfstart=";

header("Content-type: text/html; charset=windows-1250");
header("Cache-Control: no-store, no-cache, must-revalidate");
if($_REQUEST['pomak']) $XML.=$_REQUEST['pomak'];
elseif($pomak) $XML.=$pomak;
else $XML.="0";
if(version_compare(phpversion(),"5.0.0")!=-1) die("Ova skripta je za PHP verzije <5.0.0, vaša verzija je ".phpversion().". Na našoj stranici možete preuzeti primjere za verziju 5.");
elseif(!extension_loaded("domxml")) die("Server nema podršku za DOMXML, potrebno je uključiti domxml ekstenziju u PHPu.");
$doc=domxml_open_file($XML);
$webshop=$doc->document_element();
$e_rb=$webshop->get_elements_by_tagname("RB");
$e_naziv=$webshop->get_elements_by_tagname("NAZIV");
$e_platforma=$webshop->get_elements_by_tagname("PLATFORMA");
$e_zanr=$webshop->get_elements_by_tagname("ZANR");
$e_linkslika=$webshop->get_elements_by_tagname("LINKSLIKA");
$e_cijena=$webshop->get_elements_by_tagname("CIJENA");
$e_linkkupi=$webshop->get_elements_by_tagname("LINKKUPI");
$ukupno=count($e_rb);
echo "<html><body><p><table width=450 cellspacing=1 cellpadding=3 border=0>";

// for petlja za ispis igra
for($i=0;$i<$ukupno;$i++)
{
        $rb=$e_rb[$i]->get_content();
        $naziv=$e_naziv[$i]->get_content();
        $platforma=$e_platforma[$i]->get_content();
        $zanr=$e_zanr[$i]->get_content();
        $linkslika=$e_linkslika[$i]->get_content();
        $cijena=$e_cijena[$i]->get_content();
        $linkkupi=$e_linkkupi[$i]->get_content();

        //
        // ispis 1 po 1 igre sa odgovarajucim HTMLom
        //
        echo "<tr><td><img src=\"$linkslika\" align=left></td><td><h3>$naziv</h3>Platforma: $platforma<br>Žanr: $zanr"
            ."<br>Cijena (PDV uključen): $cijena kn<br><a href=\"$linkkupi\">Dodaj u košaricu</a><p></td></tr>";
}
echo "</table><br>";
if($pomak>0)
{
        $prije=$pomak-$ukupno;
        echo "<a href=\"".$_SERVER['PHP_SELF']."?name=Crovortex&pomak=$prije\">Prethodnih $ukupno igara</a> | ";
}
$dalje=$pomak+$ukupno;
echo "<a href=\"".$_SERVER['PHP_SELF']."?name=Crovortex&pomak=$dalje\">Sljedećih $ukupno igara</a>";

    CloseTable();
    include ('footer.php');

?>



But, I can't make a block with this content icon_cry.gif
Can somebody please help ?

Thanks !


Back to top Reply with quote
#2   re: Please help ! How to make new block ?
webshark
PayPal Donation
CZ Moderator
 Codezwiz Site Donator
webshark has been a member for over 20 year's 20 Year Member
turkey.gif
Age: 55
Gender: Male
Website:
Status: Offline
Joined: Mar 23, 2004
0.09 posts per day
Posts: 643
Points: 57,200
   
Hello

if you take your time for reading carefuly this how to im sure it will help you much [ Register or login to view links on this board. ]




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum