OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Version 1.x - Policies.php - Sugestion

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Version 1.x - Policies.php - Sugestion

Postby ramon » Mon Dec 05, 2005 7:54 am

Dear OJSers,

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");
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Return to OJS Development

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest