Author |
Message |
rubihno
Hangin' Around

Joined: Feb 22, 2008
Posts: 31
|
Posted:
Tue Mar 04, 2008 9:54 am |
|
Hi,
maybe someone has the time to help me, i would like to use a center block for downloads and reviews.
I use the NSN Download Module and i have a center block for the latest 10 downloads, i put the code here, i would like to have in the same block the latest 10 reviews.
I do not know how to do that. I hope you understand me left side the latest 10 files, right side the latest 10 reviews. Is that possible?
Could you help me with that?
Now the code for the downloads:
Code:if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
global $prefix, $db;
$result = $db->sql_query("SELECT lid, title, date, hits FROM ".$prefix."_nsngd_downloads ORDER BY lid DESC LIMIT 0,10");
$content = "<table width=\"100%\" border=\"0\">";
while (list($lid, $title, $date, $hits) = $db->sql_fetchrow($result)) {
$lid = intval($lid);
$title = stripslashes($title);
$title2 = ereg_replace("_", " ", $title);
$post_time = $date;
$content .= " <tr>";
$content .= " <td align=\"left\" valign=\"top\">";
$content .= " <img src=\"images/blocks/downloads.png\" border=\"0\" alt=\"\" title=\"\" width=\"16\" height=\"16\">";
$content .= " </td>";
$content .= " <td align=\"left\" valign=\"top\">";
$content .= " <a href=\"modules.php?name=Downloads&op=getit& ;lid=$lid&title=$title\"><b>$title2</b></a><br>";
$content .= " </td>";
$content .= " <td align=\"right\" valign=\"top\">";
$content .= " [ Posted on $post_time | Downloads $hits ]";
$content .= " </td>";
$content .= " </tr>";
}
$content .= "</table>";
|
The block does not have to show esle that the image and the filename posted and date are not necessary, the same way i would like to have the latest 10 reviews in the same block.
Sorry for my english.
Thanks in advance |
|
|
|
 |
rubihno

|
Posted:
Thu Mar 06, 2008 6:56 am |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Thu Mar 06, 2008 8:25 am |
|
Is there already a block for the latest reviews? If so, you could put that code in the same block file, then display both the downloads and reviews in an html table side by side. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
rubihno

|
Posted:
Thu Mar 06, 2008 9:44 am |
|
I tryed to do that, yes there is in the standard nuke a reviews blck, just i cant put them together. |
|
|
|
 |
Gremmie

|
Posted:
Thu Mar 06, 2008 10:06 am |
|
Well you might want to hire someone to do that.
Another idea: didn't someone make a center block mod that lets you display 2 or 4 blocks side by side? |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Mar 08, 2008 2:53 pm |
|
Only registered users can see links on this board! Get registered or login! has the center blocks hack which does this. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
rubihno

|
Posted:
Sun Mar 09, 2008 8:50 pm |
|
|
|
 |
|