Refresh inside a 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   Refresh inside a block
DirtyDoggT
CZ Newbie
DirtyDoggT has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Occupation: Car Audio/Video/Security Installer for 15 Years
Age: 49
Gender: Male
Website:
Status: Offline
Joined: Sep 16, 2003
0.00 posts per day
Posts: 10
Points: 808
AIM Address Yahoo Messenger MSN Messenger 
I was wondering if somebody could help me with this. I'm trying to build a block that will change inside it when you click a link. Basically maybe an I-Frame or something inside the block that will change itself and not refresh the whole site. I'm making it for RSS News feeds from other sites. Basically I'm making a drop down menu that lists all sites and when you click that link it will grab the news right in the block.

If there is a block that is available for this could someone point me into the right direction.




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#2   re: Refresh inside a block
DirtyDoggT
CZ Newbie
DirtyDoggT has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Occupation: Car Audio/Video/Security Installer for 15 Years
Age: 49
Gender: Male
Website:
Status: Offline
Joined: Sep 16, 2003
0.00 posts per day
Posts: 10
Points: 808
AIM Address Yahoo Messenger MSN Messenger 
OK... I have created a block that uses a DHTML I-Frame. Basically I will grab a html or php page and contain it into the block. Whatever link you click on within the block it will open that page inside that block. I will create a drop down menu with links to different sites Backend.php files. Now I need some help from someone who knows how to create a simple php page.

I need to see if someone can change the block-Nuke_News.php into a php page itself. I can't get the block to show within the block I have created. So I need a simple page with the coding in it. If someone could change the coding so it will show up on a entire page that would be great. Here is the code.


<body link="#C0C0C0" vlink="#C0C0C0" alink="#C0C0C0">

<?php
/************************************************************************/
/* RDF-News Block for VKP-Maxi, VKP-Midi, VKP-Mini                      */
/* ============================                                         */
/* rewritten and modified by:                                           */
/* jubilee                                                              */
/* [ Register or login to view links on this board. ]                                            */
/* [ Register or login to view links on this board. ]                                                    */
/* Usable as Side or Center-Block                                       */
/*                                                                      */
/*                                                                      */
/* RDF-Block by jubilee with modifikation for newer rss/rdf syntax      */
/* Based upon block-scrolling Heise_News from Igor Ehrlich              */
/* (c)jubilee 2003                                                      */
/************************************************************************/

if (eregi("block-rdf.php", $PHP_SELF)) {
    Header("Location: index.php");
    die();
}

$rdfsource1 = "http://www.phpnuke.org/backend.php"; #quelle der RDF-Datei
$rdfsource2= "http://www.nukecops.com/backend.php";   #source of rdf-file
$rdfsource3= "http://sabaki.com.au/backend.php";
$rdfsource4= "http://www.nukeresources.com/backend.php";    
$rdfname1  = "Php-Nuke";     # News-Feed-Name
$rdfname2  = "NukeCops"; # news-feed name for display
$rdfname3  = "sabaki.com.au";
$rdfname4  = "Nuke Resources";
$homelink1 = "http://www.nukewire.com/";  #Newsfeed-Webadresse
$homelink2 = "http://www.nukecops.com/";#Newsfeed Homelink
$homelink3 = "http://sabaki.com.au/";
$homelink4 = "http://www.nukeresources.com/";
$scrollen  = 0;    #1 ein, 0 aus   // srolling 1=on 0 =off
$richtung  = "up"; # Richtug/Direction up down left oder right  wenn/if $scrollen=1
$speed     = 2;    # scrollgeschwindigkeit wenn / scrollig speed if $scrollen=1
$warte     = 10;   # scrollverzögerung wenn / scroll delay if $scrollen=1

If (($richtung=="left") or ($richtung=="right")){
   $hoehe=20;
   $waagerecht= 1;}
else{
   $hoehe=200;
   $waagerecht= 0;}
   
