Improve issue name display when name is very long and has a hypen
This commit is contained in:
parent
3c5188c13f
commit
af6d0d8338
|
|
@ -77,10 +77,20 @@ foreach ( $entries as $entry ) {
|
||||||
$folders[] = $info;
|
$folders[] = $info;
|
||||||
} else {
|
} else {
|
||||||
if ( (substr($entry, -3) == "cbz") || (substr($entry, -3) == "cbr") ) {
|
if ( (substr($entry, -3) == "cbz") || (substr($entry, -3) == "cbr") ) {
|
||||||
$info["comname"] = substr(((strpos($entry, " - ") !== false) ? str_replace(" - ", "<br />", $entry) : $entry), 0, -4);
|
$withoutext = substr($entry, 0, -4);
|
||||||
|
if ( strlen($withoutext) <= ISSUELENGTHCUTOFF ) {
|
||||||
|
$info["comname"] = str_replace(" - ", "<br />", $withoutext);
|
||||||
|
} else {
|
||||||
|
if ( strpos($withoutext, " - ") !== false ) {
|
||||||
|
$info["comname"] = substr($withoutext, strpos($withoutext, " - ") + 3);
|
||||||
|
} else {
|
||||||
|
$info["comname"] = $withoutext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//$info["comname"] = substr(((strpos($entry, " - ") !== false) ? str_replace(" - ", "<br />", $entry) : $entry), 0, -4);
|
||||||
$info["relcomic"] = base64_encode($compath . (($compath == "/") ? "" : "/") . $entry);
|
$info["relcomic"] = base64_encode($compath . (($compath == "/") ? "" : "/") . $entry);
|
||||||
$info["mtime"] = filemtime($fullcompath . $entry);
|
$info["mtime"] = filemtime($fullcompath . $entry);
|
||||||
$info["thumburl"] = THUMBSDIR . $compath . (($compath == "/") ? "" : "/") . substr($entry, 0, -4) . ".jpg";
|
$info["thumburl"] = THUMBSDIR . $compath . (($compath == "/") ? "" : "/") . $withoutext . ".jpg";
|
||||||
if ( in_array($entry, $issues_read) ) {
|
if ( in_array($entry, $issues_read) ) {
|
||||||
$info["read"] = true;
|
$info["read"] = true;
|
||||||
$readclass = " readborder";
|
$readclass = " readborder";
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,12 @@ define('EXTRACTSDIR', 'comics');
|
||||||
//
|
//
|
||||||
define('ADULTMODE', false);
|
define('ADULTMODE', false);
|
||||||
|
|
||||||
|
//
|
||||||
|
// The character count in the comic title where, when exceeded
|
||||||
|
// the folder/comic/series name will be removed for readability.
|
||||||
|
//
|
||||||
|
define('ISSUELENGTHCUTOFF', 25);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Database information for tracking last read page
|
// Database information for tracking last read page
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user