Link sources directly instad of through the list at the bottom
This commit is contained in:
parent
faaa3a8ecb
commit
58900e3d60
@ -156,9 +156,11 @@
|
||||
*/
|
||||
$meta['sources'] = array();
|
||||
$counters['sources'] = 1;
|
||||
function addSource($url) {
|
||||
function addSource($url, $text="") {
|
||||
global $counters;
|
||||
global $meta;
|
||||
if ("$text" != "")
|
||||
$text .= " ";
|
||||
if (is_numeric($url)) {
|
||||
echo "<a href=\"#src$url\">[" . $url . "]</a>";
|
||||
return $url;
|
||||
@ -168,14 +170,14 @@
|
||||
$i = 1;
|
||||
foreach ($meta['sources'] as $v) {
|
||||
if ($v == $url) {
|
||||
echo "<a href=\"#src$i\">[" . $i . "]</a>";
|
||||
echo "<a href=\"$url\">" . $text . "[" . $i . "]</a>";
|
||||
return $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
// If not found, then add
|
||||
$meta['sources'][$counters['sources']] = $url;
|
||||
echo "<a href=\"#src$i\">[" . $counters['sources'] . "]</a>";
|
||||
echo "<a href=\"$url\">" . $text . "[" . $counters['sources'] . "]</a>";
|
||||
return $counters['sources']++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user