Skip to content

Commit

Permalink
Remove RSS and ATOM options from Forum, Blog, Wiki and News #411316
Browse files Browse the repository at this point in the history
  • Loading branch information
toanlam authored and Jason.Platts committed Nov 23, 2020
1 parent 987a3f5 commit a132ff7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 83 deletions.
8 changes: 0 additions & 8 deletions allposts.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,6 @@
}
}

if ($feeds = oublog_get_feedblock($oublog, 'all', '', false, $cm)) {
$bc = new block_contents();
$bc->attributes['id'] = 'oublog-feeds';
$bc->attributes['class'] = 'oublog-sideblock block';
$bc->title = $strfeeds;
$bc->content = $feeds;
$PAGE->blocks->add_fake_block($bc, BLOCK_POS_RIGHT);
}
// Must be called after add_fake_blocks.
echo $OUTPUT->header();
// Start main column.
Expand Down
55 changes: 0 additions & 55 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1896,61 +1896,6 @@ function oublog_get_feedurl($format, $oublog, $bloginstance, $groupid, $comments



/**
* Get a block containing links to the Atom and RSS feeds
*
* @param object $oublog
* @param object $bloginstance
* @param int $groupid
* @param int $postid
* @param object $context
* @param object $masterblog
* @return string HTML of block
* @uses $CFG
*/
function oublog_get_feedblock($oublog, $bloginstance, $groupid, $postid, $cm, $individualid=-1, $masterblog = null) {
global $CFG, $OUTPUT;

if (!$CFG->enablerssfeeds) {
return(false);
}
// Check master blog.
$feedoublog = !empty($masterblog) ? $masterblog : $oublog;
$childoublog = !empty($masterblog) ? $oublog : null;

$blogurlatom = oublog_get_feedurl('atom', $feedoublog, $bloginstance, $groupid, false, false, $cm, $individualid, $childoublog);
$blogurlrss = oublog_get_feedurl('rss', $feedoublog, $bloginstance, $groupid, false, false, $cm, $individualid, $childoublog);

if (!is_string($bloginstance)) {
$commentsurlatom = oublog_get_feedurl('atom', $feedoublog, $bloginstance, $groupid, true, $postid, $cm, $individualid, $childoublog);
$commentsurlrss = oublog_get_feedurl('rss', $feedoublog, $bloginstance, $groupid, true, $postid, $cm, $individualid, $childoublog);
}

$html = '<div id="oublog-feedtext">' . get_string('subscribefeed', 'oublog', oublog_get_displayname($oublog));
$html .= $OUTPUT->help_icon('feedhelp', 'oublog');
$html .= '</div>';
$html .= '<div class="oublog-feedlinks">';
$html .= '<span class="oublog-feedlinks-feedtitle">' . get_string('blogfeed', 'oublog', oublog_get_displayname($oublog, true)) . ': </span>';
$html .= '<span class="oublog-feedlinks-feedtype">';
$html .= '<br/><a href="'.$blogurlatom.'">'.get_string('atom', 'oublog').'</a> ';
$html .= '<br/><a href="'.$blogurlrss.'">'.get_string('rss', 'oublog').'</a>';
$html .= '</span>';

if ($oublog->allowcomments) {
if (!is_string($bloginstance)) {
$html .= '<div class="oublog-links">';
$html .= '<span class="oublog-feedcommentlinks-feedtitle">'.get_string('commentsfeed', 'oublog') . ': </span>';
$html .= '<br/><a href="'.$commentsurlatom.'">'.get_string('comments', 'oublog').' '.get_string('atom', 'oublog').'</a> ';
$html .= '<br/><a href="'.$commentsurlrss.'">'.get_string('comments', 'oublog').' '.get_string('rss', 'oublog').'</a>';
$html .= '</div>';
}
}
$html .= '</div>';
return ($html);
}



/**
* Get extra meta tags that need to go into the page header
*
Expand Down
7 changes: 0 additions & 7 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
text-decoration:underline;
}

#oublog-feeds a {
text-decoration:none;
}
#oublog-feeds a:hover .oublog-tagname{
text-decoration:underline;
}

.oublog-post-date a, .oublog-post-tags a, .oublog-post-links a, .oublog-post-editsummary a, .oublog-post-attachments a {
text-decoration: none;
}
Expand Down
13 changes: 0 additions & 13 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,19 +389,6 @@
$bc->content = $stats;
$PAGE->blocks->add_fake_block($bc, BLOCK_POS_RIGHT);
}

// Feeds.
if ($feeds = oublog_get_feedblock($oublog, $oubloginstance, $currentgroup, false, $cm, $currentindividual,
$masterblog)) {
$feedicon = ' <img src="'.$OUTPUT->image_url('i/rss').'" alt="'.get_string('blogfeed', 'oublog').'" class="feedicon" />';
$bc = new block_contents();
$bc->attributes['id'] = 'oublog-feeds';
$bc->attributes['class'] = 'oublog-sideblock block';
$bc->attributes['data-osepid'] = $id . '_oublog_blockfeeds';
$bc->title = $strfeeds;
$bc->content = $feeds;
$PAGE->blocks->add_fake_block($bc, BLOCK_POS_RIGHT);
}
}

// Show portfolio export link.
Expand Down

0 comments on commit a132ff7

Please sign in to comment.