$newtext = str_ireplace($patterns, $replacement, $data->{$template});
/// no more html formatting and filtering - see MDL-6635
- echo $newtext;
-
- /**********************************
- * Printing Ratings Form *
- *********************************/
- if ($template == 'singletemplate') { //prints ratings options
- data_print_ratings($data, $record);
- }
-
- /**********************************
- * Printing Ratings Form *
- *********************************/
- if (($template == 'singletemplate') && ($data->comments)) { //prints ratings options
-
- data_print_comments($data, $record, $page);
+ if ($return) {
+ return $newtext;
+ } else {
+ echo $newtext;
+
+ // hack alert - return is always false in singletemplate anyway ;-)
+ /**********************************
+ * Printing Ratings Form *
+ *********************************/
+ if ($template == 'singletemplate') { //prints ratings options
+ data_print_ratings($data, $record);
+ }
+
+ /**********************************
+ * Printing Ratings Form *
+ *********************************/
+ if (($template == 'singletemplate') && ($data->comments)) { //prints ratings options
+
+ data_print_comments($data, $record, $page);
+ }
}
-
}
}
$item = null;
// guess title or not
- if ($data->rsstitletemplate) {
+ if (!empty($data->rsstitletemplate)) {
$item->title = data_print_template('rsstitletemplate', $recordarray, $data, '', 0, true);
} else { // else we guess
$item->title = strip_tags(get_field('data_content', 'content',