do not show summary if it is equal to body and some styling for the summary/article toggle links
This commit is contained in:
parent
fac5d81790
commit
43992dc463
@ -438,7 +438,7 @@ function bb_summary($match) {
|
|||||||
$rnd3 = mt_rand();
|
$rnd3 = mt_rand();
|
||||||
$rnd4 = mt_rand();
|
$rnd4 = mt_rand();
|
||||||
|
|
||||||
return $match[1] . '<div style="display: block;" id="opendiv-' . $rnd2 . '">' . $match[2] . '</div><div style="display: block;" id="opendiv-' . $rnd3 . '" onclick="openClose(\'opendiv-' . $rnd1 . '\'); openClose(\'opendiv-' . $rnd2 . '\'); openClose(\'opendiv-' . $rnd3 . '\'); openClose(\'opendiv-' . $rnd4 . '\'); return false;" class="fakelink">' . t('View article') . '</div><div style="display: none;" id="opendiv-' . $rnd4 . '" onclick="openClose(\'opendiv-' . $rnd1 . '\'); openClose(\'opendiv-' . $rnd2 . '\'); openClose(\'opendiv-' . $rnd3 . '\'); openClose(\'opendiv-' . $rnd4 . '\'); return false;" class="fakelink">' . t('View summary') . '</div><div id="opendiv-' . $rnd1 . '" style="display: none;">' . $match[3] . '</div>';
|
return $match[1] . '<div style="display: block;" id="opendiv-' . $rnd2 . '">' . $match[2] . '</div><div style="display: block;" id="opendiv-' . $rnd3 . '" onclick="openClose(\'opendiv-' . $rnd1 . '\'); openClose(\'opendiv-' . $rnd2 . '\'); openClose(\'opendiv-' . $rnd3 . '\'); openClose(\'opendiv-' . $rnd4 . '\'); return false;" class="fakelink view-article">' . t('View article') . '</div><div style="display: none;" id="opendiv-' . $rnd4 . '" onclick="openClose(\'opendiv-' . $rnd1 . '\'); openClose(\'opendiv-' . $rnd2 . '\'); openClose(\'opendiv-' . $rnd3 . '\'); openClose(\'opendiv-' . $rnd4 . '\'); return false;" class="fakelink view-summary">' . t('View summary') . '</div><div id="opendiv-' . $rnd1 . '" style="display: none;">' . $match[3] . '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -436,6 +436,9 @@ function get_atom_elements($feed, $item) {
|
|||||||
|
|
||||||
$summary = unxmlify($item->get_description(true));
|
$summary = unxmlify($item->get_description(true));
|
||||||
|
|
||||||
|
if($summary === $res['body'])
|
||||||
|
$summary = '';
|
||||||
|
|
||||||
if(($summary) && ((strpos($summary,'<') !== false) || (strpos($summary,'>') !== false))) {
|
if(($summary) && ((strpos($summary,'<') !== false) || (strpos($summary,'>') !== false))) {
|
||||||
$summary = purify_html($summary);
|
$summary = purify_html($summary);
|
||||||
$summary = html2bbcode($summary);
|
$summary = html2bbcode($summary);
|
||||||
|
@ -286,7 +286,6 @@ img.smiley.emoji:hover {
|
|||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.checklist input {
|
.checklist input {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@ -296,6 +295,15 @@ img.smiley.emoji:hover {
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.view-summary {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-article {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#filer_save {
|
#filer_save {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user