- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 62 guest(s) and 1 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Need help with this block ( about last topics,downloads,etc) [ ]
Author
Message
cos
Nuke Soldier
Joined: May 27, 2003
Posts: 15
Location: Greece-Thessaloniki
Posted:
Thu Jun 26, 2003 2:42 pm
I have this center block.It shows last last images, last topics, last downloads ... and last web links. I want to put out about web links and put in about LAST MEMBERS.
Anyone who can do it for me pls? I tried but i can do it work properly.
Thanks to all :)
Block is that :
[php:1:76e984f069]<?php
if (eregi("block-Center_Blocks_a.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
global $prefix, $dbi, $sitename, $ThemeSel;
// This picks up what theme you are running to make the boxes look like your story boxes
$ThemeSel = get_theme();
// Change this as needed, to match your gallery name
$gallery_name = "My_eGallery";
// Change these to change the wording on the headers for each block
$titleforum = "Forum";
$titlelinks = "Web_Links";
$titledownloads = "Downloads";
$titlearticles = "Subjects";
$titlepictures = "Images";
$titleclassifieds = "Classifieds";
// Size of the Max Number of characters displayed in the boxes
$strip = "64";
// Do NOT change any code below here unless you know what you are doing
$content = "<table align=\"center\" width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\">";
$content .= "<tr>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titleforum</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$viewdot = "<strong>&</strong>&";
$contentforum .= "<table width=\"100%\" height=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
$result = sql_query("SELECT * FROM ".$prefix."_forumtopics ORDER BY topic_time DESC LIMIT 5", $dbi);
while(list($topic_id, $topic_title, $topic_poster, $topic_time, $topic_views, $forum_id, $topic_status, $topic_notify) = sql_fetch_row($result, $dbi)) {
$res4 = sql_query("SELECT MAX(".$prefix."_posts.post_id) FROM ".$prefix."_posts WHERE ".$prefix."_posts.topic_id = $topic_id", $dbi);
list ($lastpostid) = sql_fetch_row($res4, $dbi);
$res3 = sql_query("SELECT COUNT(".$prefix."_posts.post_id) FROM ".$prefix."_posts WHERE ".$prefix."_posts.topic_id = $topic_id", $dbi);
list ($replies) = sql_fetch_row($res3, $dbi);
$replies = $replies-1;
$res2 = sql_query("SELECT ".$prefix."_users.uname FROM ".$prefix."_users, ".$prefix."_posts WHERE ".$prefix."_posts.poster_id = ".$prefix."_users.uid AND ".$prefix."_posts.post_id=$lastpostid", $dbi);
list ($lastposter) = sql_fetch_row($res2, $dbi);
$res = sql_query("SELECT image FROM ".$prefix."_posts where topic_id='$topic_id'", $dbi);
list ($image) = sql_fetch_row($res, $dbi);
if (file_exists("images/forum/subject/$image")) {
if(strlen($topic_title) > $strip) {
$topic_title = substr($topic_title,0,$strip);
$topic_title .= "...";
}
$contentforum .= "<tr><td>$viewdot<a href=\"modules.php?op=modload&name=Forums&file=viewtopic&topic=$topic_id&forum=$forum_id\">$topic_title</a></td><td align=\"right\"><p align=\"right\">R($replies) </td></tr>";
} else {
$contentforum .= "<td>$viewdot<a href=\"modules.php?op=modload&name=Forums&file=viewtopic&topic=$topic_id&forum=$forum_id\">$topic_title</a></td></tr>";
}
}
$contentforum .= "</table>";
$content .= "$contentforum</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titleclassifieds</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$result = sql_query("select id_ads, title, hits from ".$prefix."_ads_ads order by id_ads DESC limit 5", $dbi);
$contentclassified .= "<table width=\"100%\" height=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
while(list($id_ads, $title, $hits) = sql_fetch_row($result, $dbi)) {
if(strlen($title) > $strip) {
$title = substr($title,0,$strip);
$title .= "...";
}
$contentclassified .= "<tr><td>$viewdot<a href=\"modules.php?name=NukeC&op=ViewDetail&id_ads=$id_ads\">$title</a></td></tr>";
}
$contentclassified .= "</table>";
$content .= "$contentclassified</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titlepictures</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$z = 1;
$result = mysql_query("SELECT a.date, a.pid, a.gid, a.img, a.name, a.description, b.galloc from $prefix"._gallery_pictures." a left join $prefix"._gallery_categories." b on a.gid =b.gallid ORDER by date DESC limit 5");
$contentpictures .= "<table width=\"100%\" height=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
while (list($date, $pid, $gid, $img, $name, $description, $galloc) = mysql_fetch_row($result)) {
if(strlen($name) > $strip) {
$name = substr($name,0,$strip);
$name .= "...";
}
if(strlen($description) > $strip) {
$description = substr($description,0,$strip);
$description .= "...";
}
$pic[$z] = "<tr><td>$viewdot<a href=\"modules.php?op=modload&name=$gallery_name&file=index&do=showpic&pid=".$pid."&orderby=hitsD\">$description</a></td></tr>";
$z ++;
}
$contentpictures .= "$pic[1]$pic[2]$pic[3]$pic[4]$pic[5]";
$contentpictures .= "</table>";
$content .= "$contentpictures</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "</tr>";
$content .= "<tr>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titlelinks</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$contentlinks .="<table border=\"0\" height=\"70\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td valign=\"top\">";
$result = sql_query("select lid, title from $prefix"._links_links." order by lid DESC limit 5", $dbi);
while(list($lid, $title) = sql_fetch_row($result, $dbi)) {
$linkstrip4 = stripslashes($title);
if(strlen($linkstrip4) > $strip) {
$linkstrip4 = substr($linkstrip4,0,$strip);
$linkstrip4 .= "...";
}
$contentlinks .= "$viewdot<a href=\"links.html&l_op=viewlinkdetails&lid=$lid&title=$title\">$linkstrip4</a><br>";
}
$contentlinks .="</td></tr></table>";
$content .= "$contentlinks</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titledownloads</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$contentdownloads .="<table border=\"0\" height=\"70\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td valign=\"top\">";
$result = sql_query("select cid, lid, title from $prefix"._downloads_downloads." order by lid DESC limit 5", $dbi);
while(list($cid, $lid, $title) = sql_fetch_row($result, $dbi)) {
$linkstrip5 = stripslashes($title);
if(strlen($linkstrip5) > $strip) {
$linkstrip5 = substr($linkstrip5,0,$strip);
$linkstrip5 .= "...";
}
$contentdownloads .= "$viewdot<a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid&title=$title\">$linkstrip5</a><br>";
}
$contentdownloads .="</td></tr></table>";
$content .= "$contentdownloads</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titlearticles</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$contentarticles .="<table border=\"0\" height=\"70\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td valign=\"top\">";
$result = sql_query("select sid, title, comments, time from ".$prefix."_stories order by sid DESC limit 0,5", $dbi);
while(list($sid, $title, $comtotal, $time) = sql_fetch_row($result, $dbi)) {
$linkstrip7 = stripslashes($title);
if(strlen($linkstrip7) > $strip) {
$linkstrip7 = substr($linkstrip7,0,$strip);
$linkstrip7 .= "...";
}
$contentarticles .= "$viewdot<a href=\"article.html$sid\">$linkstrip7</a><br>";
}
$contentarticles .="</td></tr></table>";
$content .= "$contentarticles</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td></tr></table>";
?>
[/php:1:76e984f069]
ps) there are some gif in quote that can not show it, it's not problem that.I just want this block to shows Last Registered Members
_________________ Life Is Life !!! Last edited by cos on Sun Jul 06, 2003 8:22 am; edited 1 time in total
allevon
Site Mod
Joined: Nov 22, 2002
Posts: 716
Location: New Jersey
Posted:
Thu Jun 26, 2003 6:37 pm
Ok I have replaced the Web Links with the newest members. You will find the modification marked ***Modified Code*** Let me know if you have any problems. Good Luck.
Code:
<?php
if (eregi("block-Center_Blocks_a.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
global $prefix, $dbi, $sitename, $ThemeSel;
// This picks up what theme you are running to make the boxes look like your story boxes
$ThemeSel = get_theme();
// Change this as needed, to match your gallery name
$gallery_name = "My_eGallery";
// Change these to change the wording on the headers for each block
$titleforum = "Forum";
$titlelinks = "New Members";
$titledownloads = "Downloads";
$titlearticles = "Subjects";
$titlepictures = "Images";
$titleclassifieds = "Classifieds";
// Size of the Max Number of characters displayed in the boxes
$strip = "64";
// Do NOT change any code below here unless you know what you are doing
$content = "<table align=\"center\" width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\">";
$content .= "<tr>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titleforum</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$viewdot = "<strong>&</strong>&";
$contentforum .= "<table width=\"100%\" height=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
$result = sql_query("SELECT * FROM ".$prefix."_forumtopics ORDER BY topic_time DESC LIMIT 5", $dbi);
while(list($topic_id, $topic_title, $topic_poster, $topic_time, $topic_views, $forum_id, $topic_status, $topic_notify) = sql_fetch_row($result, $dbi)) {
$res4 = sql_query("SELECT MAX(".$prefix."_posts.post_id) FROM ".$prefix."_posts WHERE ".$prefix."_posts.topic_id = $topic_id", $dbi);
list ($lastpostid) = sql_fetch_row($res4, $dbi);
$res3 = sql_query("SELECT COUNT(".$prefix."_posts.post_id) FROM ".$prefix."_posts WHERE ".$prefix."_posts.topic_id = $topic_id", $dbi);
list ($replies) = sql_fetch_row($res3, $dbi);
$replies = $replies-1;
$res2 = sql_query("SELECT ".$prefix."_users.uname FROM ".$prefix."_users, ".$prefix."_posts WHERE ".$prefix."_posts.poster_id = ".$prefix."_users.uid AND ".$prefix."_posts.post_id=$lastpostid", $dbi);
list ($lastposter) = sql_fetch_row($res2, $dbi);
$res = sql_query("SELECT image FROM ".$prefix."_posts where topic_id='$topic_id'", $dbi);
list ($image) = sql_fetch_row($res, $dbi);
if (file_exists("images/forum/subject/$image")) {
if(strlen($topic_title) > $strip) {
$topic_title = substr($topic_title,0,$strip);
$topic_title .= "...";
}
$contentforum .= "<tr><td>$viewdot<a href=\"modules.php?op=modload&name=Forums&file=viewtopic&topic=$topic_id&forum=$forum_id\">$topic_title</a></td><td align=\"right\"><p align=\"right\">R($replies) </td></tr>";
} else {
$contentforum .= "<td>$viewdot<a href=\"modules.php?op=modload&name=Forums&file=viewtopic&topic=$topic_id&forum=$forum_id\">$topic_title</a></td></tr>";
}
}
$contentforum .= "</table>";
$content .= "$contentforum</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titleclassifieds</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$result = sql_query("select id_ads, title, hits from ".$prefix."_ads_ads order by id_ads DESC limit 5", $dbi);
$contentclassified .= "<table width=\"100%\" height=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
while(list($id_ads, $title, $hits) = sql_fetch_row($result, $dbi)) {
if(strlen($title) > $strip) {
$title = substr($title,0,$strip);
$title .= "...";
}
$contentclassified .= "<tr><td>$viewdot<a href=\"modules.php?name=NukeC&op=ViewDetail&id_ads=$id_ads\">$title</a></td></tr>";
}
$contentclassified .= "</table>";
$content .= "$contentclassified</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titlepictures</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$z = 1;
$result = mysql_query("SELECT a.date, a.pid, a.gid, a.img, a.name, a.description, b.galloc from $prefix"._gallery_pictures." a left join $prefix"._gallery_categories." b on a.gid =b.gallid ORDER by date DESC limit 5");
$contentpictures .= "<table width=\"100%\" height=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
while (list($date, $pid, $gid, $img, $name, $description, $galloc) = mysql_fetch_row($result)) {
if(strlen($name) > $strip) {
$name = substr($name,0,$strip);
$name .= "...";
}
if(strlen($description) > $strip) {
$description = substr($description,0,$strip);
$description .= "...";
}
$pic[$z] = "<tr><td>$viewdot<a href=\"modules.php?op=modload&name=$gallery_name&file=index&do=showpic&pid=".$pid."&orderby=hitsD\">$description</a></td></tr>";
$z ++;
}
$contentpictures .= "$pic[1]$pic[2]$pic[3]$pic[4]$pic[5]";
$contentpictures .= "</table>";
$content .= "$contentpictures</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "</tr>";
$content .= "<tr>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titlelinks</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$contentlinks .="<table border=\"0\" height=\"70\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td valign=\"top\">";
/***Begin Modified Here***/
$result = sql_query("select uname, user_regdate from ".$prefix."_users where uname<>'Anonymous' order by uid DESC limit 0,$top", $dbi);
$lugar=1
while(list($uname, $user_regdate) = sql_fetch_row($result, $dbi)) {
$contentlinks .= "$viewdot $lugar: <a href=\"modules.php?name=Your_Account&op=userinfo&uname=$uname\"><b>$uname</b></a>Joined: $user_regdate<br>\n";
$lugar++;
}
/****End Modified Here***/
$contentlinks .="</td></tr></table>";
$content .= "$contentlinks</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titledownloads</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$contentdownloads .="<table border=\"0\" height=\"70\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td valign=\"top\">";
$result = sql_query("select cid, lid, title from $prefix"._downloads_downloads." order by lid DESC limit 5", $dbi);
while(list($cid, $lid, $title) = sql_fetch_row($result, $dbi)) {
$linkstrip5 = stripslashes($title);
if(strlen($linkstrip5) > $strip) {
$linkstrip5 = substr($linkstrip5,0,$strip);
$linkstrip5 .= "...";
}
$contentdownloads .= "$viewdot<a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid&title=$title\">$linkstrip5</a><br>";
}
$contentdownloads .="</td></tr></table>";
$content .= "$contentdownloads</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td>";
$content .= "<td width=\"33%\" align=\"center\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$content .= "<tr><td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-left.jpg\"></td><td align=\"left\" valign=\"middle\" background=\"themes/$ThemeSel/images/sidebox-title-bg.jpg\" height=\"30\"><font class=\"option\" color=\"#ffffff\">&&<b>$titlearticles</b></font></td><td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/$ThemeSel/images/sidebox-title-right.jpg\"></td></tr></table></td></tr></table>";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-left.jpg\"><img src=\"themes/$ThemeSel/images/sidebox-bar-px.jpg\"></td><td bgcolor=\"#ffffff\" align=\"left\" valign=\"top\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>";
$contentarticles .="<table border=\"0\" height=\"70\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td valign=\"top\">";
$result = sql_query("select sid, title, comments, time from ".$prefix."_stories order by sid DESC limit 0,5", $dbi);
while(list($sid, $title, $comtotal, $time) = sql_fetch_row($result, $dbi)) {
$linkstrip7 = stripslashes($title);
if(strlen($linkstrip7) > $strip) {
$linkstrip7 = substr($linkstrip7,0,$strip);
$linkstrip7 .= "...";
}
$contentarticles .= "$viewdot<a href=\"article.html$sid\">$linkstrip7</a><br>";
}
$contentarticles .="</td></tr></table>";
$content .= "$contentarticles</td></tr></table>";
$content .= "</td><td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/$ThemeSel/images/sidebox-bar-right.jpg\"></td></tr></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\"><td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-left.jpg\"></td><td width=\"100%\" height=\"29\" background=\"themes/$ThemeSel/images/storybox-bottom-bg.jpg\">&</td><td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/$ThemeSel/images/storybox-bottom-right.jpg\"></td></table>";
$content .= "</td></tr></table>";
?>
_________________ "Give Me Liberty, Or Give Hackerz Death!!!"
Patrick Henry Revised for 21st century.
Let The Bodies Hit The Floor! Let The Bodies Hit The Floor!
cos
Nuke Soldier
Joined: May 27, 2003
Posts: 15
Location: Greece-Thessaloniki
Posted:
Fri Jun 27, 2003 4:02 am
Hello,
First of all thanks very much but it doesn't work yet.
It says parse error in this line
while(list($uname, $user_regdate) = sql_fetch_row($result, $dbi)) {
Something seems no to be ok
_________________ Life Is Life !!!
allevon
Site Mod
Joined: Nov 22, 2002
Posts: 716
Location: New Jersey
Posted:
Fri Jun 27, 2003 4:31 am
What version of Nuke are you using?
_________________ "Give Me Liberty, Or Give Hackerz Death!!!"
Patrick Henry Revised for 21st century.
Let The Bodies Hit The Floor! Let The Bodies Hit The Floor!
cos
Nuke Soldier
Joined: May 27, 2003
Posts: 15
Location: Greece-Thessaloniki
Posted:
Fri Jun 27, 2003 4:52 am
i use 6.5
_________________ Life Is Life !!!
cos
Nuke Soldier
Joined: May 27, 2003
Posts: 15
Location: Greece-Thessaloniki
Posted:
Fri Jun 27, 2003 11:52 am
noone?
just to change web_links with new members.
i tried but i miss something
_________________ Life Is Life !!!
allevon
Site Mod
Joined: Nov 22, 2002
Posts: 716
Location: New Jersey
Posted:
Fri Jun 27, 2003 1:30 pm
Sorry was out today, Im working on it some more.
_________________ "Give Me Liberty, Or Give Hackerz Death!!!"
Patrick Henry Revised for 21st century.
Let The Bodies Hit The Floor! Let The Bodies Hit The Floor!
cos
Nuke Soldier
Joined: May 27, 2003
Posts: 15
Location: Greece-Thessaloniki
Posted:
Fri Jun 27, 2003 2:06 pm
allevon, what to say, thanks very much for your help man
i will be very indebted if you do it, or to someone else who will fix it.
Thanks again
_________________ Life Is Life !!!
allevon
Site Mod
Joined: Nov 22, 2002
Posts: 716
Location: New Jersey
Posted:
Fri Jun 27, 2003 5:22 pm
Hey Cos. My only conclusion from the arse error is that there must be different fields in 6.7. Im not running 6.7 so Im unable to test it and check. Ill notify one of the other Elites who knows 6.7 better to possibly help out.
_________________ "Give Me Liberty, Or Give Hackerz Death!!!"
Patrick Henry Revised for 21st century.
Let The Bodies Hit The Floor! Let The Bodies Hit The Floor!
chatserv
General
Joined: Jan 12, 2003
Posts: 3128
Location: Puerto Rico
Posted:
Fri Jun 27, 2003 6:21 pm
Tried to test it but i don't have some of the modules used by the block, anyway it seems the error is caused by $lugar=1 so comment it out.
_________________ Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
cos
Nuke Soldier
Joined: May 27, 2003
Posts: 15
Location: Greece-Thessaloniki
Posted:
Sat Jun 28, 2003 4:44 am
allevon i don't use 6.7 , but 6.5 (if there is any difference).
chatserv thanks you, too. you can try it even you don't have some of the modules that block has, just deactive the lines of modules you don't have.
i tried to put out lugar too, but always the same parse error.
Guys, thanks again for all
_________________ Life Is Life !!!
cos
Nuke Soldier
Joined: May 27, 2003
Posts: 15
Location: Greece-Thessaloniki
Posted:
Thu Jul 03, 2003 2:43 pm
ok guys, i found a solution and for this , too.
it's working ok now
_________________ Life Is Life !!!
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