If ($waagerecht==0)
        {
        If ($scrollen==1)
        {
        $content = " <A name= \"scrollingCode\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"".$richtung."\" height=\"".$hoehe."\" scrollamount= \"".$speed."\" scrolldelay= \"".$warte."\" onmouseover='this.stop()' onmouseout='this.start()'>";
      }
        else
        {
        $content="";
        }
        $content .= "<center>* * *<br><b>".$rdfname1." News</b></center><br>\n\n";
        $data = implode ("", file ($rdfsource1));
      preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
      If (count($items[1])==0) {
      preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
      for ($i=0;$i<count($items[1]);$i++)
      {
        preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
        $content .="<a href=\"".$regs[3][0]."\" target='_blank'>".$regs[1][0]."</a><br><br>\n\n";
      }
      $content .="<a href=\"".$homelink1."\" target='_blank' >more...</a><br><br>\n\n";
      
    If (!$rdfsource2==""){
        $content .= "<center>* * *<br><b>".$rdfname2." News</b></center><br>\n\n";
        $data = implode ("", file ($rdfsource2));
      preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
      If (count($items[1])==0) {
      preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
      for ($i=0;$i<count($items[1]);$i++)
      {
        preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
        $content .="<a href=\"".$regs[3][0]."\" target='_blank'>".$regs[1][0]."</a><br><br>\n\n";
      }
      $content .="<a href=\"".$homelink2."\" target='_blank' >more...</a><br><br>\n\n";
      }
    If (!$rdfsource3==""){
        $content .= "<center>* * *<br><b>".$rdfname3." News</b></center><br>\n\n";
        $data = implode ("", file ($rdfsource3));
      preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
      If (count($items[1])==0) {
      preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
      for ($i=0;$i<count($items[1]);$i++)
      {
        preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
        $content .="<a href=\"".$regs[3][0]."\" target='_blank'>".$regs[1][0]."</a><br><br>\n\n";
      }
      $content .="<a href=\"".$homelink3."\" target='_blank' >more...</a><br><br>\n\n";
      }
    If (!$rdfsource4==""){
        $content .= "<center>* * *<br><b>".$rdfname4." News</b></center><br>\n\n";
        $data = implode ("", file ($rdfsource4));
      preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
      If (count($items[1])==0) {
      preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
      for ($i=0;$i<count($items[1]);$i++)
      {
        preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
        $content .="<a href=\"".$regs[3][0]."\" target='_blank'>".$regs[1][0]."</a><br><br>\n\n";
      }
      $content .="<a href=\"".$homelink4."\" target='_blank' >more...</a><br><br>\n\n";
      $content .="<center><a href=\"http://www.nukewire.com\" target='_blank'><IMG alt=\"Syndicate Your Feeds!\" src=\"http://www.euronuke.org/images/nukewire.gif\" width=88 border=1></a></center>";
      }
       }
   else
      {
        if ($scrollen==1)
      {
         $content = " <A name= \"scrollingCode\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"".$richtung."\" height=\"".$hoehe."\" scrollamount= \"".$speed."\" scrolldelay= \"".$warte."\" onmouseover='this.stop()' onmouseout='this.start()'>";
      }
      else
      {
         $content = "";
      }
      $content .="-------- ;;<b>".$rdfname1."</b> NEWS ;;---------- ;; ;;** ;; ;;";
      
      $data = implode ("", file ($rdfsource));
      preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
      If (count($items[1])==0) {
      preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
      for ($i=0;$i<count($items[1]);$i++)
      {
        preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
        $content .="<a href=\"".$regs[3][0]."\" target='_blank'>".$regs[1][0]."</a> ;; ;;** ;; ;;";
      }
      $content .="<a href=\"".$homelink1."\" target='_blank' >more...</a> ;; ;;** ;; ;;";
    if (!$rdfsource2=="")
    {
        $content .="-------- ;;<b>".$rdfname2."</b> NEWS ;;---------- ;; ;;** ;; ;;";
      
      $data = implode ("", file ($rdfsource2));
      preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
      If (count($items[1])==0) {
      preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
      for ($i=0;$i<count($items[1]);$i++)
      {
        preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
        $content .="<a href=\"".$regs[3][0]."\" target='_blank'>".$regs[1][0]."</a> ;; ;;** ;; ;;";
      }
      $content .="<a href=\"".$homelink2."\" target='_blank' >more...</a> ;; ;;** ;; ;;";
   }
    if (!$rdfsource3=="")
    {
        $content .="-------- ;;<b>".$rdfname3."</b> NEWS ;;---------- ;; ;;** ;; ;;";
      
      $data = implode ("", file ($rdfsource3));
      preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
      If (count($items[1])==0) {
      preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
      for ($i=0;$i<count($items[1]);$i++)
      {
        preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
        $content .="<a href=\"".$regs[3][0]."\" target='_blank'>".$regs[1][0]."</a> ;; ;;** ;; ;;";
      }
      $content .="<a href=\"".$homelink3."\" target='_blank' >more...</a> ;; ;;** ;; ;;";
   }
     if (!$rdfsource4=="")
    {
        $content .="-------- ;;<b>".$rdfname4."</b> NEWS ;;---------- ;; ;;** ;; ;;";
      
      $data = implode ("", file ($rdfsource4));
      preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
      If (count($items[1])==0) {
      preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
      for ($i=0;$i<count($items[1]);$i++)
      {
        preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
        $content .="<a href=\"".$regs[3][0]."\" target='_blank'>".$regs[1][0]."</a> ;; ;;** ;; ;;";
      }
      $content .="<a href=\"".$homelink4."\" target='_blank' >more...</a> ;; ;;** ;; ;;";
      $content .="<center><a href=\"http://www.nukewire.com\" target='_blank'><IMG alt=\"Syndicate Your Feeds!\" src=\"http://www.euronuke.org/images/nukewire.gif\" width=88 border=1></a></center>";
   }
}
?>




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#3   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
This should work you may have to fix the cosmetics.



Attached Files
dirtydog.zip (1.32 KB, Downloaded: 5269 Time(s))



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#4   re: Refresh inside a block
DirtyDoggT
CZ Newbie
DirtyDoggT has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Occupation: Car Audio/Video/Security Installer for 15 Years
Age: 49
Gender: Male
Website:
Status: Offline
Joined: Sep 16, 2003
0.00 posts per day
Posts: 10
Points: 808
AIM Address Yahoo Messenger MSN Messenger 
water... after looking at that I wasn't far off. Looks like what I had done. I must have done something wrong with it though and basically was getting tired of trying to figure it out...lol All I was getting was a blank screen...Not even a web error page. THANK YOU!!!

I'll give you a link to it when it's done. I think people will like it. I am currently making this block and also another one that is database driven with an admin section that will grab .xml rss feeds from other sites and you can break them down by category. For instance Sports Sites, Web Design Sites and so on. Should have it done in a couple days.




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#5   re: Refresh inside a block
DirtyDoggT
CZ Newbie
DirtyDoggT has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Occupation: Car Audio/Video/Security Installer for 15 Years
Age: 49
Gender: Male
Website:
Status: Offline
Joined: Sep 16, 2003
0.00 posts per day
Posts: 10
Points: 808
AIM Address Yahoo Messenger MSN Messenger 
ok... I got it to work. not quite done with it but at least functional. Can't seem to get it to display on Opera Browsers but it seems that everything I make from DHTML doesn't work with opera. OH WELL.
Check it out if you like. It won't grab the news from here. Do you have a backend file?

Block is upper right. [ Register or login to view links on this board.]




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#6   re: Refresh inside a block
DirtyDoggT
CZ Newbie
DirtyDoggT has been a member for over 20 year's 20 Year Member
usa.gif missouri.gif
Occupation: Car Audio/Video/Security Installer for 15 Years
Age: 49
Gender: Male
Website:
Status: Offline
Joined: Sep 16, 2003
0.00 posts per day
Posts: 10
Points: 808
AIM Address Yahoo Messenger MSN Messenger 
Ok... block is near complete. This one is a hard coded one. I'm now working on one that draws from the database and creating an admin page for it.

View it here. [ Register or login to view links on this board. ]




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#7   re: Refresh inside a block
psychofski
CZ Newbie
psychofski has been a member for over 19 year's 19 Year Member
Status: Offline
Joined: Jul 28, 2004
0.00 posts per day
Posts: 14
Points: 1,486
   
hey teli i m interested in this block but i canot dl it says i dont have acces could you help me



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