Next/Previous Plus YaBB2
1.0
For YaBB2.1
This mod improves the next/previous links at the top and at the bottom of threads.
- Instead of "Previous topic" and "Next topic" the links are the abbreviated (to 20 characters) titles of those topics e.g. "This is the title th..."
Installing:
- Apply the mod.
- Upload modified files (in ASCII mode):
Sources/Display.pl
Admin/ModList.pl
MF-B
http://www.mf-b.ru/
Sources/Display.pl
for ($i = 0; $i <= $threadcount; $i++) {
($mnum) = split(/\|/, $threadlist[$i]);
if ($mnum == $name) {
if ($i > 0) {
($prev) = split(/\|/, $threadlist[$i - 1]);
$prevlink = qq~$display_txt{'768'}~;
} else {
$prevlink = qq~$display_txt{'766'}~;
}
if ($i < $threadcount) {
($next) = split(/\|/, $threadlist[$i + 1]);
$nextlink = qq~$display_txt{'767'}~;
} else {
$nextlink = qq~$display_txt{'766'}~;
}
$is = 1;
last;
}
}
for ($i = 0; $i <= $threadcount; $i++) {
($mnum) = split(/\|/, $threadlist[$i]);
if ($mnum == $name) {
if ($i > 0) {
#($prev) = split(/\|/, $threadlist[$i - 1]);
($prev, $prevtitle) = split(/\|/, $threadlist[$i - 1]);
if (length($prevtitle) > 20) {
$prevtitle =~ s/&/&/;
$prevtitle =~ s/"/"/g;
$prevtitle =~ s/<//g;
$prevtitle = substr($prevtitle, 0, 20) . '...';
$prevtitle =~ s/&/&/;
$prevtitle =~ s/"/"/g;
$prevtitle =~ s/</g;
$prevtitle =~ s/>/>/g;
}
$prevlink = qq~$prevtitle~;
} else {
$prevlink = qq~$display_txt{'766'}~;
}
if ($i < $threadcount) {
#($next) = split(/\|/, $threadlist[$i + 1]);
($next, $nexttitle) = split(/\|/, $threadlist[$i + 1]);
if (length($nexttitle) > 20) {
$nexttitle =~ s/&/&/;
$nexttitle =~ s/"/"/g;
$nexttitle =~ s/<//g;
$nexttitle = substr($nexttitle, 0, 20) . '...';
$nexttitle =~ s/&/&/;
$nexttitle =~ s/"/"/g;
$nexttitle =~ s/</g;
$nexttitle =~ s/>/>/g;
}
$nextlink = qq~$nexttitle~;
} else {
$nextlink = qq~$display_txt{'766'}~;
}
$is = 1;
last;
}
}
Admin/ModList.pl
### END BOARDMOD ANCHOR ###
$npp_plus_mod = "Next_Previous_PlusMOD_YaBB2.1|MF-B|This mod improves the next/previous links at the top and at the bottom of threads.|1.0|04/12/06";
push (@installed_mods, "$npp_plus_mod");