| HI all, Just wondering if anyone would like to try their hand at porting the code below from phpNuke to Joomla 1.5? I used to have this "block" on my old Nuke website and want to add it to my Joomla site as either a 'snippet" dropped into a custom mod or create a distinct mod for it. Here 'tis: "<?php> $file = fopen( "http://news.bbc.co.uk/2/low.html", "rb" ); // If php 5 installed // $rf = stream_get_contents($file); $rf = ''; while (!feof($file)) { $rf .= fread($file, 8192); } $grab = eregi( "<a name=\"startcontent\"></a>(.*)OTHER TOP STORIES", $rf, $printing ); $printing[ 1 ] = str_replace( "<a href=\"", "<A target=_blank HREF=\"http://news.bbc.co.uk", $printing[ 1 ] ); $printing[ 1 ] = str_replace( "<hr>", "", $printing[ 1 ] ); fclose( $file ); $content = $printing[ 1 ]."<p align=\"center\"><a href=\"http://news.bbc.co.uk\" target=\"_blank\"><img border=\"0\" src=\"images/blocks/bbcnews.gif\"></a></p>"; ?> " |
Forum 





Author



Logged





