I'm looking for a copy of the nobr addon by Aero Soul. I can't seem to find it anywhere. Does anyone have a copy that I could use? or is there an archive somewhere? I checked Parahead's place already.
Thanks,
John
Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape
#! CRADDON 1
#! NAME NoBR
#! DESCRIPTION Allows you to have true (\n) line brakes in your news items. To use, place the <nobr> and </nobr> tags around the text in which you want to use true line breaks (\n).
#! VERSION 1.0
my $addon = new Addon('NoBR');
my $hook1 = <<'END_CODE';
for $i (@fieldDB) {
$complete = '';
if ($in{$i} =~ /<nobr>/i and $in{$i} =~ /<\/nobr>/i) {
@brs = split /<\/nobr>/,$in{$i};
for $j (@brs) {
($before,$after) = split /<nobr>/,$j;
$after =~ s/\n/<!-- CORANTO: LINE BREAK -->/g;
$complete .= "$before<nobr>$after</nobr>";
}
$complete =~ s/(<|\<)nobr(\>|>)(<|\<)\/nobr(\>|>)$//i;
$in{$i} = $complete;
}
}
END_CODE
my $hook2 = <<'END_CODE';
$fcode =~ s/(<|\<)!-- CORANTO: LINE BREAK --(\>|>)/\n/g;
END_CODE
my $hook3 = <<'END_CODE';
$complete = '';
if ($$fn =~ /<nobr>/i and $$fn =~ /<\/nobr>/i) {
@brs = split /<\/nobr>/,$$fn;
for $j (@brs) {
($before,$after) = split /<nobr>/,$j;
$after =~ s/\n/<!-- CORANTO: LINE BREAK -->/g;
$complete .= "$before<nobr>$after</nobr>";
}
$complete =~ s/(<|\<)nobr(\>|>)(<|\<)\/nobr(\>|>)$//i;
$$fn = $complete;
}
END_CODE
my $hook4 = <<'END_CODE';
for $nobr (@fieldDB) {
$$nobr =~ s/<!-- CORANTO: LINE BREAK -->/\n/g;
}
END_CODE
$addon->hook('SaveNews_Pre',\$hook1);
$addon->hook('ModifyNews_Edit_Fields',\$hook2);
$addon->hook('ModifyNews_EditSave_2',\$hook3);
$addon->hook('BuildNews_StandardProfile',\$hook4);
$addon->hook('BuildNews_Filtered',\$hook4);
$addon->hook('BuildNews_SingleArchive',\$hook4);
$addon->hook('BuildNews_MultiArchive',\$hook4);
1;
Return to Addon Release and Support
Users browsing this forum: Google [Bot] and 5 guests