I have this scrolling links block, but when i click on one of the links it takes me to the links main page instead of the actuall link itself, or at least to the link info on my page. how can i change this so that it will go to the link(in a separate window) or at least to the link info for that link, just like the scolling downloads block i have. thanks here is the block:
Code:
<?php
/************************************************************************/
/* Advanced Weblinks Block */
/* =========================== */
/* */
/* This is basically just an edit of the original block by Francisco. */
/* Even though this is heavly edited, I think he deserves credit, so: */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/* */
/* Copyright © 2002 by Michael Bacoz */
/* http://www.fatal-instinct.com */
/* Changed by eagle-eye for your weblinks */
/* http://phpnuke-be.com */
/* */
/* For more information read the readme.txt file in this package. */
/* */
/************************************************************************/
/************************/
/* Variables */
/************************/
$linkstoshow = 5;
$usemarquee = 1;
$scrolldirection = "Up";
$most = "Most viewed";
$latest = "Latest Links";
$totalfiles = "Total Links";
$totalcategories = "Total Categories";
$totallinks = "Total Weblinks";
$hitstext = "Hits";
/************************/
/* End Variables */
/************************/
// Make sure people don't try and access it directly
if (eregi("block-Advanced_Links.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
global $prefix, $dbi;
// Total Files
$result = sql_query("select * from ".$prefix."_links_links", $dbi);
$files = sql_num_rows($result, $dbi);
// Total Categories
$result = sql_query("select * from ".$prefix."_links_categories", $dbi);
$cats = sql_num_rows($result, $dbi);
// Total Links
$result = sql_query("select hits from ".$prefix."_links_links", $dbi);
$a = 1;
while(list($hits) = sql_fetch_row($result, $dbi)) {
$total_hits = $total_hits + $hits;
$a++;
}
$content .= "$totalfiles: $files
$totalcategories: $cats
";
if ($usemarquee == 1) {
$content .= "<Marquee Behavior=\"Scroll\" Direction=\"$scrolldirection\" Height=\"140\" ScrollAmount=\"2\" ScrollDelay=\"100\" onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\">
";
}
// Latest added
$content .= $latest."
";
$a = 1;
$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$linkstoshow", $dbi);
while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
$title2 = ereg_replace("_", " ", $title);
$content .= "<big>&</big>&$a: <a href=\"modules.php?name=Web_Links&d_op=viewlinkdetails&lid=$lid&title=$title\">$title2</a>
[$hitstext: $hits]
";
$a++;
}
// Most viewed
$content .= "
".$most."
";
$a = 1;
$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by hits DESC limit 0,$linkstoshow", $dbi);
while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
$title2 = ereg_replace("_", " ", $title);
$content .= "<big>&</big>&$a: <a href=\"modules.php?name=Web_Links&d_op=viewlinkdetails&lid=$lid&title=$title\">$title2</a>
[$hitstext: $hits]
";
$a++;
}
?>