On version 1.x, whenever a new item is added, its link on the ojs/policies.php page is not added, even though the content is.
There are many ways to implement this, but this is the way I did it. It adds another select, but keeps things cleaner to read...
Near line 53, add:
- Code: Select all
<?
//added
// printing additional titles
//added
// select additional link titles
$links = $db->query("SELECT chTitle FROM tblaboutjournal ORDER BY chTitle");
for($i=0, $max=$db->num_rows($links); $i<$max; $i++) {
$link = $db->assoc_array($links, $i);
?>
<a href="#other_<?php echo $i+1 ?>"><?php echo stripslashes($link[chTitle]) ?></a><br />
<?
}
?>
If you want the list of new items to be in alphabetical order, either input them in order in the form, or change the SQL in ojs/policies.php, near line 269, and ojs/about.php, near line 78:
- Code: Select all
From
// show additional items
$result = $db->query("SELECT chTitle, chContent FROM tblaboutjournal ORDER BY nItemID");
To
// show additional items
$result = $db->query("SELECT chTitle, chContent FROM tblaboutjournal ORDER BY chTitle");
About.php
From
// show additional items
$result = $db->query("SELECT chTitle FROM tblaboutjournal ORDER BY nItemID");
To
// show additional items
$result = $db->query("SELECT chTitle FROM tblaboutjournal ORDER BY chTitle");
