Need for one point (not two points) between Title and Subtitle

Hello everybody,

I am writing here because I have noticed that OJS adds automatically a : sign between the Title and the Subtitles of the articles I am submitting using the “Quick Submit” plugin. However, I would need only a . to show between the two of them. That is the normal way of seeing titles, and it is also very strange to have a capital letter of the subtitle after the two points. In any case, I really need the only one point to show: Title. Subtitle, and not Title: Subtitle
Has somebody else noticed already this and tried to figure out something to change this?
Is this possible?
I am using OJS 3.1.2-4 with Classic theme 1.0.2 (the two of them are the latest at the moment).
All the best,
Leonardo

That’s the styling for title:subtitle in every OJS version… I guess.
Reviewing the code, I think the easiest way to change the colon by a dot is modifying the file “PKPString.inc.php” located in “ojs-path/lib/pkp/classes/core”. Look at this point of the code in the file:

	static function concatTitleFields($fields) {
	// Set the characters that will avoid the use of
	// a semicolon between title and subtitle.
	$avoidColonChars = array('?', '!', '/', '&');

	// if the first field ends in a character in $avoidColonChars,
	// concat with a space, otherwise use a colon.
	// Check for any of these characters in
	// the last position of current full title value.
	if (in_array(substr($fields[0], -1, 1), $avoidColonChars)) {
		$fullTitle = join(' ', $fields);
	} else {
		**$fullTitle = join(': ', $fields);**
	}

	return $fullTitle;
}

You have to change this line “$fullTitle = join(’: ', $fields);” by “$fullTitle = join(’. ', $fields);”

I haven’t tried this modification ever, so make a backup of the “PKPString.inc.php” file before applying changes.

Anyway, this is not the recommended way to modify anything in OJS, because this is a file from core (better not to touch it) and you would lose the changes you made in the next upgrade of the software.

I think the recommended way is creating a child theme from theme you are using (in your case classic theme), and then modify it… To do that you could check this link: https://docs.pkp.sfu.ca/pkp-theming-guide/en/child-themes

I hope this helps you.

1 Like