How to change font size of Author ?

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

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

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
weahason
Posts: 3
Joined: Fri Nov 18, 2005 2:17 am
Contact:

How to change font size of Author ?

Postby weahason » Fri Nov 18, 2005 2:27 am

In my ojs site show Author very small .

How to change font size of Author ?

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

Postby asmecher » Fri Nov 18, 2005 10:47 am

Hello Weahason,

I assume you're talking about the author's name as displayed on a published article. The best way to increase the size of the Author's name is to change the templates/article/article.tpl template; there's a line in it as follows:

Code: Select all

<div><i>{$article->getAuthorString()|escape}</i></div>

Use HTML or CSS to increase the size of the Author's name here.

Regards,
Alec Smecher
Open Journal Systems

weahason
Posts: 3
Joined: Fri Nov 18, 2005 2:17 am
Contact:

Font size

Postby weahason » Sun Nov 20, 2005 9:07 pm

Dear Alec Smecher

Code: Select all

templates/article/article.tpl

i'm not found this path.
I forgot to let you known .I used ojs version 1.1.9 .

best regrad
weahason

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

Postby asmecher » Mon Nov 21, 2005 10:24 am

Hello Weahason,

For OJS 1.x, you'll need to change the viewarticle.php file. The line that displays the author's names looks like:

Code: Select all

echo $chFirstName." ".$chMiddleInitial." ".$chSurname;

You can change it to something like:

Code: Select all

echo '<font size="+1">' . $chFirstName." ".$chMiddleInitial." ".$chSurname . '</font>';


Regards,
Alec Smecher
Open Journal Systems Team

weahason
Posts: 3
Joined: Fri Nov 18, 2005 2:17 am
Contact:

Postby weahason » Mon Nov 21, 2005 9:09 pm

Dear asmecher and all

I changed to this code.

Code: Select all

<?php      
// Get the author(s)
$authorquery = $db->query("SELECT chFirstName, chMiddleInitial, chSurname, chAffiliation, chBiography FROM tblmetaauthors WHERE fkArticleID = '$id' ORDER BY nRank") or die($query);
   $authornum = $db->num_rows($authorquery);
   for ($i=0; $i<$authornum; $i++) {
     $row = $db->assoc_array($authorquery, $i);
     extract($row);
     $y = $i + 1;
    echo '<font size="+1">' . $chFirstName." ".$chMiddleInitial." ".$chSurname . '</font>';
     if(!empty($chAffiliation)) { echo ", <i>".$chAffiliation."</i>"; }
     echo "<br />";
   }
?>


reason

no change

Help me please

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

Postby asmecher » Mon Nov 21, 2005 10:24 pm

Hello Weahason,

What page are you trying to change the font size on? Find out which PHP script you're using (it should be visible in the URL), look for a similar line of code in it to display the author's names, and enclose it in a <font size="...">(name inserted here)</font> tag.

Regards,
Alec Smecher
Open Journal Systems Team


Return to “OJS Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 3 guests