PHP-Nuke Services - Addons, Modules, Blocks Vizitati www.westdesign.ro Select Interface Language:EnglishRomanian
  Login or Register HomeForumsDownloadsYour AccountWeb LinksContact   
SectionsShow\Hide
MultiheadlinesShow\Hide
LoginShow\Hide
~ Welcome, alien
Nickname Password
(Register)

~ Membership:

Greetings to the newest member borro
~ New Today: 1
~ New Yesterday: 1
~ Overall: 3709

~ People Online:
~ Visitors: 2
~ Members: 0
~ Total: 2
~Aikon is offline
on Yahoo Msg.
Link to meShow\Hide

aikons.net
Search in FeedsShow\Hide
Search in feeds
HistoryShow\Hide
On 7 January


Speed Up   Pause   Speed Down
DictionaryShow\Hide
Enter the word

Romanian users only

Situl personal NICU RANCOV Forum Index


This topic is locked: you cannot edit posts or make replies. Page 1 of 1
block ordered by time
Message Author
Reply with quote
Post Posted: Saturday 11 March, 2006 00:03

I've made this block but it doesn't show the news ordered by time (it shows news from 20 hours ago)

can you help Wink

Code:
$category_id="1";
$nr_news="3";
global $prefix, $db;
if (eregi("block-Multiheadlines-Top.php", $_SERVER['PHP_SELF'])) {
   Header("Location: index.php");
  die();
}
$content = "<table width=\"100%\">
                     <tr>
                        <td>";
                              $result = $db->sql_query("SELECT * FROM ".$prefix."_multiheadlines_news WHERE news_cat='$category_id' ORDER BY news_time DESC LIMIT 0,".$nr_news);
                              while ($row = $db->sql_fetchrow($result)) {
                                 $image = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_multiheadlines_urls WHERE urls_site='".$row["news_site"]."'"));
                                 $content .="
   <img src=\"themes/otbi/images/line.gif\" border=\"0\" height=\"1\" width=\"90%\"></br></br><div align=\"left\">
                                 
                                 <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
  <tr>
    <td>                     
                                 <img src=\"modules/Multiheadlines/images/logos/".$image["urls_image"]."\" border=\"0\" width=\"90\" height=\"30\" hspace=\"10\"></a>
   </td>
    <td>
<a href=\"".$row["news_link"]."\" xtarget=\"_blank\"><b>".$row["news_title"]."</b></a>                                 </td>
  </tr>
</table>
   </br>".$row["news_description"]."</br></br></div>";
                              }
                              $content .="</td>
                     </tr>
                  </table>";


View user's profile Send private message
Reply with quote
Post Posted: Saturday 11 March, 2006 13:13

It shows all the news [3 feeds - $nr_news="3" ????] that are in that category [$category_id] [tested myself] and it shows the feeds ordered by time [maybe you have in that category only feeds that are older than 20 hour].

View user's profile Send private message Visit poster's website
Reply with quote
Post Posted: Saturday 11 March, 2006 16:40

strange, when i installed it there were about 30 newer news items in that cat, but i just checked again and it's up to date.

maybe it just needed to settle Confused

View user's profile Send private message
Display posts from previous:
This topic is locked: you cannot edit posts or make replies. Page 1 of 1
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
  


Page Generation: 1.55 Seconds